public class ModifiableAttributeInstance extends java.lang.Object implements IAttributeInstance
Constructor and Description |
---|
ModifiableAttributeInstance(AbstractAttributeMap attributeMapIn,
IAttribute genericAttributeIn) |
Modifier and Type | Method and Description |
---|---|
void |
applyModifier(AttributeModifier modifier) |
protected void |
flagForUpdate() |
IAttribute |
getAttribute() |
double |
getAttributeValue() |
double |
getBaseValue() |
AttributeModifier |
getModifier(java.util.UUID uuid) |
java.util.Collection<AttributeModifier> |
getModifiers() |
java.util.Collection<AttributeModifier> |
getModifiersByOperation(int operation) |
boolean |
hasModifier(AttributeModifier modifier) |
void |
removeAllModifiers() |
void |
removeModifier(AttributeModifier modifier) |
void |
removeModifier(java.util.UUID p_188479_1_) |
void |
setBaseValue(double baseValue) |
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.Collection<AttributeModifier> getModifiersByOperation(int operation)
getModifiersByOperation
in interface IAttributeInstance
public java.util.Collection<AttributeModifier> getModifiers()
getModifiers
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 getAttributeValue()
getAttributeValue
in interface IAttributeInstance