Class ShapedRecipePattern
java.lang.Object
net.minecraft.world.item.crafting.ShapedRecipePattern
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Optional
<ShapedRecipePattern.Data> private final int
private final int
private final NonNullList
<Ingredient> static final com.mojang.serialization.MapCodec
<ShapedRecipePattern> private static final int
static final StreamCodec
<RegistryFriendlyByteBuf, ShapedRecipePattern> private final boolean
private final int
-
Constructor Summary
ConstructorDescriptionShapedRecipePattern
(int p_309692_, int p_311724_, NonNullList<Ingredient> p_311160_, Optional<ShapedRecipePattern.Data> p_310645_) -
Method Summary
Modifier and TypeMethodDescriptiondata()
private static int
firstNonSpace
(String p_309836_) private static ShapedRecipePattern
fromNetwork
(RegistryFriendlyByteBuf p_332293_) int
height()
private static int
lastNonSpace
(String p_312853_) boolean
matches
(CraftingInput p_343130_) private boolean
matches
(CraftingInput p_345096_, boolean p_342488_) static ShapedRecipePattern
of
(Map<Character, Ingredient> p_310983_, String... p_310430_) static ShapedRecipePattern
(package private) static String[]
private void
toNetwork
(RegistryFriendlyByteBuf p_335258_) private static com.mojang.serialization.DataResult
<ShapedRecipePattern> unpack
(ShapedRecipePattern.Data p_312333_) int
width()
-
Field Details
-
MAX_SIZE
private static final int MAX_SIZE- See Also:
-
MAP_CODEC
-
STREAM_CODEC
-
width
private final int width -
height
private final int height -
ingredients
-
data
-
ingredientCount
private final int ingredientCount -
symmetrical
private final boolean symmetrical
-
-
Constructor Details
-
ShapedRecipePattern
public ShapedRecipePattern(int p_309692_, int p_311724_, NonNullList<Ingredient> p_311160_, Optional<ShapedRecipePattern.Data> p_310645_)
-
-
Method Details
-
of
-
of
-
unpack
private static com.mojang.serialization.DataResult<ShapedRecipePattern> unpack(ShapedRecipePattern.Data p_312333_) -
shrink
-
firstNonSpace
-
lastNonSpace
-
matches
-
matches
-
toNetwork
-
fromNetwork
-
width
public int width() -
height
public int height() -
ingredients
-
data
-