Record Class ShapelessCraftingRecipeDisplay
java.lang.Object
java.lang.Record
net.minecraft.world.item.crafting.display.ShapelessCraftingRecipeDisplay
- All Implemented Interfaces:
RecipeDisplay
public record ShapelessCraftingRecipeDisplay(List<SlotDisplay> ingredients, SlotDisplay result, SlotDisplay craftingStation)
extends Record
implements RecipeDisplay
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.world.item.crafting.display.RecipeDisplay
RecipeDisplay.Type<T extends RecipeDisplay>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SlotDisplay
The field for thecraftingStation
record component.private final List
<SlotDisplay> The field for theingredients
record component.static final com.mojang.serialization.MapCodec
<ShapelessCraftingRecipeDisplay> private final SlotDisplay
The field for theresult
record component.static final StreamCodec
<RegistryFriendlyByteBuf, ShapelessCraftingRecipeDisplay> static final RecipeDisplay.Type
<ShapelessCraftingRecipeDisplay> Fields inherited from interface net.minecraft.world.item.crafting.display.RecipeDisplay
CODEC
-
Constructor Summary
ConstructorsConstructorDescriptionShapelessCraftingRecipeDisplay
(List<SlotDisplay> ingredients, SlotDisplay result, SlotDisplay craftingStation) Creates an instance of aShapelessCraftingRecipeDisplay
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecraftingStation
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of theingredients
record component.boolean
isEnabled
(FeatureFlagSet p_379824_) result()
Returns the value of theresult
record component.final String
toString()
Returns a string representation of this record class.type()
-
Field Details
-
ingredients
The field for theingredients
record component. -
result
The field for theresult
record component. -
craftingStation
The field for thecraftingStation
record component. -
MAP_CODEC
-
STREAM_CODEC
public static final StreamCodec<RegistryFriendlyByteBuf,ShapelessCraftingRecipeDisplay> STREAM_CODEC -
TYPE
-
-
Constructor Details
-
ShapelessCraftingRecipeDisplay
public ShapelessCraftingRecipeDisplay(List<SlotDisplay> ingredients, SlotDisplay result, SlotDisplay craftingStation) Creates an instance of aShapelessCraftingRecipeDisplay
record class.- Parameters:
ingredients
- the value for theingredients
record componentresult
- the value for theresult
record componentcraftingStation
- the value for thecraftingStation
record component
-
-
Method Details
-
type
- Specified by:
type
in interfaceRecipeDisplay
-
isEnabled
- Specified by:
isEnabled
in interfaceRecipeDisplay
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
ingredients
Returns the value of theingredients
record component.- Returns:
- the value of the
ingredients
record component
-
result
Returns the value of theresult
record component.- Specified by:
result
in interfaceRecipeDisplay
- Returns:
- the value of the
result
record component
-
craftingStation
Returns the value of thecraftingStation
record component.- Specified by:
craftingStation
in interfaceRecipeDisplay
- Returns:
- the value of the
craftingStation
record component
-