Add Configuration for finding Structures outside World Border (#10437)

This commit is contained in:
Tamion 2024-04-20 21:29:32 +02:00
parent 2db91fd866
commit 9c2056070c
2 changed files with 2 additions and 1 deletions

View File

@ -41,7 +41,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
while (iterator.hasNext()) {
ChunkPos chunkcoordintpair = (ChunkPos) iterator.next();
+ if (!world.getWorldBorder().isChunkInBounds(chunkcoordintpair.x, chunkcoordintpair.z)) { continue; } // Paper - Bound treasure maps to world border
+ if (!world.paperConfig().environment.locateStructuresOutsideWorldBorder && !world.getWorldBorder().isChunkInBounds(chunkcoordintpair.x, chunkcoordintpair.z)) { continue; } // Paper - Bound treasure maps to world border
blockposition_mutableblockposition.set(SectionPos.sectionToBlockCoord(chunkcoordintpair.x, 8), 32, SectionPos.sectionToBlockCoord(chunkcoordintpair.z, 8));
double d1 = blockposition_mutableblockposition.distSqr(center);

View File

@ -1816,6 +1816,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ public IntOr.Disabled netherCeilingVoidDamageHeight = IntOr.Disabled.DISABLED;
+ public int maxFluidTicks = 65536;
+ public int maxBlockTicks = 65536;
+ public boolean locateStructuresOutsideWorldBorder = false;
+ }
+
+ public Spawn spawn;