net.minecraft.world.entity.ai.attributes

public class AttributeInstance

bnn
net.minecraft.world.entity.ai.attributes.AttributeInstance
net.minecraft.class_1324
net.minecraft.entity.attribute.EntityAttributeInstance
net.minecraft.src.C_553_
net.minecraft.world.entity.ai.attributes.AttributeModifiable

Field summary

Modifier and TypeField
private final Attribute
a
attribute
field_23700
type
f_22088_
private final Map<AttributeModifier$Operation, Set<AttributeModifier>>
b
modifiersByOperation
field_23701
operationToModifiers
f_22089_
private final Map<UUID, AttributeModifier>
c
modifierById
field_23702
idToModifiers
f_22090_
private final Set<AttributeModifier>
d
permanentModifiers
field_23703
persistentModifiers
f_22091_
private double
e
baseValue
field_23704
baseValue
f_22092_
private boolean
f
dirty
field_23705
dirty
f_22093_
private double
g
cachedValue
field_23706
value
f_22094_
private final Consumer<AttributeInstance>
h
onDirty
field_23707
updateCallback
f_22095_

Constructor summary

ModifierConstructor
public (Attribute type, Consumer<AttributeInstance> updateCallback)

Method summary

Modifier and TypeMethod
public Attribute
a()
getAttribute()
method_6198()
getAttribute()
m_22099_()
public double
b()
getBaseValue()
method_6201()
getBaseValue()
m_22115_()
public void
a(double arg0)
setBaseValue(double arg0)
method_6192(double arg0)
setBaseValue(double baseValue)
m_22100_(double arg0)
public Set<AttributeModifier>
a(bnp$a arg0)
getModifiers(AttributeModifier$Operation arg0)
method_6193(class_1322$class_1323 arg0)
getModifiers(EntityAttributeModifier$Operation operation)
m_22104_(C_555_$C_556_ arg0)
public Set<AttributeModifier>
c()
getModifiers()
method_6195()
getModifiers()
m_22122_()
public AttributeModifier
a(UUID arg0)
getModifier(UUID arg0)
method_6199(UUID arg0)
getModifier(UUID uuid)
m_22111_(UUID arg0)
public boolean
a(bnp arg0)
hasModifier(AttributeModifier arg0)
method_6196(class_1322 arg0)
hasModifier(EntityAttributeModifier modifier)
m_22109_(C_555_ arg0)
private void
d(bnp arg0)
addModifier(AttributeModifier arg0)
method_6197(class_1322 arg0)
addModifier(EntityAttributeModifier modifier)
m_22133_(C_555_ arg0)
public void
b(bnp arg0)
addTransientModifier(AttributeModifier arg0)
method_26835(class_1322 arg0)
addTemporaryModifier(EntityAttributeModifier modifier)
m_22118_(C_555_ arg0)
public void
c(bnp arg0)
addPermanentModifier(AttributeModifier arg0)
method_26837(class_1322 arg0)
addPersistentModifier(EntityAttributeModifier modifier)
m_22125_(C_555_ arg0)
protected void
d()
setDirty()
method_26838()
onUpdate()
m_22129_()
private void
e(bnp arg0)
removeModifier(AttributeModifier arg0)
method_6202(class_1322 arg0)
removeModifier(EntityAttributeModifier modifier)
m_22130_(C_555_ arg0)
public void
b(UUID arg0)
removeModifier(UUID arg0)
method_6200(UUID arg0)
removeModifier(UUID uuid)
m_22120_(UUID arg0)
public boolean
c(UUID arg0)
removePermanentModifier(UUID arg0)
method_27304(UUID arg0)
tryRemoveModifier(UUID uuid)
m_22127_(UUID arg0)
public void
e()
removeModifiers()
method_6203()
clearModifiers()
m_22132_()
public double
f()
getValue()
method_6194()
getValue()
m_22135_()
private double
h()
calculateValue()
method_26840()
computeValue()
m_22137_()
private Collection<AttributeModifier>
b(bnp$a arg0)
getModifiersOrEmpty(AttributeModifier$Operation arg0)
method_26834(class_1322$class_1323 arg0)
getModifiersByOperation(EntityAttributeModifier$Operation operation)
m_22116_(C_555_$C_556_ arg0)
public void
a(bnn arg0)
replaceFrom(AttributeInstance arg0)
method_26831(class_1324 arg0)
setFrom(EntityAttributeInstance other)
m_22102_(C_553_ arg0)
public CompoundTag
g()
save()
method_26839()
toNbt()
m_22136_()
public void
a(sn arg0)
load(CompoundTag arg0)
method_26833(class_2487 arg0)
readNbt(NbtCompound nbt)
m_22113_(C_4917_ arg0)