Package net.minecraft.recipe
Record Class RawShapedRecipe
java.lang.Object
java.lang.Record
net.minecraft.recipe.RawShapedRecipe
- Record Components:
width
-height
-ingredients
-data
-
public record RawShapedRecipe(int width, int height, DefaultedList<Ingredient> ingredients, Optional<RawShapedRecipe.Data> data)
extends Record
- Mappings:
Namespace Name named net/minecraft/recipe/RawShapedRecipe
intermediary net/minecraft/class_8957
official cze
named width
intermediary comp_2081
official c
named height
intermediary comp_2082
official d
named ingredients
intermediary comp_2083
official e
named data
intermediary comp_2084
official f
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec
<RawShapedRecipe> private final Optional
<RawShapedRecipe.Data> The field for thedata
record component.private final int
The field for theheight
record component.private final DefaultedList
<Ingredient> The field for theingredients
record component.private static final int
static final PacketCodec
<RegistryByteBuf, RawShapedRecipe> private final int
The field for thewidth
record component. -
Constructor Summary
ConstructorDescriptionRawShapedRecipe
(int int2, int int3, DefaultedList<Ingredient> defaultedList, Optional<RawShapedRecipe.Data> optional) -
Method Summary
Modifier and TypeMethodDescriptionstatic RawShapedRecipe
create
(Map<Character, Ingredient> key, String[] pattern) static RawShapedRecipe
data()
Returns the value of thedata
record component.final boolean
Indicates whether some other object is "equal to" this one.private static int
findFirstSymbol
(String line) private static int
findLastSymbol
(String line) private static com.mojang.serialization.DataResult
<RawShapedRecipe> fromData
(RawShapedRecipe.Data data) final int
hashCode()
Returns a hash code value for this object.int
height()
Returns the value of theheight
record component.Returns the value of theingredients
record component.boolean
matches
(RecipeInputInventory inventory) private boolean
matches
(RecipeInputInventory inventory, int offsetX, int offsetY, boolean flipped) private static RawShapedRecipe
(package private) static String[]
removePadding
(List<String> pattern) Removes empty space from around the recipe pattern.final String
toString()
Returns a string representation of this record class.int
width()
Returns the value of thewidth
record component.private void
-
Field Details
-
width
private final int widthThe field for thewidth
record component. -
height
private final int heightThe field for theheight
record component. -
ingredients
The field for theingredients
record component. -
data
The field for thedata
record component. -
MAX_WIDTH_AND_HEIGHT
private static final int MAX_WIDTH_AND_HEIGHT- See Also:
- Mappings:
Namespace Name Mixin selector named MAX_WIDTH_AND_HEIGHT
Lnet/minecraft/recipe/RawShapedRecipe;MAX_WIDTH_AND_HEIGHT:I
intermediary field_47322
Lnet/minecraft/class_8957;field_47322:I
official g
Lcze;g:I
-
CODEC
- Mappings:
Namespace Name Mixin selector named CODEC
Lnet/minecraft/recipe/RawShapedRecipe;CODEC:Lcom/mojang/serialization/MapCodec;
intermediary field_47321
Lnet/minecraft/class_8957;field_47321:Lcom/mojang/serialization/MapCodec;
official a
Lcze;a:Lcom/mojang/serialization/MapCodec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODEC
Lnet/minecraft/recipe/RawShapedRecipe;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
intermediary field_48359
Lnet/minecraft/class_8957;field_48359:Lnet/minecraft/class_9139;
official b
Lcze;b:Lzn;
-
-
Constructor Details
-
RawShapedRecipe
public RawShapedRecipe(int int2, int int3, DefaultedList<Ingredient> defaultedList, Optional<RawShapedRecipe.Data> optional)
-
-
Method Details
-
create
- Mappings:
Namespace Name Mixin selector named create
Lnet/minecraft/recipe/RawShapedRecipe;create(Ljava/util/Map;[Ljava/lang/String;)Lnet/minecraft/recipe/RawShapedRecipe;
intermediary method_55086
Lnet/minecraft/class_8957;method_55086(Ljava/util/Map;[Ljava/lang/String;)Lnet/minecraft/class_8957;
official a
Lcze;a(Ljava/util/Map;[Ljava/lang/String;)Lcze;
-
create
- Mappings:
Namespace Name Mixin selector named create
Lnet/minecraft/recipe/RawShapedRecipe;create(Ljava/util/Map;Ljava/util/List;)Lnet/minecraft/recipe/RawShapedRecipe;
intermediary method_55085
Lnet/minecraft/class_8957;method_55085(Ljava/util/Map;Ljava/util/List;)Lnet/minecraft/class_8957;
official a
Lcze;a(Ljava/util/Map;Ljava/util/List;)Lcze;
-
fromData
private static com.mojang.serialization.DataResult<RawShapedRecipe> fromData(RawShapedRecipe.Data data) - Mappings:
Namespace Name Mixin selector named fromData
Lnet/minecraft/recipe/RawShapedRecipe;fromData(Lnet/minecraft/recipe/RawShapedRecipe$Data;)Lcom/mojang/serialization/DataResult;
intermediary method_55080
Lnet/minecraft/class_8957;method_55080(Lnet/minecraft/class_8957$class_8958;)Lcom/mojang/serialization/DataResult;
official a
Lcze;a(Lcze$a;)Lcom/mojang/serialization/DataResult;
-
removePadding
Removes empty space from around the recipe pattern.Turns patterns such as:
" o" " a" " "
"o" "a"
- Returns:
- a new recipe pattern with all leading and trailing empty rows/columns removed
- Mappings:
Namespace Name Mixin selector named removePadding
Lnet/minecraft/recipe/RawShapedRecipe;removePadding(Ljava/util/List;)[Ljava/lang/String;
intermediary method_55084
Lnet/minecraft/class_8957;method_55084(Ljava/util/List;)[Ljava/lang/String;
official a
Lcze;a(Ljava/util/List;)[Ljava/lang/String;
-
findFirstSymbol
- Mappings:
Namespace Name Mixin selector named findFirstSymbol
Lnet/minecraft/recipe/RawShapedRecipe;findFirstSymbol(Ljava/lang/String;)I
intermediary method_55083
Lnet/minecraft/class_8957;method_55083(Ljava/lang/String;)I
official a
Lcze;a(Ljava/lang/String;)I
-
findLastSymbol
- Mappings:
Namespace Name Mixin selector named findLastSymbol
Lnet/minecraft/recipe/RawShapedRecipe;findLastSymbol(Ljava/lang/String;)I
intermediary method_55089
Lnet/minecraft/class_8957;method_55089(Ljava/lang/String;)I
official b
Lcze;b(Ljava/lang/String;)I
-
matches
- Mappings:
Namespace Name Mixin selector named matches
Lnet/minecraft/recipe/RawShapedRecipe;matches(Lnet/minecraft/inventory/RecipeInputInventory;)Z
intermediary method_55078
Lnet/minecraft/class_8957;method_55078(Lnet/minecraft/class_8566;)Z
official a
Lcze;a(Lcql;)Z
-
matches
- Mappings:
Namespace Name Mixin selector named matches
Lnet/minecraft/recipe/RawShapedRecipe;matches(Lnet/minecraft/inventory/RecipeInputInventory;IIZ)Z
intermediary method_55079
Lnet/minecraft/class_8957;method_55079(Lnet/minecraft/class_8566;IIZ)Z
official a
Lcze;a(Lcql;IIZ)Z
-
writeToBuf
- Mappings:
Namespace Name Mixin selector named writeToBuf
Lnet/minecraft/recipe/RawShapedRecipe;writeToBuf(Lnet/minecraft/network/RegistryByteBuf;)V
intermediary method_55087
Lnet/minecraft/class_8957;method_55087(Lnet/minecraft/class_9129;)V
official a
Lcze;a(Lxa;)V
-
readFromBuf
- Mappings:
Namespace Name Mixin selector named readFromBuf
Lnet/minecraft/recipe/RawShapedRecipe;readFromBuf(Lnet/minecraft/network/RegistryByteBuf;)Lnet/minecraft/recipe/RawShapedRecipe;
intermediary method_55090
Lnet/minecraft/class_8957;method_55090(Lnet/minecraft/class_9129;)Lnet/minecraft/class_8957;
official b
Lcze;b(Lxa;)Lcze;
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
width
public int width()Returns the value of thewidth
record component.- Returns:
- the value of the
width
record component
-
height
public int height()Returns the value of theheight
record component.- Returns:
- the value of the
height
record component
-
ingredients
Returns the value of theingredients
record component.- Returns:
- the value of the
ingredients
record component
-
data
Returns the value of thedata
record component.- Returns:
- the value of the
data
record component
-