diff options
Diffstat (limited to 'nms-patches/SpawnerCreature.patch')
-rw-r--r-- | nms-patches/SpawnerCreature.patch | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/nms-patches/SpawnerCreature.patch b/nms-patches/SpawnerCreature.patch index dca91ed0..2482e10f 100644 --- a/nms-patches/SpawnerCreature.patch +++ b/nms-patches/SpawnerCreature.patch @@ -72,7 +72,7 @@ if (l1 <= k) { @@ -76,8 +107,10 @@ - label128: + label137: while (iterator1.hasNext()) { - ChunkCoordIntPair chunkcoordintpair1 = (ChunkCoordIntPair) iterator1.next(); - BlockPosition blockposition1 = getRandomPosition(worldserver, chunkcoordintpair1.x, chunkcoordintpair1.z); @@ -83,23 +83,23 @@ int i2 = blockposition1.getX(); int j2 = blockposition1.getY(); int k2 = blockposition1.getZ(); -@@ -136,9 +169,12 @@ - if (entityinsentient.a((GeneratorAccess) worldserver, false) && entityinsentient.a((IWorldReader) worldserver)) { - groupdataentity = entityinsentient.prepare(worldserver.getDamageScaler(new BlockPosition(entityinsentient)), groupdataentity, (NBTTagCompound) null); - if (entityinsentient.a((IWorldReader) worldserver)) { -- ++l2; -- ++j4; -- worldserver.addEntity(entityinsentient); -+ // CraftBukkit start -+ if (worldserver.addEntity(entityinsentient, SpawnReason.NATURAL)) { -+ ++l2; -+ ++j4; -+ } -+ // CraftBukkit end - } else { - entityinsentient.die(); - } -@@ -255,7 +291,7 @@ +@@ -140,9 +173,12 @@ + if ((d0 <= 16384.0D || !entityinsentient.isTypeNotPersistent()) && entityinsentient.a((GeneratorAccess) worldserver, false) && entityinsentient.a((IWorldReader) worldserver)) { + groupdataentity = entityinsentient.prepare(worldserver.getDamageScaler(new BlockPosition(entityinsentient)), groupdataentity, (NBTTagCompound) null); + if (entityinsentient.a((IWorldReader) worldserver)) { +- ++l2; +- ++j4; +- worldserver.addEntity(entityinsentient); ++ // CraftBukkit start ++ if (worldserver.addEntity(entityinsentient, SpawnReason.NATURAL)) { ++ ++l2; ++ ++j4; ++ } ++ // CraftBukkit end + } else { + entityinsentient.die(); + } +@@ -260,7 +296,7 @@ entityinsentient.setPositionRotation(d0, (double) blockposition.getY(), d1, random.nextFloat() * 360.0F, 0.0F); if (entityinsentient.a(generatoraccess, false) && entityinsentient.a((IWorldReader) generatoraccess)) { groupdataentity = entityinsentient.prepare(generatoraccess.getDamageScaler(new BlockPosition(entityinsentient)), groupdataentity, (NBTTagCompound) null); |