Class RegisterRecipePropertiesEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.RegisterRecipePropertiesEvent
- All Implemented Interfaces:
IModBusEvent
public final class RegisterRecipePropertiesEvent
extends net.neoforged.bus.api.Event
implements IModBusEvent
Fired to register RecipePropertySets, for example for use in input slot validaty checks of crafting blocks.
Use cases which need the entire recipe on the client should use OnDatapackSyncEvent.sendRecipes(RecipeType...) instead.
Fires on both physical sides on the mod-specific event bus.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<ResourceKey<RecipePropertySet>, RecipeManager.IngredientExtractor> -
Constructor Summary
ConstructorsConstructorDescriptionRegisterRecipePropertiesEvent(Map<ResourceKey<RecipePropertySet>, RecipeManager.IngredientExtractor> propertySets) -
Method Summary
Modifier and TypeMethodDescriptionvoidregister(ResourceKey<RecipePropertySet> key, RecipeManager.IngredientExtractor extractor) Register aRecipePropertySetwith the given key and ingredient extractor.
-
Field Details
-
propertySets
-
-
Constructor Details
-
RegisterRecipePropertiesEvent
@Internal public RegisterRecipePropertiesEvent(Map<ResourceKey<RecipePropertySet>, RecipeManager.IngredientExtractor> propertySets)
-
-
Method Details
-
register
public void register(ResourceKey<RecipePropertySet> key, RecipeManager.IngredientExtractor extractor) Register aRecipePropertySetwith the given key and ingredient extractor.- Parameters:
key- The key to register the recipe property set underextractor- The ingredient extractor to use for collecting applicable ingredients- Throws:
IllegalArgumentException- when multiple recipe property sets are registered under the same key
-