@@ -99,11 +99,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
|||||||
throw new IllegalArgumentException("Health must be between 0 and " + getMaxHealth() + "(" + health + ")");
|
throw new IllegalArgumentException("Health must be between 0 and " + getMaxHealth() + "(" + health + ")");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getHandle().setHealth((float) health);
|
||||||
|
|
||||||
if (health == 0) {
|
if (health == 0) {
|
||||||
getHandle().die(DamageSource.GENERIC);
|
getHandle().die(DamageSource.GENERIC);
|
||||||
}
|
}
|
||||||
|
|
||||||
getHandle().setHealth((float) health);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getMaxHealth() {
|
public double getMaxHealth() {
|
||||||
|
|||||||
Reference in New Issue
Block a user