summaryrefslogtreecommitdiffstats
path: root/nms-patches
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2018-07-30 13:25:02 +1000
committermd_5 <git@md-5.net>2018-07-30 13:25:02 +1000
commit3f9d7f7770c2c700ef1cc2e9568cfb253996eff8 (patch)
tree73c384d6e7ecf851b9f8e005b136a62fe77b9cad /nms-patches
parent98f42923316e468a3b26887a92671a0ed16df073 (diff)
downloadcraftbukkit-3f9d7f7770c2c700ef1cc2e9568cfb253996eff8.tar
craftbukkit-3f9d7f7770c2c700ef1cc2e9568cfb253996eff8.tar.gz
craftbukkit-3f9d7f7770c2c700ef1cc2e9568cfb253996eff8.tar.lz
craftbukkit-3f9d7f7770c2c700ef1cc2e9568cfb253996eff8.tar.xz
craftbukkit-3f9d7f7770c2c700ef1cc2e9568cfb253996eff8.zip
Move persist flag check
Diffstat (limited to 'nms-patches')
-rw-r--r--nms-patches/Entity.patch19
1 files changed, 10 insertions, 9 deletions
diff --git a/nms-patches/Entity.patch b/nms-patches/Entity.patch
index 152ca861..9ca5dbeb 100644
--- a/nms-patches/Entity.patch
+++ b/nms-patches/Entity.patch
@@ -289,15 +289,16 @@
this.world = world;
}
-@@ -1311,13 +1499,25 @@
- }
-
- public boolean d(NBTTagCompound nbttagcompound) {
-- return this.isPassenger() ? false : this.c(nbttagcompound);
-+ return !this.persist || this.isPassenger() ? false : this.c(nbttagcompound); // CraftBukkit - persist flag
- }
-
- public NBTTagCompound save(NBTTagCompound nbttagcompound) {
+@@ -1301,7 +1489,7 @@
+ public boolean c(NBTTagCompound nbttagcompound) {
+ String s = this.getSaveID();
+
+- if (!this.dead && s != null) {
++ if (this.persist && !this.dead && s != null) { // CraftBukkit - persist flag
+ nbttagcompound.setString("id", s);
+ this.save(nbttagcompound);
+ return true;
+@@ -1318,6 +1506,18 @@
try {
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}));