mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-17 06:48:23 +01:00
26 lines
1.3 KiB
Diff
26 lines
1.3 KiB
Diff
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||
|
From: Zach Brown <1254957+zachbr@users.noreply.github.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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||
|
--- a/src/main/java/net/minecraft/server/ItemMonsterEgg.java
|
||
|
+++ b/src/main/java/net/minecraft/server/ItemMonsterEgg.java
|
||
|
@@ -0,0 +0,0 @@ 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);
|
||
|
}
|
||
|
--
|