public class ShapedRecipe extends java.lang.Object implements IRecipe, IShapedRecipe
Modifier and Type | Class and Description |
---|---|
static class |
ShapedRecipe.Serializer |
Constructor and Description |
---|
ShapedRecipe(ResourceLocation idIn,
java.lang.String groupIn,
int recipeWidthIn,
int recipeHeightIn,
NonNullList<Ingredient> recipeItemsIn,
ItemStack recipeOutputIn) |
Modifier and Type | Method and Description |
---|---|
boolean |
canFit(int width,
int height) |
static ItemStack |
deserializeItem(com.google.gson.JsonObject p_199798_0_) |
ItemStack |
getCraftingResult(IInventory inv) |
java.lang.String |
getGroup() |
int |
getHeight() |
ResourceLocation |
getId() |
NonNullList<Ingredient> |
getIngredients() |
int |
getRecipeHeight() |
ItemStack |
getRecipeOutput() |
int |
getRecipeWidth() |
IRecipeSerializer<?> |
getSerializer() |
int |
getWidth() |
boolean |
matches(IInventory inv,
World worldIn) |
static void |
setCraftingSize(int width,
int height)
Expand the max width and height allowed in the deserializer.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRemainingItems, isDynamic
getType
public ShapedRecipe(ResourceLocation idIn, java.lang.String groupIn, int recipeWidthIn, int recipeHeightIn, NonNullList<Ingredient> recipeItemsIn, ItemStack recipeOutputIn)
public static void setCraftingSize(int width, int height)
width
- your max recipe widthheight
- your max recipe heightpublic ResourceLocation getId()
public IRecipeSerializer<?> getSerializer()
getSerializer
in interface IRecipe
public ItemStack getRecipeOutput()
getRecipeOutput
in interface IRecipe
public NonNullList<Ingredient> getIngredients()
getIngredients
in interface IRecipe
public boolean matches(IInventory inv, World worldIn)
public ItemStack getCraftingResult(IInventory inv)
getCraftingResult
in interface IRecipe
public int getWidth()
public int getRecipeWidth()
getRecipeWidth
in interface IShapedRecipe
public int getHeight()
public int getRecipeHeight()
getRecipeHeight
in interface IShapedRecipe
public static ItemStack deserializeItem(com.google.gson.JsonObject p_199798_0_)