mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-14 11:45:52 -07:00
@@ -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];
|
||||
|
Reference in New Issue
Block a user