public class ShapedRecipes extends java.lang.Object implements IRecipe
Modifier and Type | Field and Description |
---|---|
private boolean |
copyIngredientNBT |
private int |
recipeHeight
How many vertical slots this recipe uses.
|
private ItemStack[] |
recipeItems
Is a array of ItemStack that composes the recipe.
|
private ItemStack |
recipeOutput
Is the ItemStack that you get when craft the recipe.
|
private int |
recipeWidth
How many horizontal slots this recipe is wide.
|
Constructor and Description |
---|
ShapedRecipes(int width,
int height,
ItemStack[] p_i1917_3_,
ItemStack output) |
Modifier and Type | Method and Description |
---|---|
private boolean |
checkMatch(InventoryCrafting p_77573_1_,
int p_77573_2_,
int p_77573_3_,
boolean p_77573_4_)
Checks if the region of a crafting inventory is match for the recipe.
|
ItemStack |
getCraftingResult(InventoryCrafting inv)
Returns an Item that is the result of this recipe
|
ItemStack |
getRecipeOutput() |
int |
getRecipeSize()
Returns the size of the recipe area
|
ItemStack[] |
getRemainingItems(InventoryCrafting inv) |
boolean |
matches(InventoryCrafting inv,
World worldIn)
Used to check if a recipe matches current crafting inventory
|
private final int recipeWidth
private final int recipeHeight
private final ItemStack[] recipeItems
private final ItemStack recipeOutput
private boolean copyIngredientNBT
public ItemStack getRecipeOutput()
getRecipeOutput
in interface IRecipe
public ItemStack[] getRemainingItems(InventoryCrafting inv)
getRemainingItems
in interface IRecipe
public boolean matches(InventoryCrafting inv, World worldIn)
private boolean checkMatch(InventoryCrafting p_77573_1_, int p_77573_2_, int p_77573_3_, boolean p_77573_4_)
public ItemStack getCraftingResult(InventoryCrafting inv)
getCraftingResult
in interface IRecipe
public int getRecipeSize()
getRecipeSize
in interface IRecipe