summaryrefslogtreecommitdiffstats
path: root/nms-patches/SpawnerCreature.patch
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-06-09 11:43:49 +1000
committermd_5 <git@md-5.net>2016-06-09 11:43:49 +1000
commita8a4bedd2a9ef3c192ecf76db9afaf0b784ed08d (patch)
tree9efb0ce242b802a188032bd500ef7afaf29032a3 /nms-patches/SpawnerCreature.patch
parent0cd0397a8295992112ad3bf0d37795a04d22503e (diff)
downloadcraftbukkit-a8a4bedd2a9ef3c192ecf76db9afaf0b784ed08d.tar
craftbukkit-a8a4bedd2a9ef3c192ecf76db9afaf0b784ed08d.tar.gz
craftbukkit-a8a4bedd2a9ef3c192ecf76db9afaf0b784ed08d.tar.lz
craftbukkit-a8a4bedd2a9ef3c192ecf76db9afaf0b784ed08d.tar.xz
craftbukkit-a8a4bedd2a9ef3c192ecf76db9afaf0b784ed08d.zip
Update to Minecraft 1.10
Diffstat (limited to 'nms-patches/SpawnerCreature.patch')
-rw-r--r--nms-patches/SpawnerCreature.patch17
1 files changed, 7 insertions, 10 deletions
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];