public interface Damageable extends EntityComponent
| Modifier and Type | Method and Description |
|---|---|
void |
damage(float damage)
Deals the given amount of damage to this entity.
|
float |
getFixedHealth() |
float |
getHealth()
Gets the entity's health from 0 to max health, where 0 is dead.
|
int |
getMaximumHealth() |
default boolean |
isDead() |
void |
replenish(float replenish) |
void |
setHealth(float health)
Sets the entity's health from 0 to max health, where 0 is
dead.
|
void |
setMaximumHealth(int maximumHealth) |
@Nonnegative float getFixedHealth()
float getHealth()
void setHealth(@Nonnegative float health)
health - New health represented from 0 to max@Nonnegative int getMaximumHealth()
void setMaximumHealth(@Nonnegative int maximumHealth)
void damage(@Nonnegative float damage)
damage - Amount of damage to dealvoid replenish(@Nonnegative float replenish)
default boolean isDead()
Copyright © 2017–2018 NukkitX. All rights reserved.