aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorZach Brown <[email protected]>2016-11-12 23:29:32 -0600
committerZach Brown <[email protected]>2016-11-12 23:32:40 -0600
commitdec715e07b466d32785103aa0a8cba4a3fc834c7 (patch)
treefa7c878a7be0930fd1941ba20c2c1ef9f7f8a0a7
parent65538782cde89c70de3e55f5945b20c342a58726 (diff)
downloadPaper-dec715e07b466d32785103aa0a8cba4a3fc834c7.tar.gz
Paper-dec715e07b466d32785103aa0a8cba4a3fc834c7.zip
Filter bad data from ArmorStand and SpawnEgg items
Fixes GH-478
-rw-r--r--Spigot-Server-Patches/0182-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch28
-rwxr-xr-xscripts/importmcdev.sh1
2 files changed, 29 insertions, 0 deletions
diff --git a/Spigot-Server-Patches/0182-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch b/Spigot-Server-Patches/0182-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch
new file mode 100644
index 0000000000..6571b2198e
--- /dev/null
+++ b/Spigot-Server-Patches/0182-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch
@@ -0,0 +1,28 @@
+From e7490178a70a45f8e3a641ae338d65c4a04620eb Mon Sep 17 00:00:00 2001
+From: Zach Brown <[email protected]>
+Date: Sat, 12 Nov 2016 23:25:22 -0600
+Subject: [PATCH] Filter bad data from ArmorStand and SpawnEgg items
+
+
+diff --git a/src/main/java/net/minecraft/server/ItemMonsterEgg.java b/src/main/java/net/minecraft/server/ItemMonsterEgg.java
+index 6317cba..06149e8 100644
+--- a/src/main/java/net/minecraft/server/ItemMonsterEgg.java
++++ b/src/main/java/net/minecraft/server/ItemMonsterEgg.java
+@@ -82,8 +82,12 @@ public class ItemMonsterEgg extends Item {
+
+ NBTTagCompound nbttagcompound1 = entity.e(new NBTTagCompound());
+ UUID uuid = entity.getUniqueID();
+-
+- nbttagcompound1.a(nbttagcompound.getCompound("EntityTag"));
++ // Paper start - Filter out position and motion information
++ final NBTTagCompound entityTag = nbttagcompound.getCompound("EntityTag");
++ entityTag.remove("Pos");
++ entityTag.remove("Motion");
++ nbttagcompound1.a(entityTag);
++ // Paper end
+ entity.a(uuid);
+ entity.f(nbttagcompound1);
+ }
+--
+2.10.2.windows.1
+
diff --git a/scripts/importmcdev.sh b/scripts/importmcdev.sh
index c4d6dd50de..13a7d13345 100755
--- a/scripts/importmcdev.sh
+++ b/scripts/importmcdev.sh
@@ -63,6 +63,7 @@ import EntityWaterAnimal
import FileIOThread
import IHopper
import ItemBlock
+import ItemMonsterEgg
import NavigationAbstract
import NBTTagCompound
import NBTTagList