Record Class Charge
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.item.properties.select.Charge
- All Implemented Interfaces:
SelectItemModelProperty<CrossbowItem.ChargeType>
-
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
<Charge, CrossbowItem.ChargeType> static final com.mojang.serialization.Codec
<CrossbowItem.ChargeType> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.get
(ItemStack p_387321_, ClientLevel p_387482_, LivingEntity p_387912_, int p_387536_, ItemDisplayContext p_387489_) 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
<CrossbowItem.ChargeType>
-
Field Details
-
VALUE_CODEC
-
TYPE
-
-
Constructor Details
-
Charge
public Charge()Creates an instance of aCharge
record class.
-
-
Method Details
-
get
public CrossbowItem.ChargeType get(ItemStack p_387321_, @Nullable ClientLevel p_387482_, @Nullable LivingEntity p_387912_, int p_387536_, ItemDisplayContext p_387489_) - Specified by:
get
in interfaceSelectItemModelProperty<CrossbowItem.ChargeType>
-
type
- Specified by:
type
in interfaceSelectItemModelProperty<CrossbowItem.ChargeType>
-
valueCodec
- Specified by:
valueCodec
in interfaceSelectItemModelProperty<CrossbowItem.ChargeType>
-
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.
-