public class EntityAttributeModifier extends Object
Modifier and Type | Class and Description |
---|---|
static class |
EntityAttributeModifier.Operation
Represents an operation which can be applied to an attribute modifier.
|
Modifier and Type | Field and Description |
---|---|
private static Logger |
LOGGER |
private Supplier<String> |
nameGetter |
private EntityAttributeModifier.Operation |
operation |
private UUID |
uuid |
private double |
value |
Constructor and Description |
---|
EntityAttributeModifier(String name,
double value,
EntityAttributeModifier.Operation operation) |
EntityAttributeModifier(UUID uuid,
String name,
double value,
EntityAttributeModifier.Operation operation) |
EntityAttributeModifier(UUID uuid,
Supplier<String> nameGetter,
double value,
EntityAttributeModifier.Operation operation) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
static EntityAttributeModifier |
fromTag(CompoundTag tag) |
UUID |
getId() |
String |
getName() |
EntityAttributeModifier.Operation |
getOperation() |
double |
getValue() |
int |
hashCode() |
String |
toString() |
CompoundTag |
toTag() |
private static final Logger LOGGER
private final double value
private final EntityAttributeModifier.Operation operation
private final UUID uuid
public EntityAttributeModifier(String name, double value, EntityAttributeModifier.Operation operation)
public EntityAttributeModifier(UUID uuid, String name, double value, EntityAttributeModifier.Operation operation)
public EntityAttributeModifier(UUID uuid, Supplier<String> nameGetter, double value, EntityAttributeModifier.Operation operation)
public UUID getId()
public String getName()
public EntityAttributeModifier.Operation getOperation()
public double getValue()
public CompoundTag toTag()
@Nullable public static EntityAttributeModifier fromTag(CompoundTag tag)