Record Class SulfurCubeArchetype.AttributeEntry
java.lang.Object
java.lang.Record
net.minecraft.world.entity.SulfurCubeArchetype.AttributeEntry
- Enclosing class:
SulfurCubeArchetype
public static record SulfurCubeArchetype.AttributeEntry(Holder<Attribute> attribute, AttributeModifier modifier)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe field for theattributerecord component.static final com.mojang.serialization.Codec<SulfurCubeArchetype.AttributeEntry> private final AttributeModifierThe field for themodifierrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionAttributeEntry(Holder<Attribute> attribute, AttributeModifier modifier) Creates an instance of aAttributeEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionadd(Holder<Attribute> attribute, double amount, ResourceKey<SulfurCubeArchetype> archetype) Returns the value of theattributerecord 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.multiply(Holder<Attribute> attribute, double amount, ResourceKey<SulfurCubeArchetype> archetype) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
attribute
-
modifier
The field for themodifierrecord component. -
CODEC
-
-
Constructor Details
-
AttributeEntry
Creates an instance of aAttributeEntryrecord class.- Parameters:
attribute- the value for theattributerecord componentmodifier- the value for themodifierrecord component
-
-
Method Details
-
add
public static SulfurCubeArchetype.AttributeEntry add(Holder<Attribute> attribute, double amount, ResourceKey<SulfurCubeArchetype> archetype) -
multiply
public static SulfurCubeArchetype.AttributeEntry multiply(Holder<Attribute> attribute, double amount, ResourceKey<SulfurCubeArchetype> archetype) -
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
-
modifier
Returns the value of themodifierrecord component.- Returns:
- the value of the
modifierrecord component
-