Class AttributeInstance
java.lang.Object
net.minecraft.world.entity.ai.attributes.AttributeInstance
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Attribute
private double
private double
private boolean
private final Map<UUID,
AttributeModifier> private final Map<AttributeModifier.Operation,
Set<AttributeModifier>> private final Consumer<AttributeInstance>
private final Set<AttributeModifier>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
addModifier
(AttributeModifier p_22134_) void
addPermanentModifier
(AttributeModifier p_22126_) void
addTransientModifier
(AttributeModifier p_22119_) private double
double
getModifier
(UUID p_22112_) getModifiers
(AttributeModifier.Operation p_22105_) private Collection<AttributeModifier>
double
getValue()
boolean
hasModifier
(AttributeModifier p_22110_) void
load
(CompoundTag p_22114_) void
removeModifier
(UUID p_22121_) private void
removeModifier
(AttributeModifier p_22131_) void
boolean
removePermanentModifier
(UUID p_22128_) void
replaceFrom
(AttributeInstance p_22103_) save()
void
setBaseValue
(double p_22101_) protected void
setDirty()
-
Field Details
-
attribute
-
modifiersByOperation
-
modifierById
-
permanentModifiers
-
baseValue
private double baseValue -
dirty
private boolean dirty -
cachedValue
private double cachedValue -
onDirty
-
-
Constructor Details
-
AttributeInstance
-
-
Method Details
-
getAttribute
-
getBaseValue
public double getBaseValue() -
setBaseValue
public void setBaseValue(double p_22101_) -
getModifiers
-
getModifiers
-
getModifier
-
hasModifier
-
addModifier
-
addTransientModifier
-
addPermanentModifier
-
setDirty
protected void setDirty() -
removeModifier
-
removeModifier
-
removePermanentModifier
-
removeModifiers
public void removeModifiers() -
getValue
public double getValue() -
calculateValue
private double calculateValue() -
getModifiersOrEmpty
-
replaceFrom
-
save
-
load
-