Correct height in HybridUtils, also use minGenHeight + 1

This commit is contained in:
dordsor21 2022-02-09 13:12:39 +00:00 committed by Jordan
parent 6cb88505a9
commit 8e9a142be8

View File

@ -147,7 +147,7 @@ public class HybridUtils {
final int ctz = tz >> 4; final int ctz = tz >> 4;
final int width = tx - bx + 1; final int width = tx - bx + 1;
final int length = tz - bz + 1; final int length = tz - bz + 1;
final int height = area.getMaxGenHeight() - area.getMinGenHeight(); final int height = area.getMaxGenHeight() - area.getMinGenHeight() + 1;
final int minHeight = area.getMinGenHeight(); final int minHeight = area.getMinGenHeight();
final PlotArea area = this.plotAreaManager.getPlotArea(world, null); final PlotArea area = this.plotAreaManager.getPlotArea(world, null);
@ -698,7 +698,7 @@ public class HybridUtils {
} }
if (condition) { if (condition) {
BaseBlock[] blocks = plotWorld.G_SCH.get(MathMan.pair(absX, absZ)); BaseBlock[] blocks = plotWorld.G_SCH.get(MathMan.pair(absX, absZ));
int minY = Settings.Schematics.PASTE_ROAD_ON_TOP ? plotWorld.SCHEM_Y : area.getMinBuildHeight(); int minY = Settings.Schematics.PASTE_ROAD_ON_TOP ? plotWorld.SCHEM_Y : area.getMinGenHeight() + 1;
int maxDy = Math.max(extend, blocks.length); int maxDy = Math.max(extend, blocks.length);
for (int dy = 0; dy < maxDy; dy++) { for (int dy = 0; dy < maxDy; dy++) {
if (dy > blocks.length - 1) { if (dy > blocks.length - 1) {