Record Class DisplayContext
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.item.properties.select.DisplayContext
- All Implemented Interfaces:
SelectItemModelProperty<ItemDisplayContext>
public record DisplayContext()
extends Record
implements SelectItemModelProperty<ItemDisplayContext>
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.renderer.item.properties.select.SelectItemModelProperty
SelectItemModelProperty.Type<P extends SelectItemModelProperty<T>,
T> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SelectItemModelProperty.Type
<DisplayContext, ItemDisplayContext> static final com.mojang.serialization.Codec
<ItemDisplayContext> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.get
(ItemStack p_388079_, ClientLevel p_388467_, LivingEntity p_388500_, int p_388313_, ItemDisplayContext p_387120_) final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.type()
com.mojang.serialization.Codec
<ItemDisplayContext>
-
Field Details
-
VALUE_CODEC
-
TYPE
-
-
Constructor Details
-
DisplayContext
public DisplayContext()Creates an instance of aDisplayContext
record class.
-
-
Method Details
-
get
public ItemDisplayContext get(ItemStack p_388079_, @Nullable ClientLevel p_388467_, @Nullable LivingEntity p_388500_, int p_388313_, ItemDisplayContext p_387120_) - Specified by:
get
in interfaceSelectItemModelProperty<ItemDisplayContext>
-
type
- Specified by:
type
in interfaceSelectItemModelProperty<ItemDisplayContext>
-
valueCodec
- Specified by:
valueCodec
in interfaceSelectItemModelProperty<ItemDisplayContext>
-
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.
-