public interface HealthData extends DataManipulator<HealthData,ImmutableHealthData>
DataManipulator containing health specific information
for a Living entity. Usually just signifying that an Entity
has "health" and can "die" once the health is depleted.| Modifier and Type | Method and Description |
|---|---|
MutableBoundedValue<Double> |
health()
Returns the health amount.
|
MutableBoundedValue<Double> |
maxHealth()
Gets the current maximum health.
|
asImmutable, copy, fill, fill, from, set, set, set, set, transformgetContentVersion, toContainerMutableBoundedValue<Double> health()
The range of the health depends on the object on which this method is defined. For players in Minecraft, the nominal range is between 0 and 20, inclusive, but the range can be adjusted.
Convention dictates that health does not follow below 0 but this convention may be broken.
Keys.HEALTHMutableBoundedValue<Double> maxHealth()
The maximum health set here may affect the attribute increasing health points. The base health should be minded that it may be lower than the total maximum health of this entity.
Keys.MAX_HEALTH