mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-01 20:50:41 +01:00
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:
parent
fb6d9e1808
commit
09684ba9d7
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue