public class DefaultAttributeContainer extends Object
Modifier and Type | Class and Description |
---|---|
static class |
DefaultAttributeContainer.Builder |
Modifier and Type | Field and Description |
---|---|
private Map<EntityAttribute,EntityAttributeInstance> |
instances |
Constructor and Description |
---|
DefaultAttributeContainer(Map<EntityAttribute,EntityAttributeInstance> instances) |
Modifier and Type | Method and Description |
---|---|
static DefaultAttributeContainer.Builder |
builder() |
EntityAttributeInstance |
createOverride(Consumer<EntityAttributeInstance> updateCallback,
EntityAttribute attribute) |
double |
getBaseValue(EntityAttribute attribute) |
double |
getModifierValue(EntityAttribute attribute,
UUID uuid) |
double |
getValue(EntityAttribute attribute) |
boolean |
has(EntityAttribute type) |
boolean |
hasModifier(EntityAttribute type,
UUID uuid) |
private EntityAttributeInstance |
require(EntityAttribute attribute) |
private final Map<EntityAttribute,EntityAttributeInstance> instances
public DefaultAttributeContainer(Map<EntityAttribute,EntityAttributeInstance> instances)
private EntityAttributeInstance require(EntityAttribute attribute)
public double getValue(EntityAttribute attribute)
public double getBaseValue(EntityAttribute attribute)
public double getModifierValue(EntityAttribute attribute, UUID uuid)
@Nullable public EntityAttributeInstance createOverride(Consumer<EntityAttributeInstance> updateCallback, EntityAttribute attribute)
public static DefaultAttributeContainer.Builder builder()
public boolean has(EntityAttribute type)
public boolean hasModifier(EntityAttribute type, UUID uuid)