public class ShapedRecipe extends java.lang.Object implements ICraftingRecipe, IShapedRecipe<CraftingInventory>
修飾子とタイプ | クラスと説明 |
---|---|
static class |
ShapedRecipe.Serializer |
コンストラクタと説明 |
---|
ShapedRecipe(ResourceLocation idIn,
java.lang.String groupIn,
int recipeWidthIn,
int recipeHeightIn,
NonNullList<Ingredient> recipeItemsIn,
ItemStack recipeOutputIn) |
修飾子とタイプ | メソッドと説明 |
---|---|
boolean |
canFit(int width,
int height)
Used to determine if this recipe can fit in a grid of the given width/height
|
static ItemStack |
deserializeItem(com.google.gson.JsonObject p_199798_0_) |
ItemStack |
getCraftingResult(CraftingInventory inv)
Returns an Item that is the result of this recipe
|
java.lang.String |
getGroup()
Recipes with equal group are combined into one button in the recipe book
|
int |
getHeight() |
ResourceLocation |
getId() |
NonNullList<Ingredient> |
getIngredients() |
int |
getRecipeHeight() |
ItemStack |
getRecipeOutput()
Get the result of this recipe, usually for display purposes (e.g. recipe book).
|
int |
getRecipeWidth() |
IRecipeSerializer<?> |
getSerializer() |
int |
getWidth() |
boolean |
matches(CraftingInventory inv,
World worldIn)
Used to check if a recipe matches current crafting inventory
|
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
インタフェース内 IRecipe<CraftingInventory>
public IRecipeSerializer<?> getSerializer()
getSerializer
インタフェース内 IRecipe<CraftingInventory>
public java.lang.String getGroup()
getGroup
インタフェース内 IRecipe<CraftingInventory>
public ItemStack getRecipeOutput()
getRecipeOutput
インタフェース内 IRecipe<CraftingInventory>
public NonNullList<Ingredient> getIngredients()
getIngredients
インタフェース内 IRecipe<CraftingInventory>
public boolean canFit(int width, int height)
canFit
インタフェース内 IRecipe<CraftingInventory>
public boolean matches(CraftingInventory inv, World worldIn)
matches
インタフェース内 IRecipe<CraftingInventory>
public ItemStack getCraftingResult(CraftingInventory inv)
getCraftingResult
インタフェース内 IRecipe<CraftingInventory>
public int getWidth()
public int getRecipeWidth()
getRecipeWidth
インタフェース内 IShapedRecipe<CraftingInventory>
public int getHeight()
public int getRecipeHeight()
getRecipeHeight
インタフェース内 IShapedRecipe<CraftingInventory>
public static ItemStack deserializeItem(com.google.gson.JsonObject p_199798_0_)