public class SpongeHealthData extends AbstractData<org.spongepowered.api.data.manipulator.mutable.entity.HealthData,org.spongepowered.api.data.manipulator.immutable.entity.ImmutableHealthData> implements org.spongepowered.api.data.manipulator.mutable.entity.HealthData
Constructor and Description |
---|
SpongeHealthData() |
SpongeHealthData(double health,
double maxHealth) |
Modifier and Type | Method and Description |
---|---|
org.spongepowered.api.data.manipulator.immutable.entity.ImmutableHealthData |
asImmutable() |
int |
compareTo(org.spongepowered.api.data.manipulator.mutable.entity.HealthData o) |
org.spongepowered.api.data.manipulator.mutable.entity.HealthData |
copy() |
double |
getHealth() |
double |
getMaxHealth() |
org.spongepowered.api.data.value.mutable.MutableBoundedValue<Double> |
health() |
org.spongepowered.api.data.value.mutable.MutableBoundedValue<Double> |
maxHealth() |
protected void |
registerGettersAndSetters() |
SpongeHealthData |
setHealth(double value) |
SpongeHealthData |
setMaxHealth(double value) |
org.spongepowered.api.data.DataContainer |
toContainer() |
equals, fill, fill, from, get, getKeys, getOrElse, getOrNull, getValue, getValues, hashCode, registerFieldGetter, registerFieldSetter, registerKeyValue, set, set, set, set, supports, supports, transform
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
public SpongeHealthData(double health, double maxHealth)
public SpongeHealthData()
public org.spongepowered.api.data.value.mutable.MutableBoundedValue<Double> health()
health
in interface org.spongepowered.api.data.manipulator.mutable.entity.HealthData
public org.spongepowered.api.data.value.mutable.MutableBoundedValue<Double> maxHealth()
maxHealth
in interface org.spongepowered.api.data.manipulator.mutable.entity.HealthData
public org.spongepowered.api.data.manipulator.mutable.entity.HealthData copy()
copy
in interface org.spongepowered.api.data.manipulator.DataManipulator<org.spongepowered.api.data.manipulator.mutable.entity.HealthData,org.spongepowered.api.data.manipulator.immutable.entity.ImmutableHealthData>
copy
in interface org.spongepowered.api.data.value.ValueContainer<org.spongepowered.api.data.manipulator.mutable.entity.HealthData>
public org.spongepowered.api.data.manipulator.immutable.entity.ImmutableHealthData asImmutable()
asImmutable
in interface org.spongepowered.api.data.manipulator.DataManipulator<org.spongepowered.api.data.manipulator.mutable.entity.HealthData,org.spongepowered.api.data.manipulator.immutable.entity.ImmutableHealthData>
public int compareTo(org.spongepowered.api.data.manipulator.mutable.entity.HealthData o)
compareTo
in interface Comparable<org.spongepowered.api.data.manipulator.mutable.entity.HealthData>
public org.spongepowered.api.data.DataContainer toContainer()
toContainer
in interface org.spongepowered.api.data.DataSerializable
public double getHealth()
public SpongeHealthData setHealth(double value)
public double getMaxHealth()
public SpongeHealthData setMaxHealth(double value)
protected void registerGettersAndSetters()
registerGettersAndSetters
in class AbstractData<org.spongepowered.api.data.manipulator.mutable.entity.HealthData,org.spongepowered.api.data.manipulator.immutable.entity.ImmutableHealthData>