public class ShapedRecipes extends IForgeRegistryEntry.Impl<IRecipe> implements IShapedRecipe
IForgeRegistryEntry.Impl<T extends IForgeRegistryEntry<T>>| Modifier and Type | Field and Description |
|---|---|
int |
recipeHeight
How many vertical slots this recipe uses.
|
NonNullList<Ingredient> |
recipeItems
Is a array of ItemStack that composes the recipe.
|
int |
recipeWidth
How many horizontal slots this recipe is wide.
|
delegate| Constructor and Description |
|---|
ShapedRecipes(java.lang.String group,
int width,
int height,
NonNullList<Ingredient> ingredients,
ItemStack result) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canFit(int width,
int height)
Used to determine if this recipe can fit in a grid of the given width/height
|
static ShapedRecipes |
deserialize(JsonObject p_193362_0_) |
static Ingredient |
deserializeIngredient(JsonElement p_193361_0_) |
static ItemStack |
deserializeItem(JsonObject p_192405_0_,
boolean useCount) |
ItemStack |
getCraftingResult(InventoryCrafting inv)
Returns an Item that is the result of this recipe
|
java.lang.String |
getGroup() |
int |
getHeight() |
NonNullList<Ingredient> |
getIngredients() |
int |
getRecipeHeight() |
ItemStack |
getRecipeOutput() |
int |
getRecipeWidth() |
NonNullList<ItemStack> |
getRemainingItems(InventoryCrafting inv) |
int |
getWidth() |
boolean |
matches(InventoryCrafting inv,
World worldIn)
Used to check if a recipe matches current crafting inventory
|
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetRegistryName, getRegistryType, setRegistryNamepublic final int recipeWidth
public final int recipeHeight
public final NonNullList<Ingredient> recipeItems
public ShapedRecipes(java.lang.String group,
int width,
int height,
NonNullList<Ingredient> ingredients,
ItemStack result)
public ItemStack getRecipeOutput()
getRecipeOutput in interface IRecipepublic NonNullList<ItemStack> getRemainingItems(InventoryCrafting inv)
getRemainingItems in interface IRecipepublic NonNullList<Ingredient> getIngredients()
getIngredients in interface IRecipepublic boolean canFit(int width,
int height)
public boolean matches(InventoryCrafting inv, World worldIn)
public ItemStack getCraftingResult(InventoryCrafting inv)
getCraftingResult in interface IRecipepublic int getWidth()
public int getHeight()
public static ShapedRecipes deserialize(JsonObject p_193362_0_)
public static Ingredient deserializeIngredient(JsonElement p_193361_0_)
public static ItemStack deserializeItem(JsonObject p_192405_0_, boolean useCount)
public int getRecipeWidth()
getRecipeWidth in interface IShapedRecipepublic int getRecipeHeight()
getRecipeHeight in interface IShapedRecipe