Persistence isn't just animals. Fix BUKKIT-3105

Also set to this value if the persistence hasn't been updated
This commit is contained in:
feildmaster 2012-12-05 12:08:58 -06:00
parent fb6d9e1808
commit 09684ba9d7

View file

@ -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