类 EntityAttribute
- java.lang.Object
-
- net.minecraft.entity.attribute.EntityAttribute
-
- 直接已知子类:
ClampedEntityAttribute
public class EntityAttribute extends Object
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 official attintermediary net/minecraft/class_1320named net/minecraft/entity/attribute/EntityAttribute
-
-
字段概要
字段 修饰符和类型 字段 说明 private doublefallbackstatic intfield_30097private booleantrackedprivate StringtranslationKey
-
构造器概要
构造器 限定符 构造器 说明 protectedEntityAttribute(String translationKey, double fallback)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 doubleclamp(double value)doublegetDefaultValue()StringgetTranslationKey()booleanisTracked()Checks if instances of this attribute should synchronize values to clients.EntityAttributesetTracked(boolean tracked)Sets all instances of this attribute to synchronize their values to clients.
-
-
-
字段详细资料
-
field_30097
public static final int field_30097
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official aLatt;a:Iintermediary field_30097Lnet/minecraft/class_1320;field_30097:Inamed field_30097Lnet/minecraft/entity/attribute/EntityAttribute;field_30097:I
-
fallback
private final double fallback
- Mappings:
Namespace Name Mixin selector official bLatt;b:Dintermediary field_23697Lnet/minecraft/class_1320;field_23697:Dnamed fallbackLnet/minecraft/entity/attribute/EntityAttribute;fallback:D
-
tracked
private boolean tracked
- Mappings:
Namespace Name Mixin selector official cLatt;c:Zintermediary field_23698Lnet/minecraft/class_1320;field_23698:Znamed trackedLnet/minecraft/entity/attribute/EntityAttribute;tracked:Z
-
translationKey
private final String translationKey
- Mappings:
Namespace Name Mixin selector official dLatt;d:Ljava/lang/String;intermediary field_23699Lnet/minecraft/class_1320;field_23699:Ljava/lang/String;named translationKeyLnet/minecraft/entity/attribute/EntityAttribute;translationKey:Ljava/lang/String;
-
-
构造器详细资料
-
EntityAttribute
protected EntityAttribute(String translationKey, double fallback)
- Mappings:
Namespace Name Mixin selector official <init>Latt;<init>(Ljava/lang/String;D)Vintermediary <init>Lnet/minecraft/class_1320;<init>(Ljava/lang/String;D)Vnamed <init>Lnet/minecraft/entity/attribute/EntityAttribute;<init>(Ljava/lang/String;D)V
-
-
方法详细资料
-
getDefaultValue
public double getDefaultValue()
- Mappings:
Namespace Name Mixin selector official aLatt;a()Dintermediary method_6169Lnet/minecraft/class_1320;method_6169()Dnamed getDefaultValueLnet/minecraft/entity/attribute/EntityAttribute;getDefaultValue()D
-
isTracked
public boolean isTracked()
Checks if instances of this attribute should synchronize values to clients.- Mappings:
Namespace Name Mixin selector official bLatt;b()Zintermediary method_6168Lnet/minecraft/class_1320;method_6168()Znamed isTrackedLnet/minecraft/entity/attribute/EntityAttribute;isTracked()Z
-
setTracked
public EntityAttribute setTracked(boolean tracked)
Sets all instances of this attribute to synchronize their values to clients.- Mappings:
Namespace Name Mixin selector official aLatt;a(Z)Latt;intermediary method_26829Lnet/minecraft/class_1320;method_26829(Z)Lnet/minecraft/class_1320;named setTrackedLnet/minecraft/entity/attribute/EntityAttribute;setTracked(Z)Lnet/minecraft/entity/attribute/EntityAttribute;
-
clamp
public double clamp(double value)
- Mappings:
Namespace Name Mixin selector official aLatt;a(D)Dintermediary method_6165Lnet/minecraft/class_1320;method_6165(D)Dnamed clampLnet/minecraft/entity/attribute/EntityAttribute;clamp(D)D
-
getTranslationKey
public String getTranslationKey()
- Mappings:
Namespace Name Mixin selector official cLatt;c()Ljava/lang/String;intermediary method_26830Lnet/minecraft/class_1320;method_26830()Ljava/lang/String;named getTranslationKeyLnet/minecraft/entity/attribute/EntityAttribute;getTranslationKey()Ljava/lang/String;
-
-