mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-26 10:59:43 -05:00
Rework max health values. Fixes BUKKIT-4398
This commit is contained in:
1 parent
e79d26d7d7
commit
22adf8a3ce
12 files changed
+21
-60
No files matched your search
@@ -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