Record Class AccessoryAttributeModifiers.Entry
java.lang.Object
java.lang.Record
com.stereowalker.unionlib.world.item.component.AccessoryAttributeModifiers.Entry
- Enclosing class:
AccessoryAttributeModifiers
public static record AccessoryAttributeModifiers.Entry(net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute> attribute, net.minecraft.world.entity.ai.attributes.AttributeModifier modifier, AccessorySlotGroup slot)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<AccessoryAttributeModifiers.Entry> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, AccessoryAttributeModifiers.Entry> -
Constructor Summary
ConstructorsConstructorDescriptionEntry(net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute> attribute, net.minecraft.world.entity.ai.attributes.AttributeModifier modifier, AccessorySlotGroup slot) Creates an instance of aEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute> 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.net.minecraft.world.entity.ai.attributes.AttributeModifiermodifier()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
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,AccessoryAttributeModifiers.Entry> STREAM_CODEC
-
-
Constructor Details
-
Entry
public Entry(net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute> attribute, net.minecraft.world.entity.ai.attributes.AttributeModifier modifier, AccessorySlotGroup slot) Creates an instance of aEntryrecord class.- Parameters:
attribute- the value for theattributerecord componentmodifier- the value for themodifierrecord componentslot- the value for theslotrecord 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). -
attribute
public net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute> attribute()Returns the value of theattributerecord component.- Returns:
- the value of the
attributerecord component
-
modifier
public net.minecraft.world.entity.ai.attributes.AttributeModifier 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
-