Class RecipeBaseData<C extends net.minecraft.world.Container>
java.lang.Object
net.darkhax.bookshelf.api.data.recipes.RecipeBase<C>
net.darkhax.bookshelf.api.data.recipes.RecipeBaseData<C>
- Type Parameters:
C- The type of inventory used to craft the recipe. This can usually be ignored.
- All Implemented Interfaces:
net.minecraft.world.item.crafting.Recipe<C>
A partial implementation of
Recipe that is intended for recipes that are
not crafted through an inventory or traditional crafting system. This implementation provides default behaviours to
ignore the vanilla crafting system.
This approach is often preferred over defining your own reload listener as it allows the data to be synced to the client and maintains a load order that is beneficial for implementing support for mods like JEI and CraftTweaker.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.item.ItemStackbooleancanCraftInDimensions(int width, int height) net.minecraft.world.item.ItemStackgetResultItem(net.minecraft.core.RegistryAccess access) booleanMethods inherited from class net.darkhax.bookshelf.api.data.recipes.RecipeBase
getIdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.item.crafting.Recipe
getGroup, getIngredients, getRemainingItems, getSerializer, getToastSymbol, getType, isIncomplete, isSpecial, showNotification
-
Constructor Details
-
RecipeBaseData
public RecipeBaseData(net.minecraft.resources.ResourceLocation id)
-
-
Method Details
-
matches
-
assemble
-
canCraftInDimensions
public boolean canCraftInDimensions(int width, int height) -
getResultItem
public net.minecraft.world.item.ItemStack getResultItem(net.minecraft.core.RegistryAccess access)
-