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/RawShapedRecipeintermediary net/minecraft/class_8957official czfnamed widthintermediary comp_2081official cnamed heightintermediary comp_2082official dnamed ingredientsintermediary comp_2083official enamed dataintermediary comp_2084official f
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<RawShapedRecipe> private final Optional<RawShapedRecipe.Data> The field for thedatarecord component.private final intThe field for theheightrecord component.private final DefaultedList<Ingredient> The field for theingredientsrecord component.private static final intstatic final PacketCodec<RegistryByteBuf, RawShapedRecipe> private final intThe field for thewidthrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionRawShapedRecipe(int int2, int int3, DefaultedList<Ingredient> defaultedList, Optional<RawShapedRecipe.Data> optional) -
Method Summary
Modifier and TypeMethodDescriptionstatic RawShapedRecipecreate(Map<Character, Ingredient> key, String[] pattern) static RawShapedRecipedata()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.private static intfindFirstSymbol(String line) private static intfindLastSymbol(String line) private static com.mojang.serialization.DataResult<RawShapedRecipe> fromData(RawShapedRecipe.Data data) final inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.Returns the value of theingredientsrecord component.booleanmatches(RecipeInputInventory inventory) private booleanmatches(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 StringtoString()Returns a string representation of this record class.intwidth()Returns the value of thewidthrecord component.private void
-
Field Details
-
width
private final int widthThe field for thewidthrecord component. -
height
private final int heightThe field for theheightrecord component. -
ingredients
The field for theingredientsrecord component. -
data
The field for thedatarecord component. -
MAX_WIDTH_AND_HEIGHT
private static final int MAX_WIDTH_AND_HEIGHT- See Also:
- Mappings:
Namespace Name Mixin selector named MAX_WIDTH_AND_HEIGHTLnet/minecraft/recipe/RawShapedRecipe;MAX_WIDTH_AND_HEIGHT:Iintermediary field_47322Lnet/minecraft/class_8957;field_47322:Iofficial gLczf;g:I
-
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/recipe/RawShapedRecipe;CODEC:Lcom/mojang/serialization/MapCodec;intermediary field_47321Lnet/minecraft/class_8957;field_47321:Lcom/mojang/serialization/MapCodec;official aLczf;a:Lcom/mojang/serialization/MapCodec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/recipe/RawShapedRecipe;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_48359Lnet/minecraft/class_8957;field_48359:Lnet/minecraft/class_9139;official bLczf;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 createLnet/minecraft/recipe/RawShapedRecipe;create(Ljava/util/Map;[Ljava/lang/String;)Lnet/minecraft/recipe/RawShapedRecipe;intermediary method_55086Lnet/minecraft/class_8957;method_55086(Ljava/util/Map;[Ljava/lang/String;)Lnet/minecraft/class_8957;official aLczf;a(Ljava/util/Map;[Ljava/lang/String;)Lczf;
-
create
- Mappings:
Namespace Name Mixin selector named createLnet/minecraft/recipe/RawShapedRecipe;create(Ljava/util/Map;Ljava/util/List;)Lnet/minecraft/recipe/RawShapedRecipe;intermediary method_55085Lnet/minecraft/class_8957;method_55085(Ljava/util/Map;Ljava/util/List;)Lnet/minecraft/class_8957;official aLczf;a(Ljava/util/Map;Ljava/util/List;)Lczf;
-
fromData
private static com.mojang.serialization.DataResult<RawShapedRecipe> fromData(RawShapedRecipe.Data data) - Mappings:
Namespace Name Mixin selector named fromDataLnet/minecraft/recipe/RawShapedRecipe;fromData(Lnet/minecraft/recipe/RawShapedRecipe$Data;)Lcom/mojang/serialization/DataResult;intermediary method_55080Lnet/minecraft/class_8957;method_55080(Lnet/minecraft/class_8957$class_8958;)Lcom/mojang/serialization/DataResult;official aLczf;a(Lczf$a;)Lcom/mojang/serialization/DataResult;
-
removePadding
Removes empty space from around the recipe pattern.Turns patterns such as:
Into:" o" " a" " ""o" "a"- Returns:
- a new recipe pattern with all leading and trailing empty rows/columns removed
- Mappings:
Namespace Name Mixin selector named removePaddingLnet/minecraft/recipe/RawShapedRecipe;removePadding(Ljava/util/List;)[Ljava/lang/String;intermediary method_55084Lnet/minecraft/class_8957;method_55084(Ljava/util/List;)[Ljava/lang/String;official aLczf;a(Ljava/util/List;)[Ljava/lang/String;
-
findFirstSymbol
- Mappings:
Namespace Name Mixin selector named findFirstSymbolLnet/minecraft/recipe/RawShapedRecipe;findFirstSymbol(Ljava/lang/String;)Iintermediary method_55083Lnet/minecraft/class_8957;method_55083(Ljava/lang/String;)Iofficial aLczf;a(Ljava/lang/String;)I
-
findLastSymbol
- Mappings:
Namespace Name Mixin selector named findLastSymbolLnet/minecraft/recipe/RawShapedRecipe;findLastSymbol(Ljava/lang/String;)Iintermediary method_55089Lnet/minecraft/class_8957;method_55089(Ljava/lang/String;)Iofficial bLczf;b(Ljava/lang/String;)I
-
matches
- Mappings:
Namespace Name Mixin selector named matchesLnet/minecraft/recipe/RawShapedRecipe;matches(Lnet/minecraft/inventory/RecipeInputInventory;)Zintermediary method_55078Lnet/minecraft/class_8957;method_55078(Lnet/minecraft/class_8566;)Zofficial aLczf;a(Lcqm;)Z
-
matches
- Mappings:
Namespace Name Mixin selector named matchesLnet/minecraft/recipe/RawShapedRecipe;matches(Lnet/minecraft/inventory/RecipeInputInventory;IIZ)Zintermediary method_55079Lnet/minecraft/class_8957;method_55079(Lnet/minecraft/class_8566;IIZ)Zofficial aLczf;a(Lcqm;IIZ)Z
-
writeToBuf
- Mappings:
Namespace Name Mixin selector named writeToBufLnet/minecraft/recipe/RawShapedRecipe;writeToBuf(Lnet/minecraft/network/RegistryByteBuf;)Vintermediary method_55087Lnet/minecraft/class_8957;method_55087(Lnet/minecraft/class_9129;)Vofficial aLczf;a(Lxa;)V
-
readFromBuf
- Mappings:
Namespace Name Mixin selector named readFromBufLnet/minecraft/recipe/RawShapedRecipe;readFromBuf(Lnet/minecraft/network/RegistryByteBuf;)Lnet/minecraft/recipe/RawShapedRecipe;intermediary method_55090Lnet/minecraft/class_8957;method_55090(Lnet/minecraft/class_9129;)Lnet/minecraft/class_8957;official bLczf;b(Lxa;)Lczf;
-
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 thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
height
public int height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
ingredients
Returns the value of theingredientsrecord component.- Returns:
- the value of the
ingredientsrecord component
-
data
Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-