13
0
geforkt von Mirrors/Paper

Move persist flag check

By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2018-07-30 13:25:02 +10:00
Ursprung e3f89384f6
Commit 265c841cb2

Datei anzeigen

@ -289,15 +289,16 @@
this.world = world; this.world = world;
} }
@@ -1311,13 +1499,25 @@ @@ -1301,7 +1489,7 @@
} public boolean c(NBTTagCompound nbttagcompound) {
String s = this.getSaveID();
public boolean d(NBTTagCompound nbttagcompound) { - if (!this.dead && s != null) {
- return this.isPassenger() ? false : this.c(nbttagcompound); + if (this.persist && !this.dead && s != null) { // CraftBukkit - persist flag
+ return !this.persist || this.isPassenger() ? false : this.c(nbttagcompound); // CraftBukkit - persist flag nbttagcompound.setString("id", s);
} this.save(nbttagcompound);
return true;
public NBTTagCompound save(NBTTagCompound nbttagcompound) { @@ -1318,6 +1506,18 @@
try { try {
nbttagcompound.set("Pos", this.a(new double[] { this.locX, this.locY, this.locZ})); nbttagcompound.set("Pos", this.a(new double[] { this.locX, this.locY, this.locZ}));
nbttagcompound.set("Motion", this.a(new double[] { this.motX, this.motY, this.motZ})); nbttagcompound.set("Motion", this.a(new double[] { this.motX, this.motY, this.motZ}));