fix: account for exclusivity of max build height where requires

- Fixes #3926
This commit is contained in:
dordsor21 2023-01-15 17:36:02 +00:00
parent abbac057ed
commit 4c980df1d9
No known key found for this signature in database
GPG Key ID: 1E53E88969FFCF0B
3 changed files with 5 additions and 5 deletions

View File

@ -144,7 +144,7 @@ public class ClassicPlotManager extends SquarePlotManager {
plot.getRegions(),
blocks,
classicPlotWorld.getMinBuildHeight(),
classicPlotWorld.getMaxBuildHeight(),
classicPlotWorld.getMaxBuildHeight() - 1,
actor,
queue
);
@ -175,7 +175,7 @@ public class ClassicPlotManager extends SquarePlotManager {
plot.getRegions(),
blocks,
classicPlotWorld.PLOT_HEIGHT + 1,
classicPlotWorld.getMaxBuildHeight(),
classicPlotWorld.getMaxBuildHeight() - 1,
actor,
queue
);
@ -281,7 +281,7 @@ public class ClassicPlotManager extends SquarePlotManager {
}
}
int maxY = classicPlotWorld.getMaxBuildHeight();
int maxY = classicPlotWorld.getMaxBuildHeight() - 1;
if (!plot.isMerged(Direction.NORTH)) {
int z = bottom.getZ();
for (int x = bottom.getX(); x <= top.getX(); x++) {

View File

@ -2506,7 +2506,7 @@ public class Plot {
}
}
int minHeight = getArea().getMinBuildHeight();
int maxHeight = getArea().getMaxBuildHeight();
int maxHeight = getArea().getMaxBuildHeight() - 1;
Location gtopabs = this.area.getPlotAbs(top).getTopAbs();
Location gbotabs = this.area.getPlotAbs(bot).getBottomAbs();
visited.addAll(Lists.newArrayList((Iterable<? extends PlotId>) PlotId.PlotRangeIterator.range(bot, top)));

View File

@ -106,7 +106,7 @@ public class WEManager {
.getTrusted().contains(uuid))) && !plot.getFlag(NoWorldeditFlag.class)) {
for (CuboidRegion region : plot.getRegions()) {
BlockVector3 pos1 = region.getMinimumPoint().withY(area.getMinBuildHeight());
BlockVector3 pos2 = region.getMaximumPoint().withY(area.getMaxBuildHeight());
BlockVector3 pos2 = region.getMaximumPoint().withY(area.getMaxBuildHeight() - 1);
CuboidRegion copy = new CuboidRegion(pos1, pos2);
regions.add(copy);
}