Class RecipeBaseData<C extends net.minecraft.world.Container>
java.lang.Object
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>
public abstract class RecipeBaseData<C extends net.minecraft.world.Container>
extends Object
implements 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.
-
Field Summary
Fields inherited from interface net.minecraft.world.item.crafting.Recipe
CODEC, CONDITIONAL_CODEC -
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 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()
-
-
Method Details
-
matches
- Specified by:
matchesin interfacenet.minecraft.world.item.crafting.Recipe<C extends net.minecraft.world.Container>
-
assemble
- Specified by:
assemblein interfacenet.minecraft.world.item.crafting.Recipe<C extends net.minecraft.world.Container>
-
canCraftInDimensions
public boolean canCraftInDimensions(int width, int height) - Specified by:
canCraftInDimensionsin interfacenet.minecraft.world.item.crafting.Recipe<C extends net.minecraft.world.Container>
-
getResultItem
public net.minecraft.world.item.ItemStack getResultItem(net.minecraft.core.RegistryAccess access) - Specified by:
getResultItemin interfacenet.minecraft.world.item.crafting.Recipe<C extends net.minecraft.world.Container>
-