Persist ArmorStand canTick API value across restarts

This commit is contained in:
Zach Brown
2018-11-27 18:14:57 -05:00
parent eb8562c09b
commit efeb4bbba1
2 changed files with 29 additions and 9 deletions

View File

@@ -20,7 +20,7 @@ index a2656abaf..95fc2d8ed 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java
index 7647311df..d2b208888 100644
index 7647311df..8167fe5c9 100644
--- a/src/main/java/net/minecraft/server/EntityArmorStand.java
+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java
@@ -0,0 +0,0 @@ public class EntityArmorStand extends EntityLiving {
@@ -51,6 +51,26 @@ index 7647311df..d2b208888 100644
}
public boolean c(int i, ItemStack itemstack) {
@@ -0,0 +0,0 @@ public class EntityArmorStand extends EntityLiving {
}
nbttagcompound.set("Pose", this.z());
+ nbttagcompound.setBoolean("Paper.CanTick", this.canTick); // Paper - persist no tick setting
}
public void a(NBTTagCompound nbttagcompound) {
@@ -0,0 +0,0 @@ public class EntityArmorStand extends EntityLiving {
this.setMarker(nbttagcompound.getBoolean("Marker"));
this.bI = !this.isMarker();
this.noclip = this.isNoGravity();
+ // Paper start - persist no tick
+ if (nbttagcompound.hasKey("Paper.CanTick")) {
+ this.canTick = nbttagcompound.getBoolean("Paper.CanTick");
+ }
+ // Paper end
NBTTagCompound nbttagcompound1 = nbttagcompound.getCompound("Pose");
this.g(nbttagcompound1);
@@ -0,0 +0,0 @@ public class EntityArmorStand extends EntityLiving {
}