mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-21 07:41:30 +01:00
Use <= instead of < for structure patch
Thankfully I randomly think about code and randomly wondered if I used <= or < here, and caught this! This would of missed some chunks for the structure at the highest X/Z
This commit is contained in:
parent
41afad51da
commit
64fdf06f84
@ -47,7 +47,7 @@ index db419cd99..d9329bd42 100644
|
|||||||
return baseblockposition.getX() >= this.a && baseblockposition.getX() <= this.d && baseblockposition.getZ() >= this.c && baseblockposition.getZ() <= this.f && baseblockposition.getY() >= this.b && baseblockposition.getY() <= this.e;
|
return baseblockposition.getX() >= this.a && baseblockposition.getX() <= this.d && baseblockposition.getZ() >= this.c && baseblockposition.getZ() <= this.f && baseblockposition.getY() >= this.b && baseblockposition.getY() <= this.e;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java
|
diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java
|
||||||
index e8263baa4..09e49221d 100644
|
index e8263baa4..f4dfba8f3 100644
|
||||||
--- a/src/main/java/net/minecraft/server/StructureGenerator.java
|
--- a/src/main/java/net/minecraft/server/StructureGenerator.java
|
||||||
+++ b/src/main/java/net/minecraft/server/StructureGenerator.java
|
+++ b/src/main/java/net/minecraft/server/StructureGenerator.java
|
||||||
@@ -0,0 +0,0 @@ import it.unimi.dsi.fastutil.longs.Long2ObjectMap;
|
@@ -0,0 +0,0 @@ import it.unimi.dsi.fastutil.longs.Long2ObjectMap;
|
||||||
@ -145,8 +145,8 @@ index e8263baa4..09e49221d 100644
|
|||||||
+ }
|
+ }
|
||||||
+ final BaseBlockPosition low = bb.getLowPosition();
|
+ final BaseBlockPosition low = bb.getLowPosition();
|
||||||
+ final BaseBlockPosition high = bb.getHighPosition();
|
+ final BaseBlockPosition high = bb.getHighPosition();
|
||||||
+ for (int x = low.getX() >> 4, maxX = high.getX() >> 4; x < maxX; x++) {
|
+ for (int x = low.getX() >> 4, maxX = high.getX() >> 4; x <= maxX; x++) {
|
||||||
+ for (int z = low.getZ() >> 4, maxZ = high.getZ() >> 4; z < maxZ; z++) {
|
+ for (int z = low.getZ() >> 4, maxZ = high.getZ() >> 4; z <= maxZ; z++) {
|
||||||
+ allStructures.put(ChunkCoordIntPair.asLong(x, z), structurestart);
|
+ allStructures.put(ChunkCoordIntPair.asLong(x, z), structurestart);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
|
Loading…
Reference in New Issue
Block a user