Class AttributeInstance
java.lang.Object
net.minecraft.world.entity.ai.attributes.AttributeInstance
-
Field Summary
Modifier and TypeFieldDescriptionprivate Attribute
private double
private double
private boolean
private Map<UUID,AttributeModifier>
private Map<AttributeModifier.Operation,Set<AttributeModifier>>
private Consumer<AttributeInstance>
private Set<AttributeModifier>
-
Constructor Summary
ConstructorDescriptionAttributeInstance(Attribute p_22097_, Consumer<AttributeInstance> p_22098_)
-
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>
getModifiersOrEmpty(AttributeModifier.Operation p_22117_)
double
getValue()
boolean
hasModifier(AttributeModifier p_22110_)
void
load(CompoundTag p_22114_)
void
removeModifier(UUID p_22121_)
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
-