mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-15 14:13:56 +01:00
fixed health
By: Tahg <tahgtahv@gmail.com>
This commit is contained in:
parent
9f88190ab1
commit
eeaaea9223
1 changed files with 4 additions and 4 deletions
|
@ -24,15 +24,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
|||
}
|
||||
|
||||
public int getHealth() {
|
||||
return entity.ba;
|
||||
return entity.aZ;
|
||||
}
|
||||
|
||||
public void setHealth(int health) {
|
||||
if ((health < 0) || (health > 20)) {
|
||||
throw new IllegalArgumentException("Health must be between 0 and 20");
|
||||
if ((health < 0) || (health > 200)) {
|
||||
throw new IllegalArgumentException("Health must be between 0 and 200");
|
||||
}
|
||||
|
||||
entity.ba = health;
|
||||
entity.aZ = health;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue