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:
Aikar 2017-11-12 18:51:10 -05:00
parent 41afad51da
commit 64fdf06f84

View File

@ -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);
+ } + }
+ } + }