Rework max health values. Fixes BUKKIT-4398
This commit is contained in:
@@ -6,10 +6,6 @@ import java.util.UUID;
|
||||
|
||||
//CraftBukkit start
|
||||
import org.bukkit.craftbukkit.event.CraftEventFactory;
|
||||
import org.bukkit.event.entity.EntityDamageByBlockEvent;
|
||||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
import org.bukkit.event.entity.EntityRegainHealthEvent;
|
||||
//CraftBukkit end
|
||||
|
||||
public abstract class EntityInsentient extends EntityLiving {
|
||||
|
||||
@@ -529,7 +525,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
if (this.getGoalTarget() == null) {
|
||||
return 3;
|
||||
} else {
|
||||
int i = (int) (this.getHealth() - this.maxHealth * 0.33F); // CraftBukkit - this.getMaxHealth() -> this.maxHealth
|
||||
int i = (int) (this.getHealth() - this.getMaxHealth() * 0.33F);
|
||||
|
||||
i -= (3 - this.world.difficulty) * 4;
|
||||
if (i < 0) {
|
||||
|
||||
Reference in New Issue
Block a user