Record Class ItemAttributeModifierEvent.ItemAttributeModifiersBuilder.Key
java.lang.Object
java.lang.Record
net.neoforged.neoforge.event.ItemAttributeModifierEvent.ItemAttributeModifiersBuilder.Key
- Enclosing class:
ItemAttributeModifierEvent.ItemAttributeModifiersBuilder
private static record ItemAttributeModifierEvent.ItemAttributeModifiersBuilder.Key(Holder<Attribute> attr, Identifier id)
extends Record
Internal key class. Attribute modifiers are unique by id for each Attribute.
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe field for theattrrecord component.private final IdentifierThe field for theidrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateKey(Holder<Attribute> attr, Identifier id) Creates an instance of aKeyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionattr()Returns the value of theattrrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
attr
-
id
The field for theidrecord component.
-
-
Constructor Details
-
Key
Creates an instance of aKeyrecord class.- Parameters:
attr- the value for theattrrecord componentid- the value for theidrecord 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). -
attr
-
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-