public class ShapedRecipe extends java.lang.Object implements ICraftingRecipe, IShapedRecipe<CraftingInventory>
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(CraftingInventory inv) |
java.lang.String |
getGroup() |
int |
getHeight() |
ResourceLocation |
getId() |
NonNullList<Ingredient> |
getIngredients() |
int |
getRecipeHeight() |
ItemStack |
getRecipeOutput() |
int |
getRecipeWidth() |
IRecipeSerializer<?> |
getSerializer() |
int |
getWidth() |
boolean |
matches(CraftingInventory 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
getType
getIcon, getRemainingItems, isDynamic
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()
getId
in interface IRecipe<CraftingInventory>
public IRecipeSerializer<?> getSerializer()
getSerializer
in interface IRecipe<CraftingInventory>
public java.lang.String getGroup()
getGroup
in interface IRecipe<CraftingInventory>
public ItemStack getRecipeOutput()
getRecipeOutput
in interface IRecipe<CraftingInventory>
public NonNullList<Ingredient> getIngredients()
getIngredients
in interface IRecipe<CraftingInventory>
public boolean canFit(int width, int height)
canFit
in interface IRecipe<CraftingInventory>
public boolean matches(CraftingInventory inv, World worldIn)
matches
in interface IRecipe<CraftingInventory>
public ItemStack getCraftingResult(CraftingInventory inv)
getCraftingResult
in interface IRecipe<CraftingInventory>
public int getWidth()
public int getRecipeWidth()
getRecipeWidth
in interface IShapedRecipe<CraftingInventory>
public int getHeight()
public int getRecipeHeight()
getRecipeHeight
in interface IShapedRecipe<CraftingInventory>
public static ItemStack deserializeItem(com.google.gson.JsonObject p_199798_0_)