Record Class ShapedRecipe.Serializer.RawShapedRecipe
java.lang.Object
java.lang.Record
net.minecraft.world.item.crafting.ShapedRecipe.Serializer.RawShapedRecipe
- Enclosing class:
ShapedRecipe.Serializer
static record ShapedRecipe.Serializer.RawShapedRecipe(String group, CraftingBookCategory category, Map<String,Ingredient> key, List<String> pattern, ItemStack result, boolean showNotification)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final CraftingBookCategory
The field for thecategory
record component.static final com.mojang.serialization.Codec<ShapedRecipe.Serializer.RawShapedRecipe>
private final String
The field for thegroup
record component.private final Map<String,
Ingredient> The field for thekey
record component.The field for thepattern
record component.private final ItemStack
The field for theresult
record component.private final boolean
The field for theshowNotification
record component. -
Constructor Summary
ConstructorDescriptionRawShapedRecipe
(String group, CraftingBookCategory category, Map<String, Ingredient> key, List<String> pattern, ItemStack result, boolean showNotification) Creates an instance of aRawShapedRecipe
record class. -
Method Summary
Modifier and TypeMethodDescriptioncategory()
Returns the value of thecategory
record component.final boolean
Indicates whether some other object is "equal to" this one.group()
Returns the value of thegroup
record component.final int
hashCode()
Returns a hash code value for this object.key()
Returns the value of thekey
record component.pattern()
Returns the value of thepattern
record component.result()
Returns the value of theresult
record component.boolean
Returns the value of theshowNotification
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
group
The field for thegroup
record component. -
category
The field for thecategory
record component. -
key
The field for thekey
record component. -
pattern
The field for thepattern
record component. -
result
The field for theresult
record component. -
showNotification
private final boolean showNotificationThe field for theshowNotification
record component. -
CODEC
-
-
Constructor Details
-
RawShapedRecipe
RawShapedRecipe(String group, CraftingBookCategory category, Map<String, Ingredient> key, List<String> pattern, ItemStack result, boolean showNotification) Creates an instance of aRawShapedRecipe
record class.- Parameters:
group
- the value for thegroup
record componentcategory
- the value for thecategory
record componentkey
- the value for thekey
record componentpattern
- the value for thepattern
record componentresult
- the value for theresult
record componentshowNotification
- the value for theshowNotification
record component
-
-
Method Details
-
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 '=='. -
group
Returns the value of thegroup
record component.- Returns:
- the value of the
group
record component
-
category
Returns the value of thecategory
record component.- Returns:
- the value of the
category
record component
-
key
Returns the value of thekey
record component.- Returns:
- the value of the
key
record component
-
pattern
Returns the value of thepattern
record component.- Returns:
- the value of the
pattern
record component
-
result
Returns the value of theresult
record component.- Returns:
- the value of the
result
record component
-
showNotification
public boolean showNotification()Returns the value of theshowNotification
record component.- Returns:
- the value of the
showNotification
record component
-