Package net.minecraftforge.client.event
Class RegisterRecipeBookCategoriesEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.RegisterRecipeBookCategoriesEvent
- All Implemented Interfaces:
IModBusEvent
public class RegisterRecipeBookCategoriesEvent
extends net.minecraftforge.eventbus.api.Event
implements IModBusEvent
Allows users to register custom categories for the vanilla recipe book, making it usable in modded GUIs.
This event is not cancellable, and does not have a result.
This event is fired on the mod-specific event bus, only on the logical client.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Map
<RecipeBookCategories, com.google.common.collect.ImmutableList<RecipeBookCategories>> private final Map
<RecipeType<?>, Function<Recipe<?>, RecipeBookCategories>> private final Map
<RecipeBookType, com.google.common.collect.ImmutableList<RecipeBookCategories>> -
Constructor Summary
ConstructorDescriptionRegisterRecipeBookCategoriesEvent
(Map<RecipeBookCategories, com.google.common.collect.ImmutableList<RecipeBookCategories>> aggregateCategories, Map<RecipeBookType, com.google.common.collect.ImmutableList<RecipeBookCategories>> typeCategories, Map<RecipeType<?>, Function<Recipe<?>, RecipeBookCategories>> recipeCategoryLookups) -
Method Summary
Modifier and TypeMethodDescriptionvoid
registerAggregateCategory
(RecipeBookCategories category, List<RecipeBookCategories> others) Registers the list of categories that compose an aggregate category.void
registerBookCategories
(RecipeBookType type, List<RecipeBookCategories> categories) Registers the list of categories that compose a recipe book.void
registerRecipeCategoryFinder
(RecipeType<?> type, Function<Recipe<?>, RecipeBookCategories> lookup) Registers a category lookup for a certain recipe type.Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Field Details
-
aggregateCategories
private final Map<RecipeBookCategories,com.google.common.collect.ImmutableList<RecipeBookCategories>> aggregateCategories -
typeCategories
private final Map<RecipeBookType,com.google.common.collect.ImmutableList<RecipeBookCategories>> typeCategories -
recipeCategoryLookups
-
-
Constructor Details
-
RegisterRecipeBookCategoriesEvent
@Internal public RegisterRecipeBookCategoriesEvent(Map<RecipeBookCategories, com.google.common.collect.ImmutableList<RecipeBookCategories>> aggregateCategories, Map<RecipeBookType, com.google.common.collect.ImmutableList<RecipeBookCategories>> typeCategories, Map<RecipeType<?>, Function<Recipe<?>, RecipeBookCategories>> recipeCategoryLookups)
-
-
Method Details
-
registerAggregateCategory
public void registerAggregateCategory(RecipeBookCategories category, List<RecipeBookCategories> others) Registers the list of categories that compose an aggregate category. -
registerBookCategories
Registers the list of categories that compose a recipe book. -
registerRecipeCategoryFinder
public void registerRecipeCategoryFinder(RecipeType<?> type, Function<Recipe<?>, RecipeBookCategories> lookup) Registers a category lookup for a certain recipe type.
-