Record Class AttributeList.Modifier
java.lang.Object
java.lang.Record
net.minestom.server.item.component.AttributeList.Modifier
- Enclosing class:
AttributeList
public static record AttributeList.Modifier(Attribute attribute, AttributeModifier modifier, EquipmentSlotGroup slot, AttributeList.Display display)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<AttributeList.Modifier> static final NetworkBuffer.Type<AttributeList.Modifier> -
Constructor Summary
ConstructorsConstructorDescriptionModifier(Attribute attribute, AttributeModifier modifier, EquipmentSlotGroup slot) Modifier(Attribute attribute, AttributeModifier modifier, EquipmentSlotGroup slot, AttributeList.Display display) Creates an instance of aModifierrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattributerecord component.display()Returns the value of thedisplayrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.modifier()Returns the value of themodifierrecord component.slot()Returns the value of theslotrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
NETWORK_TYPE
-
CODEC
-
-
Constructor Details
-
Modifier
-
Modifier
public Modifier(Attribute attribute, AttributeModifier modifier, EquipmentSlotGroup slot, AttributeList.Display display) Creates an instance of aModifierrecord class.- Parameters:
attribute- the value for theattributerecord componentmodifier- the value for themodifierrecord componentslot- the value for theslotrecord componentdisplay- the value for thedisplayrecord component
-
-
Method Details
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
attribute
Returns the value of theattributerecord component.- Returns:
- the value of the
attributerecord component
-
modifier
Returns the value of themodifierrecord component.- Returns:
- the value of the
modifierrecord component
-
slot
Returns the value of theslotrecord component.- Returns:
- the value of the
slotrecord component
-
display
Returns the value of thedisplayrecord component.- Returns:
- the value of the
displayrecord component
-