net.minecraft.world.entity.ai.attributes

public class AttributeInstance

bwm
net.minecraft.world.entity.ai.attributes.AttributeInstance
net.minecraft.class_1324
net.minecraft.entity.attribute.EntityAttributeInstance
net.minecraft.world.entity.ai.attributes.AttributeModifiable

Field summary

Modifier and TypeField
private static final String
b
BASE_FIELD
field_52008
BASE_NBT_KEY
private static final String
c
MODIFIERS_FIELD
field_52009
MODIFIERS_NBT_KEY
public static final String
a
ID_FIELD
field_52007
ID_NBT_KEY
private final Holder<Attribute>
d
attribute
field_23700
type
private final Map<AttributeModifier$Operation, Map<ResourceLocation, AttributeModifier>>
e
modifiersByOperation
field_23701
operationToModifiers
private final Map<ResourceLocation, AttributeModifier>
f
modifierById
field_23702
idToModifiers
private final Map<ResourceLocation, AttributeModifier>
g
permanentModifiers
field_23703
persistentModifiers
private double
h
baseValue
field_23704
baseValue
private boolean
i
dirty
field_23705
dirty
private double
j
cachedValue
field_23706
value
private final Consumer<AttributeInstance>
k
onDirty
field_23707
updateCallback

Constructor summary

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

Method summary

Modifier and TypeMethod
public Holder<Attribute>
a()
getAttribute()
method_6198()
getAttribute()
public double
b()
getBaseValue()
method_6201()
getBaseValue()
public void
a(double arg0)
setBaseValue(double arg0)
method_6192(double arg0)
setBaseValue(double baseValue)
Map<ResourceLocation, AttributeModifier>
a(bwo$a arg0)
getModifiers(AttributeModifier$Operation arg0)
method_6193(class_1322$class_1323 arg0)
getModifiers(EntityAttributeModifier$Operation operation)
public Set<AttributeModifier>
c()
getModifiers()
method_6195()
getModifiers()
public Set<AttributeModifier>
d()
getPermanentModifiers()
method_61435()
getPersistentModifiers()
public AttributeModifier
a(akv arg0)
getModifier(ResourceLocation arg0)
method_6199(class_2960 arg0)
getModifier(Identifier id)
public boolean
b(akv arg0)
hasModifier(ResourceLocation arg0)
method_6196(class_2960 arg0)
hasModifier(Identifier id)
private void
f(bwo arg0)
addModifier(AttributeModifier arg0)
method_6197(class_1322 arg0)
addModifier(EntityAttributeModifier modifier)
public void
a(bwo arg0)
addOrUpdateTransientModifier(AttributeModifier arg0)
method_55696(class_1322 arg0)
updateModifier(EntityAttributeModifier modifier)
public void
b(bwo arg0)
addTransientModifier(AttributeModifier arg0)
method_26835(class_1322 arg0)
addTemporaryModifier(EntityAttributeModifier modifier)
public void
c(bwo arg0)
addOrReplacePermanentModifier(AttributeModifier arg0)
method_61163(class_1322 arg0)
overwritePersistentModifier(EntityAttributeModifier modifier)
public void
d(bwo arg0)
addPermanentModifier(AttributeModifier arg0)
method_26837(class_1322 arg0)
addPersistentModifier(EntityAttributeModifier modifier)
public void
a(Collection<bwo> arg0)
addPermanentModifiers(Collection<AttributeModifier> arg0)
method_61434(Collection<class_1322> arg0)
addPersistentModifiers(Collection<EntityAttributeModifier> modifiers)
protected void
e()
setDirty()
method_26838()
onUpdate()
public void
e(bwo arg0)
removeModifier(AttributeModifier arg0)
method_6202(class_1322 arg0)
removeModifier(EntityAttributeModifier modifier)
public boolean
c(akv arg0)
removeModifier(ResourceLocation arg0)
method_6200(class_2960 arg0)
removeModifier(Identifier id)
public void
f()
removeModifiers()
method_6203()
clearModifiers()
public double
g()
getValue()
method_6194()
getValue()
private double
i()
calculateValue()
method_26840()
computeValue()
private Collection<AttributeModifier>
b(bwo$a arg0)
getModifiersOrEmpty(AttributeModifier$Operation arg0)
method_26834(class_1322$class_1323 arg0)
getModifiersByOperation(EntityAttributeModifier$Operation operation)
public void
a(bwm arg0)
replaceFrom(AttributeInstance arg0)
method_26831(class_1324 arg0)
setFrom(EntityAttributeInstance other)
public CompoundTag
h()
save()
method_26839()
toNbt()
public void
a(tq arg0)
load(CompoundTag arg0)
method_26833(class_2487 arg0)
readNbt(NbtCompound nbt)