Class RecipesReceivedEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.RecipesReceivedEvent
public class RecipesReceivedEvent
extends net.neoforged.bus.api.Event
This event is fired on the client when it has finished receiving recipe data
from the server. This will be the case shortly after first entering the world,
and whenever the server decides to reload its datapacks. Note that recipe data
will only be sent for recipe types requested using
OnDatapackSyncEvent.sendRecipes(net.minecraft.world.item.crafting.RecipeType<?>...)
on the server-side.
You should clean up any data you kept from this event when the player disconnects,
for example when ClientPlayerNetworkEvent.LoggingOut
is fired.
These events are fired on the main event bus, only on the logical client.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final net.minecraft.world.item.crafting.RecipeMap
private final Set
<net.minecraft.world.item.crafting.RecipeType<?>> -
Constructor Summary
ConstructorsConstructorDescriptionRecipesReceivedEvent
(Set<net.minecraft.world.item.crafting.RecipeType<?>> recipeTypes, net.minecraft.world.item.crafting.RecipeMap recipeMap) -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.item.crafting.RecipeMap
Set
<net.minecraft.world.item.crafting.RecipeType<?>>
-
Field Details
-
recipeTypes
-
recipeMap
private final net.minecraft.world.item.crafting.RecipeMap recipeMap
-
-
Constructor Details
-
RecipesReceivedEvent
@Internal public RecipesReceivedEvent(Set<net.minecraft.world.item.crafting.RecipeType<?>> recipeTypes, net.minecraft.world.item.crafting.RecipeMap recipeMap)
-
-
Method Details
-
getRecipeTypes
- Returns:
- The recipe types that were requested by mods on the server to be sent to the client. This may be a subset of available recipes types or even empty if no mods requested recipes to be sent.
-
getRecipeMap
public net.minecraft.world.item.crafting.RecipeMap getRecipeMap()- Returns:
- The recipes received from the server.
-