Class AttributeModifierMap
- java.lang.Object
-
- net.minecraft.entity.ai.attributes.AttributeModifierMap
-
public class AttributeModifierMap extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AttributeModifierMap.MutableAttribute
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<Attribute,ModifiableAttributeInstance>
instances
-
Constructor Summary
Constructors Constructor Description AttributeModifierMap(java.util.Map<Attribute,ModifiableAttributeInstance> p_i231503_1_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AttributeModifierMap.MutableAttribute
builder()
ModifiableAttributeInstance
createInstance(java.util.function.Consumer<ModifiableAttributeInstance> p_233806_1_, Attribute p_233806_2_)
private ModifiableAttributeInstance
getAttributeInstance(Attribute p_233810_1_)
double
getBaseValue(Attribute p_233807_1_)
double
getModifierValue(Attribute p_233805_1_, java.util.UUID p_233805_2_)
double
getValue(Attribute p_233804_1_)
boolean
hasAttribute(Attribute p_233809_1_)
boolean
hasModifier(Attribute p_233808_1_, java.util.UUID p_233808_2_)
-
-
-
Field Detail
-
instances
private final java.util.Map<Attribute,ModifiableAttributeInstance> instances
-
-
Constructor Detail
-
AttributeModifierMap
public AttributeModifierMap(java.util.Map<Attribute,ModifiableAttributeInstance> p_i231503_1_)
-
-
Method Detail
-
getAttributeInstance
private ModifiableAttributeInstance getAttributeInstance(Attribute p_233810_1_)
-
getValue
public double getValue(Attribute p_233804_1_)
-
getBaseValue
public double getBaseValue(Attribute p_233807_1_)
-
getModifierValue
public double getModifierValue(Attribute p_233805_1_, java.util.UUID p_233805_2_)
-
createInstance
@Nullable public ModifiableAttributeInstance createInstance(java.util.function.Consumer<ModifiableAttributeInstance> p_233806_1_, Attribute p_233806_2_)
-
builder
public static AttributeModifierMap.MutableAttribute builder()
-
hasAttribute
public boolean hasAttribute(Attribute p_233809_1_)
-
hasModifier
public boolean hasModifier(Attribute p_233808_1_, java.util.UUID p_233808_2_)
-
-