diff --git a/Spigot-Server-Patches/Add-PhantomPreSpawnEvent.patch b/Spigot-Server-Patches/Add-PhantomPreSpawnEvent.patch index 7f1dbc2176..6a23859374 100644 --- a/Spigot-Server-Patches/Add-PhantomPreSpawnEvent.patch +++ b/Spigot-Server-Patches/Add-PhantomPreSpawnEvent.patch @@ -5,14 +5,18 @@ Subject: [PATCH] Add PhantomPreSpawnEvent diff --git a/src/main/java/net/minecraft/server/EntityPhantom.java b/src/main/java/net/minecraft/server/EntityPhantom.java -index 2429644e99..2778660acd 100644 +index 2429644e9..e27600109 100644 --- a/src/main/java/net/minecraft/server/EntityPhantom.java +++ b/src/main/java/net/minecraft/server/EntityPhantom.java @@ -0,0 +0,0 @@ public class EntityPhantom extends EntityFlying implements IMonster { } this.setSize(nbttagcompound.getInt("Size")); -+ this.spawningEntity = nbttagcompound.getUUID("Paper.SpawningEntity"); // Paper ++ // Paper start ++ if (nbttagcompound.hasUUID("Paper.SpawningEntity")) { ++ this.spawningEntity = nbttagcompound.getUUID("Paper.SpawningEntity"); ++ } ++ // Paper end } public void b(NBTTagCompound nbttagcompound) { @@ -20,7 +24,11 @@ index 2429644e99..2778660acd 100644 nbttagcompound.setInt("AY", this.c.getY()); nbttagcompound.setInt("AZ", this.c.getZ()); nbttagcompound.setInt("Size", this.getSize()); -+ nbttagcompound.setUUID("Paper.SpawningEntity", this.spawningEntity); // Paper ++ // Paper start ++ if (this.spawningEntity != null) { ++ nbttagcompound.setUUID("Paper.SpawningEntity", this.spawningEntity); ++ } ++ // Paper end } public SoundCategory bV() { @@ -40,7 +48,7 @@ index 2429644e99..2778660acd 100644 private int b; diff --git a/src/main/java/net/minecraft/server/MobSpawnerPhantom.java b/src/main/java/net/minecraft/server/MobSpawnerPhantom.java -index 0626b77904..413188e970 100644 +index 0626b7790..413188e97 100644 --- a/src/main/java/net/minecraft/server/MobSpawnerPhantom.java +++ b/src/main/java/net/minecraft/server/MobSpawnerPhantom.java @@ -0,0 +0,0 @@ public class MobSpawnerPhantom { @@ -63,7 +71,7 @@ index 0626b77904..413188e970 100644 groupdataentity = entityphantom.prepare(difficultydamagescaler, groupdataentity, (NBTTagCompound) null); world.addEntity(entityphantom, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL); // CraftBukkit diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java -index 9f9ee92390..2b97313694 100644 +index 9f9ee9239..2b9731369 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java @@ -0,0 +0,0 @@ public class CraftPhantom extends CraftFlying implements Phantom {