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, waitgetRemainingItems, isDynamicgetTypepublic 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 IRecipepublic ItemStack getRecipeOutput()
getRecipeOutput in interface IRecipepublic NonNullList<Ingredient> getIngredients()
getIngredients in interface IRecipepublic boolean matches(IInventory inv, World worldIn)
public ItemStack getCraftingResult(IInventory inv)
getCraftingResult in interface IRecipepublic int getWidth()
public int getRecipeWidth()
getRecipeWidth in interface IShapedRecipepublic int getHeight()
public int getRecipeHeight()
getRecipeHeight in interface IShapedRecipepublic static ItemStack deserializeItem(com.google.gson.JsonObject p_199798_0_)