From a8a4bedd2a9ef3c192ecf76db9afaf0b784ed08d Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 9 Jun 2016 11:43:49 +1000 Subject: Update to Minecraft 1.10 --- nms-patches/SpawnerCreature.patch | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'nms-patches/SpawnerCreature.patch') diff --git a/nms-patches/SpawnerCreature.patch b/nms-patches/SpawnerCreature.patch index 6f882655..4da78171 100644 --- a/nms-patches/SpawnerCreature.patch +++ b/nms-patches/SpawnerCreature.patch @@ -23,10 +23,10 @@ public SpawnerCreature() {} -@@ -36,18 +40,21 @@ - for (int i1 = -b0; i1 <= b0; ++i1) { - for (k = -b0; k <= b0; ++k) { - boolean flag3 = i1 == -b0 || i1 == b0 || k == -b0 || k == b0; +@@ -36,15 +40,18 @@ + for (int i1 = -8; i1 <= 8; ++i1) { + for (k = -8; k <= 8; ++k) { + boolean flag4 = i1 == -8 || i1 == 8 || k == -8 || k == 8; - ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(i1 + l, k + j); + // CraftBukkit start - use LongHash and LongHashSet + // ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(i1 + l, k + j); @@ -35,21 +35,18 @@ + long chunkCoords = LongHash.toLong(i1 + l, k + j); + if (!this.b.contains(chunkCoords)) { ++i; -- if (!flag3 && worldserver.getWorldBorder().isInBounds(chunkcoordintpair)) { +- if (!flag4 && worldserver.getWorldBorder().isInBounds(chunkcoordintpair)) { - PlayerChunk playerchunk = worldserver.getPlayerChunkMap().getChunk(chunkcoordintpair.x, chunkcoordintpair.z); -+ if (!flag3 && worldserver.getWorldBorder().isInBounds(i1 + l, k + j)) { // CraftBukkit ++ if (!flag4 && worldserver.getWorldBorder().isInBounds(i1 + l, k + j)) { // CraftBukkit + PlayerChunk playerchunk = worldserver.getPlayerChunkMap().getChunk(i1 + l, k + j); // CraftBukkit if (playerchunk != null && playerchunk.e()) { - this.b.add(chunkcoordintpair); + this.b.add(chunkCoords); ++ // CraftBukkit end } } } -+ // CraftBukkit end - } - } - } @@ -62,9 +69,31 @@ for (int k1 = 0; k1 < j; ++k1) { EnumCreatureType enumcreaturetype = aenumcreaturetype[k1]; -- cgit v1.2.3