public class ModifiableAttributeInstance extends java.lang.Object implements IAttributeInstance
Modifier and Type | Field and Description |
---|---|
private AbstractAttributeMap |
attributeMap |
private double |
baseValue |
private double |
cachedValue |
private IAttribute |
genericAttribute |
private java.util.Map<java.lang.String,java.util.Set<AttributeModifier>> |
mapByName |
private java.util.Map<AttributeModifier.Operation,java.util.Set<AttributeModifier>> |
mapByOperation |
private java.util.Map<java.util.UUID,AttributeModifier> |
mapByUUID |
private boolean |
needsUpdate |
Constructor and Description |
---|
ModifiableAttributeInstance(AbstractAttributeMap attributeMapIn,
IAttribute genericAttributeIn) |
Modifier and Type | Method and Description |
---|---|
void |
applyModifier(AttributeModifier modifier) |
private double |
computeValue() |
protected void |
flagForUpdate() |
private java.util.Collection<AttributeModifier> |
func_220370_b(AttributeModifier.Operation p_220370_1_) |
java.util.Set<AttributeModifier> |
func_225504_a_(AttributeModifier.Operation p_225504_1_) |
java.util.Set<AttributeModifier> |
func_225505_c_() |
IAttribute |
getAttribute() |
double |
getBaseValue() |
AttributeModifier |
getModifier(java.util.UUID uuid) |
double |
getValue() |
boolean |
hasModifier(AttributeModifier modifier) |
void |
removeAllModifiers() |
void |
removeModifier(AttributeModifier modifier) |
void |
removeModifier(java.util.UUID p_188479_1_) |
void |
setBaseValue(double baseValue) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
func_226302_a_
private final AbstractAttributeMap attributeMap
private final IAttribute genericAttribute
private final java.util.Map<AttributeModifier.Operation,java.util.Set<AttributeModifier>> mapByOperation
private final java.util.Map<java.lang.String,java.util.Set<AttributeModifier>> mapByName
private final java.util.Map<java.util.UUID,AttributeModifier> mapByUUID
private double baseValue
private boolean needsUpdate
private double cachedValue
public ModifiableAttributeInstance(AbstractAttributeMap attributeMapIn, IAttribute genericAttributeIn)
public IAttribute getAttribute()
getAttribute
in interface IAttributeInstance
public double getBaseValue()
getBaseValue
in interface IAttributeInstance
public void setBaseValue(double baseValue)
setBaseValue
in interface IAttributeInstance
public java.util.Set<AttributeModifier> func_225504_a_(AttributeModifier.Operation p_225504_1_)
func_225504_a_
in interface IAttributeInstance
public java.util.Set<AttributeModifier> func_225505_c_()
func_225505_c_
in interface IAttributeInstance
@Nullable public AttributeModifier getModifier(java.util.UUID uuid)
getModifier
in interface IAttributeInstance
public boolean hasModifier(AttributeModifier modifier)
hasModifier
in interface IAttributeInstance
public void applyModifier(AttributeModifier modifier)
applyModifier
in interface IAttributeInstance
protected void flagForUpdate()
public void removeModifier(AttributeModifier modifier)
removeModifier
in interface IAttributeInstance
public void removeModifier(java.util.UUID p_188479_1_)
removeModifier
in interface IAttributeInstance
public void removeAllModifiers()
removeAllModifiers
in interface IAttributeInstance
public double getValue()
getValue
in interface IAttributeInstance
private double computeValue()
private java.util.Collection<AttributeModifier> func_220370_b(AttributeModifier.Operation p_220370_1_)