类 Attribute
java.lang.Object
net.minecraft.world.entity.ai.attributes.Attribute
- 所有已实现的接口:
IAttributeExtension
- 直接已知子类:
BooleanAttribute
,RangedAttribute
-
嵌套类概要
嵌套类 -
字段概要
字段修饰符和类型字段说明private final double
private final String
protected static final TextColor
protected static final TextColor
protected static final TextColor
private Attribute.Sentiment
static final StreamCodec
<RegistryFriendlyByteBuf, Holder<Attribute>> private boolean
从接口继承的字段 net.neoforged.neoforge.common.extensions.IAttributeExtension
FORMAT
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明double
getMergedStyle
(boolean isPositive) Returns the color used by merged attribute modifiers.getStyle
(boolean p_347715_) boolean
double
sanitizeValue
(double p_22083_) setSentiment
(Attribute.Sentiment p_347714_) setSyncable
(boolean p_22085_) 从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 net.neoforged.neoforge.common.extensions.IAttributeExtension
getBaseId, getDebugInfo, toBaseComponent, toComponent, toValueComponent
-
字段详细资料
-
CODEC
-
STREAM_CODEC
-
defaultValue
private final double defaultValue -
syncable
private boolean syncable -
descriptionId
-
sentiment
-
MERGED_RED
-
MERGED_BLUE
-
MERGED_GRAY
-
-
构造器详细资料
-
Attribute
-
-
方法详细资料
-
getDefaultValue
public double getDefaultValue() -
isClientSyncable
public boolean isClientSyncable() -
setSyncable
-
setSentiment
-
sanitizeValue
public double sanitizeValue(double p_22083_) -
getDescriptionId
-
getStyle
-
getMergedStyle
从接口复制的说明:IAttributeExtension
Returns the color used by merged attribute modifiers. Only used whenNeoForgeMod.enableMergedAttributeTooltips()
is active.Similarly to
getStyle(boolean)
, this method should return a color based on the attribute'sAttribute.Sentiment
. The returned color should be distinguishable from the color used bygetStyle(boolean)
.- 指定者:
getMergedStyle
在接口中IAttributeExtension
-