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 SelectItemModelProperty
SelectItemModelProperty.Type<P,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 booleanIndicates whether some other object is "equal to" this one.get(ItemStack itemStack, @Nullable ClientLevel level, @Nullable LivingEntity owner, int seed, ItemDisplayContext displayContext) final inthashCode()Returns a hash code value for this object.final StringtoString()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 aDisplayContextrecord class.
-
-
Method Details
-
get
public ItemDisplayContext get(ItemStack itemStack, @Nullable ClientLevel level, @Nullable LivingEntity owner, int seed, ItemDisplayContext displayContext) - Specified by:
getin interfaceSelectItemModelProperty<ItemDisplayContext>
-
type
- Specified by:
typein interfaceSelectItemModelProperty<ItemDisplayContext>
-
valueCodec
- Specified by:
valueCodecin interfaceSelectItemModelProperty<ItemDisplayContext>
-
toString
-
hashCode
-
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.
-