Package net.minecraft.recipe
Class ShapedRecipe
java.lang.Object
net.minecraft.recipe.ShapedRecipe
- All Implemented Interfaces:
CraftingRecipe
,Recipe<CraftingInventory>
- Direct Known Subclasses:
MapExtendingRecipe
public class ShapedRecipe extends Object implements CraftingRecipe
- Mappings:
Namespace Name official bqs
intermediary net/minecraft/class_1869
named net/minecraft/recipe/ShapedRecipe
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ShapedRecipe.Serializer
-
Field Summary
Fields Modifier and Type Field Description private String
group
private int
height
private Identifier
id
private DefaultedList<Ingredient>
inputs
private ItemStack
output
private int
width
-
Constructor Summary
Constructors Constructor Description ShapedRecipe(Identifier id, String group, int width, int height, DefaultedList<Ingredient> ingredients, ItemStack output)
-
Method Summary
Modifier and Type Method Description (package private) static String[]
combinePattern(String[] lines)
ItemStack
craft(CraftingInventory craftingInventory)
private static int
findNextIngredient(String pattern)
private static int
findNextIngredientReverse(String pattern)
boolean
fits(int width, int height)
private static Map<String,Ingredient>
getComponents(JsonObject json)
String
getGroup()
int
getHeight()
Identifier
getId()
private static DefaultedList<Ingredient>
getIngredients(String[] pattern, Map<String,Ingredient> key, int width, int height)
static ItemStack
getItemStack(JsonObject json)
ItemStack
getOutput()
private static String[]
getPattern(JsonArray json)
DefaultedList<Ingredient>
getPreviewInputs()
RecipeSerializer<?>
getSerializer()
int
getWidth()
boolean
isEmpty()
boolean
matches(CraftingInventory craftingInventory, World world)
private boolean
matchesSmall(CraftingInventory inv, int offsetX, int offsetY, boolean bool)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.recipe.CraftingRecipe
getType
Methods inherited from interface net.minecraft.recipe.Recipe
getRecipeKindIcon, getRemainingStacks, isIgnoredInRecipeBook
-
Field Details
-
width
private final int width- Mappings:
Namespace Name Mixin selector official a
Lbqs;a:I
intermediary field_9055
Lnet/minecraft/class_1869;field_9055:I
named width
Lnet/minecraft/recipe/ShapedRecipe;width:I
-
height
private final int height- Mappings:
Namespace Name Mixin selector official b
Lbqs;b:I
intermediary field_9054
Lnet/minecraft/class_1869;field_9054:I
named height
Lnet/minecraft/recipe/ShapedRecipe;height:I
-
inputs
- Mappings:
Namespace Name Mixin selector official c
Lbqs;c:Lgj;
intermediary field_9052
Lnet/minecraft/class_1869;field_9052:Lnet/minecraft/class_2371;
named inputs
Lnet/minecraft/recipe/ShapedRecipe;inputs:Lnet/minecraft/util/collection/DefaultedList;
-
output
- Mappings:
Namespace Name Mixin selector official d
Lbqs;d:Lbnv;
intermediary field_9053
Lnet/minecraft/class_1869;field_9053:Lnet/minecraft/class_1799;
named output
Lnet/minecraft/recipe/ShapedRecipe;output:Lnet/minecraft/item/ItemStack;
-
id
- Mappings:
Namespace Name Mixin selector official e
Lbqs;e:Lwb;
intermediary field_9051
Lnet/minecraft/class_1869;field_9051:Lnet/minecraft/class_2960;
named id
Lnet/minecraft/recipe/ShapedRecipe;id:Lnet/minecraft/util/Identifier;
-
group
- Mappings:
Namespace Name Mixin selector official f
Lbqs;f:Ljava/lang/String;
intermediary field_9056
Lnet/minecraft/class_1869;field_9056:Ljava/lang/String;
named group
Lnet/minecraft/recipe/ShapedRecipe;group:Ljava/lang/String;
-
-
Constructor Details
-
ShapedRecipe
public ShapedRecipe(Identifier id, String group, int width, int height, DefaultedList<Ingredient> ingredients, ItemStack output)- Mappings:
Namespace Name Mixin selector official <init>
Lbqs;<init>(Lwb;Ljava/lang/String;IILgj;Lbnv;)V
intermediary <init>
Lnet/minecraft/class_1869;<init>(Lnet/minecraft/class_2960;Ljava/lang/String;IILnet/minecraft/class_2371;Lnet/minecraft/class_1799;)V
named <init>
Lnet/minecraft/recipe/ShapedRecipe;<init>(Lnet/minecraft/util/Identifier;Ljava/lang/String;IILnet/minecraft/util/collection/DefaultedList;Lnet/minecraft/item/ItemStack;)V
-
-
Method Details
-
getId
- Specified by:
getId
in interfaceRecipe<CraftingInventory>
- Mappings:
Namespace Name Mixin selector official f
Lbqn;f()Lwb;
intermediary method_8114
Lnet/minecraft/class_1860;method_8114()Lnet/minecraft/class_2960;
named getId
Lnet/minecraft/recipe/Recipe;getId()Lnet/minecraft/util/Identifier;
-
getSerializer
- Specified by:
getSerializer
in interfaceRecipe<CraftingInventory>
- Mappings:
Namespace Name Mixin selector official ai_
Lbqn;ai_()Lbqp;
intermediary method_8119
Lnet/minecraft/class_1860;method_8119()Lnet/minecraft/class_1865;
named getSerializer
Lnet/minecraft/recipe/Recipe;getSerializer()Lnet/minecraft/recipe/RecipeSerializer;
-
getGroup
- Specified by:
getGroup
in interfaceRecipe<CraftingInventory>
- Mappings:
Namespace Name Mixin selector official d
Lbqn;d()Ljava/lang/String;
intermediary method_8112
Lnet/minecraft/class_1860;method_8112()Ljava/lang/String;
named getGroup
Lnet/minecraft/recipe/Recipe;getGroup()Ljava/lang/String;
-
getOutput
- Specified by:
getOutput
in interfaceRecipe<CraftingInventory>
- Mappings:
Namespace Name Mixin selector official c
Lbqn;c()Lbnv;
intermediary method_8110
Lnet/minecraft/class_1860;method_8110()Lnet/minecraft/class_1799;
named getOutput
Lnet/minecraft/recipe/Recipe;getOutput()Lnet/minecraft/item/ItemStack;
-
getPreviewInputs
- Specified by:
getPreviewInputs
in interfaceRecipe<CraftingInventory>
- Mappings:
Namespace Name Mixin selector official a
Lbqn;a()Lgj;
intermediary method_8117
Lnet/minecraft/class_1860;method_8117()Lnet/minecraft/class_2371;
named getPreviewInputs
Lnet/minecraft/recipe/Recipe;getPreviewInputs()Lnet/minecraft/util/collection/DefaultedList;
-
fits
- Specified by:
fits
in interfaceRecipe<CraftingInventory>
- Mappings:
Namespace Name Mixin selector official a
Lbqn;a(II)Z
intermediary method_8113
Lnet/minecraft/class_1860;method_8113(II)Z
named fits
Lnet/minecraft/recipe/Recipe;fits(II)Z
-
matches
- Specified by:
matches
in interfaceRecipe<CraftingInventory>
- Mappings:
Namespace Name Mixin selector official a
Lbqs;a(Lbke;Lbtv;)Z
intermediary method_17728
Lnet/minecraft/class_1869;method_17728(Lnet/minecraft/class_1715;Lnet/minecraft/class_1937;)Z
named matches
Lnet/minecraft/recipe/ShapedRecipe;matches(Lnet/minecraft/inventory/CraftingInventory;Lnet/minecraft/world/World;)Z
-
matchesSmall
- Mappings:
Namespace Name Mixin selector official a
Lbqs;a(Lbke;IIZ)Z
intermediary method_8161
Lnet/minecraft/class_1869;method_8161(Lnet/minecraft/class_1715;IIZ)Z
named matchesSmall
Lnet/minecraft/recipe/ShapedRecipe;matchesSmall(Lnet/minecraft/inventory/CraftingInventory;IIZ)Z
-
craft
- Specified by:
craft
in interfaceRecipe<CraftingInventory>
- Mappings:
Namespace Name Mixin selector official a
Lbqs;a(Lbke;)Lbnv;
intermediary method_17727
Lnet/minecraft/class_1869;method_17727(Lnet/minecraft/class_1715;)Lnet/minecraft/class_1799;
named craft
Lnet/minecraft/recipe/ShapedRecipe;craft(Lnet/minecraft/inventory/CraftingInventory;)Lnet/minecraft/item/ItemStack;
-
getWidth
public int getWidth()- Mappings:
Namespace Name Mixin selector official j
Lbqs;j()I
intermediary method_8150
Lnet/minecraft/class_1869;method_8150()I
named getWidth
Lnet/minecraft/recipe/ShapedRecipe;getWidth()I
-
getHeight
public int getHeight()- Mappings:
Namespace Name Mixin selector official k
Lbqs;k()I
intermediary method_8158
Lnet/minecraft/class_1869;method_8158()I
named getHeight
Lnet/minecraft/recipe/ShapedRecipe;getHeight()I
-
getIngredients
private static DefaultedList<Ingredient> getIngredients(String[] pattern, Map<String,Ingredient> key, int width, int height)- Mappings:
Namespace Name Mixin selector official b
Lbqs;b([Ljava/lang/String;Ljava/util/Map;II)Lgj;
intermediary method_8148
Lnet/minecraft/class_1869;method_8148([Ljava/lang/String;Ljava/util/Map;II)Lnet/minecraft/class_2371;
named getIngredients
Lnet/minecraft/recipe/ShapedRecipe;getIngredients([Ljava/lang/String;Ljava/util/Map;II)Lnet/minecraft/util/collection/DefaultedList;
-
combinePattern
- Mappings:
Namespace Name Mixin selector official a
Lbqs;a([Ljava/lang/String;)[Ljava/lang/String;
intermediary method_8146
Lnet/minecraft/class_1869;method_8146([Ljava/lang/String;)[Ljava/lang/String;
named combinePattern
Lnet/minecraft/recipe/ShapedRecipe;combinePattern([Ljava/lang/String;)[Ljava/lang/String;
-
isEmpty
- Specified by:
isEmpty
in interfaceRecipe<CraftingInventory>
- Mappings:
Namespace Name Mixin selector official i
Lbqn;i()Z
intermediary method_31584
Lnet/minecraft/class_1860;method_31584()Z
named isEmpty
Lnet/minecraft/recipe/Recipe;isEmpty()Z
-
findNextIngredient
- Mappings:
Namespace Name Mixin selector official a
Lbqs;a(Ljava/lang/String;)I
intermediary method_8151
Lnet/minecraft/class_1869;method_8151(Ljava/lang/String;)I
named findNextIngredient
Lnet/minecraft/recipe/ShapedRecipe;findNextIngredient(Ljava/lang/String;)I
-
findNextIngredientReverse
- Mappings:
Namespace Name Mixin selector official b
Lbqs;b(Ljava/lang/String;)I
intermediary method_8153
Lnet/minecraft/class_1869;method_8153(Ljava/lang/String;)I
named findNextIngredientReverse
Lnet/minecraft/recipe/ShapedRecipe;findNextIngredientReverse(Ljava/lang/String;)I
-
getPattern
- Mappings:
Namespace Name Mixin selector official b
Lbqs;b(Lcom/google/gson/JsonArray;)[Ljava/lang/String;
intermediary method_8145
Lnet/minecraft/class_1869;method_8145(Lcom/google/gson/JsonArray;)[Ljava/lang/String;
named getPattern
Lnet/minecraft/recipe/ShapedRecipe;getPattern(Lcom/google/gson/JsonArray;)[Ljava/lang/String;
-
getComponents
- Mappings:
Namespace Name Mixin selector official c
Lbqs;c(Lcom/google/gson/JsonObject;)Ljava/util/Map;
intermediary method_8157
Lnet/minecraft/class_1869;method_8157(Lcom/google/gson/JsonObject;)Ljava/util/Map;
named getComponents
Lnet/minecraft/recipe/ShapedRecipe;getComponents(Lcom/google/gson/JsonObject;)Ljava/util/Map;
-
getItemStack
- Mappings:
Namespace Name Mixin selector official a
Lbqs;a(Lcom/google/gson/JsonObject;)Lbnv;
intermediary method_8155
Lnet/minecraft/class_1869;method_8155(Lcom/google/gson/JsonObject;)Lnet/minecraft/class_1799;
named getItemStack
Lnet/minecraft/recipe/ShapedRecipe;getItemStack(Lcom/google/gson/JsonObject;)Lnet/minecraft/item/ItemStack;
-