public class ShapedRecipe extends Object implements CraftingRecipe
| Modifier and Type | Class and Description |
|---|---|
static class |
ShapedRecipe.Serializer |
| Modifier and Type | Field and Description |
|---|---|
private String |
group |
private int |
height |
private Identifier |
id |
private DefaultedList<Ingredient> |
inputs |
private ItemStack |
output |
private int |
width |
| Constructor and Description |
|---|
ShapedRecipe(Identifier id,
String group,
int width,
int height,
DefaultedList<Ingredient> ingredients,
ItemStack output) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetTypegetRecipeKindIcon, getRemainingStacks, isIgnoredInRecipeBookprivate final int width
private final int height
private final DefaultedList<Ingredient> inputs
private final ItemStack output
private final Identifier id
private final String group
public ShapedRecipe(Identifier id, String group, int width, int height, DefaultedList<Ingredient> ingredients, ItemStack output)
public Identifier getId()
getId in interface Recipe<CraftingInventory>public RecipeSerializer<?> getSerializer()
getSerializer in interface Recipe<CraftingInventory>@Environment(value=CLIENT) public String getGroup()
getGroup in interface Recipe<CraftingInventory>public ItemStack getOutput()
getOutput in interface Recipe<CraftingInventory>public DefaultedList<Ingredient> getPreviewInputs()
getPreviewInputs in interface Recipe<CraftingInventory>@Environment(value=CLIENT)
public boolean fits(int width,
int height)
fits in interface Recipe<CraftingInventory>public boolean matches(CraftingInventory craftingInventory, World world)
matches in interface Recipe<CraftingInventory>private boolean matchesSmall(CraftingInventory inv, int offsetX, int offsetY, boolean bool)
public ItemStack craft(CraftingInventory craftingInventory)
craft in interface Recipe<CraftingInventory>public int getWidth()
public int getHeight()
private static DefaultedList<Ingredient> getIngredients(String[] pattern, Map<String,Ingredient> key, int width, int height)
@Environment(value=CLIENT) public boolean method_31584()
method_31584 in interface Recipe<CraftingInventory>private static int findNextIngredient(String pattern)
private static int findNextIngredientReverse(String pattern)
private static Map<String,Ingredient> getComponents(JsonObject json)
public static ItemStack getItemStack(JsonObject json)