Archiviert
13
0

Filter bad data from ArmorStand and SpawnEgg items

Fixes GH-478
Dieser Commit ist enthalten in:
Zach Brown 2016-11-12 23:29:32 -06:00
Ursprung 65538782cd
Commit dec715e07b
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: CC9DA35FC5450B76
2 geänderte Dateien mit 29 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -0,0 +1,28 @@
From e7490178a70a45f8e3a641ae338d65c4a04620eb Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
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

Datei anzeigen

@ -63,6 +63,7 @@ import EntityWaterAnimal
import FileIOThread import FileIOThread
import IHopper import IHopper
import ItemBlock import ItemBlock
import ItemMonsterEgg
import NavigationAbstract import NavigationAbstract
import NBTTagCompound import NBTTagCompound
import NBTTagList import NBTTagList