Package net.minecraft.entity.attribute
Class EntityAttribute
java.lang.Object
net.minecraft.entity.attribute.EntityAttribute
- Direct Known Subclasses:
ClampedEntityAttribute
Represents a type of double-valued attribute that a living entity may have.
An attribute is a tracked double value stored on an entity. An attribute has a default value on which attribute modifiers operate.
- Mappings:
Namespace Name named net/minecraft/entity/attribute/EntityAttributeintermediary net/minecraft/class_1320official cfa
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate EntityAttribute.Categorystatic final com.mojang.serialization.Codec<RegistryEntry<EntityAttribute>> private final doublestatic final PacketCodec<RegistryByteBuf, RegistryEntry<EntityAttribute>> private booleanprivate final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleclamp(double value) doublegetFormatting(boolean addition) booleanChecks if instances of this attribute should synchronize values to clients.setCategory(EntityAttribute.Category category) setTracked(boolean tracked) Sets all instances of this attribute to synchronize their values to clients.
-
Field Details
-
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/entity/attribute/EntityAttribute;CODEC:Lcom/mojang/serialization/Codec;intermediary field_51575Lnet/minecraft/class_1320;field_51575:Lcom/mojang/serialization/Codec;official aLcfa;a:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/entity/attribute/EntityAttribute;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_51940Lnet/minecraft/class_1320;field_51940:Lnet/minecraft/class_9139;official bLcfa;b:Laae;
-
fallback
private final double fallback- Mappings:
Namespace Name Mixin selector named fallbackLnet/minecraft/entity/attribute/EntityAttribute;fallback:Dintermediary field_23697Lnet/minecraft/class_1320;field_23697:Dofficial cLcfa;c:D
-
tracked
private boolean tracked- Mappings:
Namespace Name Mixin selector named trackedLnet/minecraft/entity/attribute/EntityAttribute;tracked:Zintermediary field_23698Lnet/minecraft/class_1320;field_23698:Zofficial dLcfa;d:Z
-
translationKey
- Mappings:
Namespace Name Mixin selector named translationKeyLnet/minecraft/entity/attribute/EntityAttribute;translationKey:Ljava/lang/String;intermediary field_23699Lnet/minecraft/class_1320;field_23699:Ljava/lang/String;official eLcfa;e:Ljava/lang/String;
-
category
- Mappings:
Namespace Name Mixin selector named categoryLnet/minecraft/entity/attribute/EntityAttribute;category:Lnet/minecraft/entity/attribute/EntityAttribute$Category;intermediary field_51884Lnet/minecraft/class_1320;field_51884:Lnet/minecraft/class_1320$class_9764;official fLcfa;f:Lcfa$a;
-
-
Constructor Details
-
EntityAttribute
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/entity/attribute/EntityAttribute;<init>(Ljava/lang/String;D)Vintermediary <init>Lnet/minecraft/class_1320;<init>(Ljava/lang/String;D)Vofficial <init>Lcfa;<init>(Ljava/lang/String;D)V
-
-
Method Details
-
getDefaultValue
public double getDefaultValue()- Mappings:
Namespace Name Mixin selector named getDefaultValueLnet/minecraft/entity/attribute/EntityAttribute;getDefaultValue()Dintermediary method_6169Lnet/minecraft/class_1320;method_6169()Dofficial aLcfa;a()D
-
isTracked
public boolean isTracked()Checks if instances of this attribute should synchronize values to clients.- Mappings:
Namespace Name Mixin selector named isTrackedLnet/minecraft/entity/attribute/EntityAttribute;isTracked()Zintermediary method_6168Lnet/minecraft/class_1320;method_6168()Zofficial bLcfa;b()Z
-
setTracked
Sets all instances of this attribute to synchronize their values to clients.- Mappings:
Namespace Name Mixin selector named setTrackedLnet/minecraft/entity/attribute/EntityAttribute;setTracked(Z)Lnet/minecraft/entity/attribute/EntityAttribute;intermediary method_26829Lnet/minecraft/class_1320;method_26829(Z)Lnet/minecraft/class_1320;official aLcfa;a(Z)Lcfa;
-
setCategory
- Mappings:
Namespace Name Mixin selector named setCategoryLnet/minecraft/entity/attribute/EntityAttribute;setCategory(Lnet/minecraft/entity/attribute/EntityAttribute$Category;)Lnet/minecraft/entity/attribute/EntityAttribute;intermediary method_60493Lnet/minecraft/class_1320;method_60493(Lnet/minecraft/class_1320$class_9764;)Lnet/minecraft/class_1320;official aLcfa;a(Lcfa$a;)Lcfa;
-
clamp
public double clamp(double value) - Mappings:
Namespace Name Mixin selector named clampLnet/minecraft/entity/attribute/EntityAttribute;clamp(D)Dintermediary method_6165Lnet/minecraft/class_1320;method_6165(D)Dofficial aLcfa;a(D)D
-
getTranslationKey
- Mappings:
Namespace Name Mixin selector named getTranslationKeyLnet/minecraft/entity/attribute/EntityAttribute;getTranslationKey()Ljava/lang/String;intermediary method_26830Lnet/minecraft/class_1320;method_26830()Ljava/lang/String;official cLcfa;c()Ljava/lang/String;
-
getFormatting
- Mappings:
Namespace Name Mixin selector named getFormattingLnet/minecraft/entity/attribute/EntityAttribute;getFormatting(Z)Lnet/minecraft/util/Formatting;intermediary method_60494Lnet/minecraft/class_1320;method_60494(Z)Lnet/minecraft/class_124;official bLcfa;b(Z)Lo;
-