summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZach Brown <Zbob750@live.com>2015-01-18 02:11:36 -0600
committermd_5 <git@md-5.net>2015-01-25 10:03:24 +1100
commite08f5e3d3518e9d24cc56f61d8bc04bbd6a07c60 (patch)
tree394e8b370b67d9d08c2c281acae9d3cd44480531
parent1092acbddf07edfa4100bc6824504ac75088e913 (diff)
downloadcraftbukkit-e08f5e3d3518e9d24cc56f61d8bc04bbd6a07c60.tar
craftbukkit-e08f5e3d3518e9d24cc56f61d8bc04bbd6a07c60.tar.gz
craftbukkit-e08f5e3d3518e9d24cc56f61d8bc04bbd6a07c60.tar.lz
craftbukkit-e08f5e3d3518e9d24cc56f61d8bc04bbd6a07c60.tar.xz
craftbukkit-e08f5e3d3518e9d24cc56f61d8bc04bbd6a07c60.zip
SPIGOT-451: Fix bad entities crashing servers when spawned via MobSpawner
-rw-r--r--nms-patches/MobSpawnerAbstract.patch11
1 files changed, 7 insertions, 4 deletions
diff --git a/nms-patches/MobSpawnerAbstract.patch b/nms-patches/MobSpawnerAbstract.patch
index cd1aa977..360ff2d3 100644
--- a/nms-patches/MobSpawnerAbstract.patch
+++ b/nms-patches/MobSpawnerAbstract.patch
@@ -1,5 +1,5 @@
---- ../work/decompile-8eb82bde//net/minecraft/server/MobSpawnerAbstract.java 2014-12-01 10:08:05.390591149 +0000
-+++ src/main/java/net/minecraft/server/MobSpawnerAbstract.java 2014-12-01 10:07:23.810591600 +0000
+--- ../work/decompile-8eb82bde//net/minecraft/server/MobSpawnerAbstract.java 2015-01-18 01:59:59.240758959 -0600
++++ src/main/java/net/minecraft/server/MobSpawnerAbstract.java 2015-01-18 01:59:59.244758959 -0600
@@ -4,6 +4,8 @@
import java.util.Iterator;
import java.util.List;
@@ -39,9 +39,12 @@
}
entity1.mount(entity2);
-@@ -164,7 +171,7 @@
+@@ -162,9 +169,9 @@
+
+ entity1 = entity2;
}
- } else if (entity instanceof EntityLiving && entity.world != null && flag) {
+- } else if (entity instanceof EntityLiving && entity.world != null && flag) {
++ } else if (entity instanceof EntityInsentient && entity.world != null && flag) { // CraftBukkit - EntityLiving -> EntityInsentient
((EntityInsentient) entity).prepare(entity.world.E(new BlockPosition(entity)), (GroupDataEntity) null);
- entity.world.addEntity(entity);
+ entity.world.addEntity(entity, CreatureSpawnEvent.SpawnReason.SPAWNER); // CraftBukkit