public interface ImmutableHealthData extends ImmutableDataManipulator<ImmutableHealthData,HealthData>
ImmutableDataManipulator
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 |
---|---|
ImmutableBoundedValue<Double> |
health()
Gets an
ImmutableBoundedValue for the current health. |
ImmutableBoundedValue<Double> |
maxHealth()
Gets an
ImmutableBoundedValue for the maximum health. |
asMutable, copy, with, with
getContentVersion, toContainer
ImmutableBoundedValue<Double> health()
ImmutableBoundedValue
for the current 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 for any reason.
ImmutableBoundedValue<Double> maxHealth()
ImmutableBoundedValue
for the maximum health.
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.