mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00: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
This commit is contained in:
parent
34c31dc020
commit
5de4cfced2
@ -336,9 +336,9 @@ public class CuboidRegion extends AbstractRegion implements FlatRegion {
|
|||||||
Vector min = getMinimumPoint();
|
Vector min = getMinimumPoint();
|
||||||
Vector max = getMaximumPoint();
|
Vector max = getMaximumPoint();
|
||||||
|
|
||||||
return x >= min.getBlockX() && x <= max.getBlockX()
|
return x >= min.getBlockX() && x < max.getBlockX() + 1
|
||||||
&& y >= min.getBlockY() && y <= max.getBlockY()
|
&& y >= min.getBlockY() && y < max.getBlockY() + 1
|
||||||
&& z >= min.getBlockZ() && z <= max.getBlockZ();
|
&& z >= min.getBlockZ() && z < max.getBlockZ() + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user