Record Class ClientItem.Properties
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.item.ClientItem.Properties
- Enclosing class:
ClientItem
public static record ClientItem.Properties(boolean handAnimationOnSwap, boolean oversizedInGui, float swapAnimationScale)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ClientItem.Propertiesprivate final booleanThe field for thehandAnimationOnSwaprecord component.static final com.mojang.serialization.MapCodec<ClientItem.Properties> private final booleanThe field for theoversizedInGuirecord component.private final floatThe field for theswapAnimationScalerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionProperties(boolean handAnimationOnSwap, boolean oversizedInGui, float swapAnimationScale) Creates an instance of aPropertiesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thehandAnimationOnSwaprecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theoversizedInGuirecord component.floatReturns the value of theswapAnimationScalerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
handAnimationOnSwap
private final boolean handAnimationOnSwapThe field for thehandAnimationOnSwaprecord component. -
oversizedInGui
private final boolean oversizedInGuiThe field for theoversizedInGuirecord component. -
swapAnimationScale
private final float swapAnimationScaleThe field for theswapAnimationScalerecord component. -
DEFAULT
-
MAP_CODEC
-
-
Constructor Details
-
Properties
public Properties(boolean handAnimationOnSwap, boolean oversizedInGui, float swapAnimationScale) Creates an instance of aPropertiesrecord class.- Parameters:
handAnimationOnSwap- the value for thehandAnimationOnSwaprecord componentoversizedInGui- the value for theoversizedInGuirecord componentswapAnimationScale- the value for theswapAnimationScalerecord component
-
-
Method Details
-
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 with '=='. -
handAnimationOnSwap
public boolean handAnimationOnSwap()Returns the value of thehandAnimationOnSwaprecord component.- Returns:
- the value of the
handAnimationOnSwaprecord component
-
oversizedInGui
public boolean oversizedInGui()Returns the value of theoversizedInGuirecord component.- Returns:
- the value of the
oversizedInGuirecord component
-
swapAnimationScale
public float swapAnimationScale()Returns the value of theswapAnimationScalerecord component.- Returns:
- the value of the
swapAnimationScalerecord component
-