mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-02 06:57:30 +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 boolean bp = false;
|
||||||
public int bq = 0;
|
public int bq = 0;
|
||||||
protected boolean canPickUpLoot = false;
|
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 int bs;
|
||||||
protected double bt;
|
protected double bt;
|
||||||
protected double bu;
|
protected double bu;
|
||||||
|
@ -1139,6 +1139,8 @@ public abstract class EntityLiving extends Entity {
|
||||||
boolean data = nbttagcompound.getBoolean("PersistenceRequired");
|
boolean data = nbttagcompound.getBoolean("PersistenceRequired");
|
||||||
if (nbttagcompound.hasKey("Bukkit.PersistenceUpdated") || data) {
|
if (nbttagcompound.hasKey("Bukkit.PersistenceUpdated") || data) {
|
||||||
this.persistent = data;
|
this.persistent = data;
|
||||||
|
} else {
|
||||||
|
this.persistent = !this.bj();
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue