Record Class CustomRenderOffsets
java.lang.Object
java.lang.Record
org.geysermc.geyser.api.item.custom.CustomRenderOffsets
public record CustomRenderOffsets(@Nullable CustomRenderOffsets.Hand mainHand, @Nullable CustomRenderOffsets.Hand offhand)
extends Record
This class is used to store the render offsets of custom items.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordThe hand that is used for the offset.static final recordThe offset of the item.static final recordX, Y and Z positions for the offset. -
Constructor Summary
ConstructorsConstructorDescriptionCustomRenderOffsets(@Nullable CustomRenderOffsets.Hand mainHand, @Nullable CustomRenderOffsets.Hand offhand) Creates an instance of aCustomRenderOffsetsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable CustomRenderOffsets.HandmainHand()Returns the value of themainHandrecord component.@Nullable CustomRenderOffsets.Handoffhand()Returns the value of theoffhandrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CustomRenderOffsets
public CustomRenderOffsets(@Nullable CustomRenderOffsets.Hand mainHand, @Nullable CustomRenderOffsets.Hand offhand) Creates an instance of aCustomRenderOffsetsrecord class.- Parameters:
mainHand- the value for themainHandrecord componentoffhand- the value for theoffhandrecord 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 withObjects::equals(Object,Object). -
mainHand
Returns the value of themainHandrecord component.- Returns:
- the value of the
mainHandrecord component
-
offhand
Returns the value of theoffhandrecord component.- Returns:
- the value of the
offhandrecord component
-