Record Class ContextEntityType
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.item.properties.select.ContextEntityType
- All Implemented Interfaces:
SelectItemModelProperty<ResourceKey<EntityType<?>>>
public record ContextEntityType()
extends Record
implements SelectItemModelProperty<ResourceKey<EntityType<?>>>
-
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<ContextEntityType, ResourceKey<EntityType<?>>> static final com.mojang.serialization.Codec<ResourceKey<EntityType<?>>> -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aContextEntityTyperecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.get(ItemStack p_390525_, ClientLevel p_390442_, LivingEntity p_390437_, int p_390427_, ItemDisplayContext p_390397_) 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<ResourceKey<EntityType<?>>>
-
Field Details
-
VALUE_CODEC
-
TYPE
-
-
Constructor Details
-
ContextEntityType
public ContextEntityType()Creates an instance of aContextEntityTyperecord class.
-
-
Method Details
-
get
@Nullable public ResourceKey<EntityType<?>> get(ItemStack p_390525_, @Nullable ClientLevel p_390442_, @Nullable LivingEntity p_390437_, int p_390427_, ItemDisplayContext p_390397_) - Specified by:
getin interfaceSelectItemModelProperty<ResourceKey<EntityType<?>>>
-
type
- Specified by:
typein interfaceSelectItemModelProperty<ResourceKey<EntityType<?>>>
-
valueCodec
- Specified by:
valueCodecin interfaceSelectItemModelProperty<ResourceKey<EntityType<?>>>
-
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.
-