Record Class AccessoryAttributeModifiers
java.lang.Object
java.lang.Record
com.stereowalker.unionlib.world.item.component.AccessoryAttributeModifiers
public record AccessoryAttributeModifiers(List<AccessoryAttributeModifiers.Entry> modifiers, boolean showInTooltip)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic final record -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DecimalFormatstatic final com.mojang.serialization.Codec<AccessoryAttributeModifiers> static final AccessoryAttributeModifiersstatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, AccessoryAttributeModifiers> -
Constructor Summary
ConstructorsConstructorDescriptionAccessoryAttributeModifiers(List<AccessoryAttributeModifiers.Entry> modifiers, boolean showInTooltip) Creates an instance of aAccessoryAttributeModifiersrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()doublecompute(double pBaseValue, AccessorySlot pEquipmentSlot) final booleanIndicates whether some other object is "equal to" this one.voidforEach(AccessorySlotGroup pEquipmentSlot, BiConsumer<net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute>, net.minecraft.world.entity.ai.attributes.AttributeModifier> pAction) voidforEach(AccessorySlot pEquipmentSlot, BiConsumer<net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute>, net.minecraft.world.entity.ai.attributes.AttributeModifier> pAction) final inthashCode()Returns a hash code value for this object.Returns the value of themodifiersrecord component.booleanReturns the value of theshowInTooltiprecord component.final StringtoString()Returns a string representation of this record class.withModifierAdded(net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute> pAttribute, net.minecraft.world.entity.ai.attributes.AttributeModifier pModifier, AccessorySlotGroup pSlot) withTooltip(boolean pShowInTooltip)
-
Field Details
-
EMPTY
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, AccessoryAttributeModifiers> STREAM_CODEC -
ATTRIBUTE_MODIFIER_FORMAT
-
-
Constructor Details
-
AccessoryAttributeModifiers
public AccessoryAttributeModifiers(List<AccessoryAttributeModifiers.Entry> modifiers, boolean showInTooltip) Creates an instance of aAccessoryAttributeModifiersrecord class.- Parameters:
modifiers- the value for themodifiersrecord componentshowInTooltip- the value for theshowInTooltiprecord component
-
-
Method Details
-
withTooltip
-
builder
-
withModifierAdded
public AccessoryAttributeModifiers withModifierAdded(net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute> pAttribute, net.minecraft.world.entity.ai.attributes.AttributeModifier pModifier, AccessorySlotGroup pSlot) -
forEach
public void forEach(AccessorySlot pEquipmentSlot, BiConsumer<net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute>, net.minecraft.world.entity.ai.attributes.AttributeModifier> pAction) -
forEach
public void forEach(AccessorySlotGroup pEquipmentSlot, BiConsumer<net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute>, net.minecraft.world.entity.ai.attributes.AttributeModifier> pAction) -
compute
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
modifiers
Returns the value of themodifiersrecord component.- Returns:
- the value of the
modifiersrecord component
-
showInTooltip
public boolean showInTooltip()Returns the value of theshowInTooltiprecord component.- Returns:
- the value of the
showInTooltiprecord component
-