Class AttributeModifierManager
- java.lang.Object
-
- net.minecraft.entity.ai.attributes.AttributeModifierManager
-
public class AttributeModifierManager extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<Attribute,ModifiableAttributeInstance>
attributes
private java.util.Set<ModifiableAttributeInstance>
dirtyAttributes
private static org.apache.logging.log4j.Logger
LOGGER
private AttributeModifierMap
supplier
-
Constructor Summary
Constructors Constructor Description AttributeModifierManager(AttributeModifierMap p_i231502_1_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTransientAttributeModifiers(com.google.common.collect.Multimap<Attribute,AttributeModifier> p_233793_1_)
void
assignValues(AttributeModifierManager p_233784_1_)
double
getBaseValue(Attribute p_233797_1_)
java.util.Set<ModifiableAttributeInstance>
getDirtyAttributes()
ModifiableAttributeInstance
getInstance(Attribute p_233779_1_)
double
getModifierValue(Attribute p_233791_1_, java.util.UUID p_233791_2_)
java.util.Collection<ModifiableAttributeInstance>
getSyncableAttributes()
double
getValue(Attribute p_233795_1_)
boolean
hasAttribute(Attribute p_233790_1_)
boolean
hasModifier(Attribute p_233782_1_, java.util.UUID p_233782_2_)
void
load(ListNBT p_233788_1_)
private void
onAttributeModified(ModifiableAttributeInstance p_233783_1_)
void
removeAttributeModifiers(com.google.common.collect.Multimap<Attribute,AttributeModifier> p_233785_1_)
ListNBT
save()
-
-
-
Field Detail
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
attributes
private final java.util.Map<Attribute,ModifiableAttributeInstance> attributes
-
dirtyAttributes
private final java.util.Set<ModifiableAttributeInstance> dirtyAttributes
-
supplier
private final AttributeModifierMap supplier
-
-
Constructor Detail
-
AttributeModifierManager
public AttributeModifierManager(AttributeModifierMap p_i231502_1_)
-
-
Method Detail
-
onAttributeModified
private void onAttributeModified(ModifiableAttributeInstance p_233783_1_)
-
getDirtyAttributes
public java.util.Set<ModifiableAttributeInstance> getDirtyAttributes()
-
getSyncableAttributes
public java.util.Collection<ModifiableAttributeInstance> getSyncableAttributes()
-
getInstance
@Nullable public ModifiableAttributeInstance getInstance(Attribute p_233779_1_)
-
hasAttribute
public boolean hasAttribute(Attribute p_233790_1_)
-
hasModifier
public boolean hasModifier(Attribute p_233782_1_, java.util.UUID p_233782_2_)
-
getValue
public double getValue(Attribute p_233795_1_)
-
getBaseValue
public double getBaseValue(Attribute p_233797_1_)
-
getModifierValue
public double getModifierValue(Attribute p_233791_1_, java.util.UUID p_233791_2_)
-
removeAttributeModifiers
public void removeAttributeModifiers(com.google.common.collect.Multimap<Attribute,AttributeModifier> p_233785_1_)
-
addTransientAttributeModifiers
public void addTransientAttributeModifiers(com.google.common.collect.Multimap<Attribute,AttributeModifier> p_233793_1_)
-
assignValues
public void assignValues(AttributeModifierManager p_233784_1_)
-
save
public ListNBT save()
-
load
public void load(ListNBT p_233788_1_)
-
-