From 09684ba9d758460806fa1e930410dc9079094a4d Mon Sep 17 00:00:00 2001 From: feildmaster Date: Wed, 5 Dec 2012 12:08:58 -0600 Subject: [PATCH] Persistence isn't just animals. Fix BUKKIT-3105 Also set to this value if the persistence hasn't been updated --- src/main/java/net/minecraft/server/EntityLiving.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java index b709cb60f0..ba9721c480 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -87,7 +87,7 @@ public abstract class EntityLiving extends Entity { public boolean bp = false; public int bq = 0; protected boolean canPickUpLoot = false; - public boolean persistent = (this instanceof EntityAnimal); // CraftBukkit - private -> public, change value + public boolean persistent = !this.bj(); // CraftBukkit - private -> public, change value protected int bs; protected double bt; protected double bu; @@ -1139,6 +1139,8 @@ public abstract class EntityLiving extends Entity { boolean data = nbttagcompound.getBoolean("PersistenceRequired"); if (nbttagcompound.hasKey("Bukkit.PersistenceUpdated") || data) { this.persistent = data; + } else { + this.persistent = !this.bj(); } // CraftBukkit end