Package net.minecraft.component.type
Record Class AttributeModifiersComponent
java.lang.Object
java.lang.Record
net.minecraft.component.type.AttributeModifiersComponent
- Record Components:
modifiers-showInTooltip-
public record AttributeModifiersComponent(List<AttributeModifiersComponent.Entry> modifiers, boolean showInTooltip)
extends Record
- Mappings:
Namespace Name named net/minecraft/component/type/AttributeModifiersComponentintermediary net/minecraft/class_9285official czhnamed modifiersintermediary comp_2393official enamed showInTooltipintermediary comp_2394official f
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final com.mojang.serialization.Codec<AttributeModifiersComponent> static final com.mojang.serialization.Codec<AttributeModifiersComponent> static final DecimalFormatstatic final AttributeModifiersComponentprivate final List<AttributeModifiersComponent.Entry> The field for themodifiersrecord component.static final PacketCodec<RegistryByteBuf, AttributeModifiersComponent> private final booleanThe field for theshowInTooltiprecord component. -
Constructor Summary
ConstructorsConstructorDescriptionAttributeModifiersComponent(List<AttributeModifiersComponent.Entry> list, boolean bool) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyModifiers(AttributeModifierSlot slot, BiConsumer<RegistryEntry<EntityAttribute>, EntityAttributeModifier> attributeConsumer) voidapplyModifiers(EquipmentSlot slot, BiConsumer<RegistryEntry<EntityAttribute>, EntityAttributeModifier> attributeConsumer) doubleapplyOperations(double base, EquipmentSlot slot) builder()final booleanIndicates whether some other object is "equal to" this one.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.with(RegistryEntry<EntityAttribute> attribute, EntityAttributeModifier modifier, AttributeModifierSlot slot) withShowInTooltip(boolean showInTooltip)
-
Field Details
-
modifiers
The field for themodifiersrecord component. -
showInTooltip
private final boolean showInTooltipThe field for theshowInTooltiprecord component. -
DEFAULT
- Mappings:
Namespace Name Mixin selector named DEFAULTLnet/minecraft/component/type/AttributeModifiersComponent;DEFAULT:Lnet/minecraft/component/type/AttributeModifiersComponent;intermediary field_49326Lnet/minecraft/class_9285;field_49326:Lnet/minecraft/class_9285;official aLczh;a:Lczh;
-
BASE_CODEC
- Mappings:
Namespace Name Mixin selector named BASE_CODECLnet/minecraft/component/type/AttributeModifiersComponent;BASE_CODEC:Lcom/mojang/serialization/Codec;intermediary field_49751Lnet/minecraft/class_9285;field_49751:Lcom/mojang/serialization/Codec;official gLczh;g:Lcom/mojang/serialization/Codec;
-
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/component/type/AttributeModifiersComponent;CODEC:Lcom/mojang/serialization/Codec;intermediary field_49327Lnet/minecraft/class_9285;field_49327:Lcom/mojang/serialization/Codec;official bLczh;b:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/component/type/AttributeModifiersComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_49328Lnet/minecraft/class_9285;field_49328:Lnet/minecraft/class_9139;official cLczh;c:Lyn;
-
DECIMAL_FORMAT
- Mappings:
Namespace Name Mixin selector named DECIMAL_FORMATLnet/minecraft/component/type/AttributeModifiersComponent;DECIMAL_FORMAT:Ljava/text/DecimalFormat;intermediary field_49329Lnet/minecraft/class_9285;field_49329:Ljava/text/DecimalFormat;official dLczh;d:Ljava/text/DecimalFormat;
-
-
Constructor Details
-
AttributeModifiersComponent
-
-
Method Details
-
withShowInTooltip
- Mappings:
Namespace Name Mixin selector named withShowInTooltipLnet/minecraft/component/type/AttributeModifiersComponent;withShowInTooltip(Z)Lnet/minecraft/component/type/AttributeModifiersComponent;intermediary method_58423Lnet/minecraft/class_9285;method_58423(Z)Lnet/minecraft/class_9285;official aLczh;a(Z)Lczh;
-
builder
- Mappings:
Namespace Name Mixin selector named builderLnet/minecraft/component/type/AttributeModifiersComponent;builder()Lnet/minecraft/component/type/AttributeModifiersComponent$Builder;intermediary method_57480Lnet/minecraft/class_9285;method_57480()Lnet/minecraft/class_9285$class_9286;official aLczh;a()Lczh$a;
-
with
public AttributeModifiersComponent with(RegistryEntry<EntityAttribute> attribute, EntityAttributeModifier modifier, AttributeModifierSlot slot) - Mappings:
Namespace Name Mixin selector named withLnet/minecraft/component/type/AttributeModifiersComponent;with(Lnet/minecraft/registry/entry/RegistryEntry;Lnet/minecraft/entity/attribute/EntityAttributeModifier;Lnet/minecraft/component/type/AttributeModifierSlot;)Lnet/minecraft/component/type/AttributeModifiersComponent;intermediary method_57484Lnet/minecraft/class_9285;method_57484(Lnet/minecraft/class_6880;Lnet/minecraft/class_1322;Lnet/minecraft/class_9274;)Lnet/minecraft/class_9285;official aLczh;a(Ljr;Lbwo;Lbuv;)Lczh;
-
applyModifiers
public void applyModifiers(AttributeModifierSlot slot, BiConsumer<RegistryEntry<EntityAttribute>, EntityAttributeModifier> attributeConsumer) - Mappings:
Namespace Name Mixin selector named applyModifiersLnet/minecraft/component/type/AttributeModifiersComponent;applyModifiers(Lnet/minecraft/component/type/AttributeModifierSlot;Ljava/util/function/BiConsumer;)Vintermediary method_60618Lnet/minecraft/class_9285;method_60618(Lnet/minecraft/class_9274;Ljava/util/function/BiConsumer;)Vofficial aLczh;a(Lbuv;Ljava/util/function/BiConsumer;)V
-
applyModifiers
public void applyModifiers(EquipmentSlot slot, BiConsumer<RegistryEntry<EntityAttribute>, EntityAttributeModifier> attributeConsumer) - Mappings:
Namespace Name Mixin selector named applyModifiersLnet/minecraft/component/type/AttributeModifiersComponent;applyModifiers(Lnet/minecraft/entity/EquipmentSlot;Ljava/util/function/BiConsumer;)Vintermediary method_57482Lnet/minecraft/class_9285;method_57482(Lnet/minecraft/class_1304;Ljava/util/function/BiConsumer;)Vofficial aLczh;a(Lbuu;Ljava/util/function/BiConsumer;)V
-
applyOperations
- Mappings:
Namespace Name Mixin selector named applyOperationsLnet/minecraft/component/type/AttributeModifiersComponent;applyOperations(DLnet/minecraft/entity/EquipmentSlot;)Dintermediary method_57481Lnet/minecraft/class_9285;method_57481(DLnet/minecraft/class_1304;)Dofficial aLczh;a(DLbuu;)D
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
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
-