mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-30 00:56:45 +01:00
Address inclusivity issues for max world height
This commit is contained in:
parent
f45fb8fd6f
commit
e45b2ba288
@ -67,7 +67,7 @@ final class BlockStatePopulator extends BlockPopulator {
|
||||
final ChunkWrapper wrap = new ChunkWrapper(area.getWorldName(), source.getX(), source.getZ());
|
||||
final ScopedQueueCoordinator chunk = this.queue.getForChunk(wrap.x, wrap.z,
|
||||
com.plotsquared.bukkit.util.BukkitWorld.getMinWorldHeight(world),
|
||||
com.plotsquared.bukkit.util.BukkitWorld.getMaxWorldHeight(world)
|
||||
com.plotsquared.bukkit.util.BukkitWorld.getMaxWorldHeight(world) - 1
|
||||
);
|
||||
if (this.plotGenerator.populateChunk(chunk, area)) {
|
||||
this.queue.enqueue();
|
||||
|
@ -134,7 +134,7 @@ public class BukkitQueueCoordinator extends BasicQueueCoordinator {
|
||||
int sx = blockVector2.getX() << 4;
|
||||
int sz = blockVector2.getZ() << 4;
|
||||
if (isRegenChunk) {
|
||||
for (int layer = (getWorld().getMinY() >> 4); layer < (getWorld().getMaxY() >> 4); layer++) {
|
||||
for (int layer = (getWorld().getMinY() >> 4); layer <= (getWorld().getMaxY() >> 4); layer++) {
|
||||
for (int y = 0; y < 16; y++) {
|
||||
for (int x = 0; x < 16; x++) {
|
||||
for (int z = 0; z < 16; z++) {
|
||||
|
@ -172,7 +172,7 @@ public class GenChunk extends ScopedQueueCoordinator {
|
||||
*/
|
||||
public boolean setBiome(int x, int z, @NonNull Biome biome) {
|
||||
if (this.biomeGrid != null) {
|
||||
for (int y = getMin().getY(); y < getMax().getY(); y++) {
|
||||
for (int y = getMin().getY(); y <= getMax().getY(); y++) {
|
||||
this.setBiome(x, y, z, biome);
|
||||
}
|
||||
return true;
|
||||
|
@ -120,7 +120,7 @@ public class BukkitWorld implements World<org.bukkit.World> {
|
||||
|
||||
@Override
|
||||
public int getMaxHeight() {
|
||||
return getMaxWorldHeight(world);
|
||||
return getMaxWorldHeight(world) - 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -135,7 +135,7 @@ public class ContentMap {
|
||||
}
|
||||
|
||||
private void saveBlocks(BukkitWorld world, int x, int z, int offsetX, int offsetZ) {
|
||||
BaseBlock[] ids = new BaseBlock[world.getMaxY() - world.getMinY()];
|
||||
BaseBlock[] ids = new BaseBlock[world.getMaxY() - world.getMinY() + 1];
|
||||
for (short yIndex = 0; yIndex <= world.getMaxY() - world.getMinY(); yIndex++) {
|
||||
BaseBlock block = world.getFullBlock(BlockVector3.at(x, yIndex + world.getMinY(), z));
|
||||
ids[yIndex] = block;
|
||||
|
@ -215,8 +215,8 @@ public class HybridUtils {
|
||||
int xx = chunkBlockX + x;
|
||||
for (int z = minZ; z <= maxZ; z++) {
|
||||
int zz = chunkBlockZ + z;
|
||||
for (int yIndex = 0; yIndex < minHeight; yIndex++) {
|
||||
int y = yIndex - minHeight;
|
||||
for (int yIndex = 0; yIndex < height; yIndex++) {
|
||||
int y = yIndex + minHeight;
|
||||
BlockState block = queue.getBlock(xx, y, zz);
|
||||
int xr = xb + x;
|
||||
int zr = zb + z;
|
||||
|
Loading…
Reference in New Issue
Block a user