3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-03 01:50:07 +01:00

Fix region contain method

The region contain method was broken.
A lot of subsquent issues are caused by this bug.
E.g. in a selection the entities in the last blocks at the positive-axis border are not selected.

Max block gives the impression of an exclusive point; however it is inclusive!
A position that is anywhere between of a 1x1x1 region, would return false in the old implementation.

By simply adding a one this should solve the problem.

Greetings
Dieser Commit ist enthalten in:
Michael 2016-09-13 09:26:23 +02:00 committet von GitHub
Ursprung 34c31dc020
Commit 5de4cfced2

Datei anzeigen

@ -336,9 +336,9 @@ public class CuboidRegion extends AbstractRegion implements FlatRegion {
Vector min = getMinimumPoint();
Vector max = getMaximumPoint();
return x >= min.getBlockX() && x <= max.getBlockX()
&& y >= min.getBlockY() && y <= max.getBlockY()
&& z >= min.getBlockZ() && z <= max.getBlockZ();
return x >= min.getBlockX() && x < max.getBlockX() + 1
&& y >= min.getBlockY() && y < max.getBlockY() + 1
&& z >= min.getBlockZ() && z < max.getBlockZ() + 1;
}
@Override