mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-02-28 18:21:20 +01:00
Fix off-by-one in area calculation.
Even the volume calculation had it correct. Also fix code style in contains.
This commit is contained in:
parent
0f72811bfc
commit
3a332fd87d
@ -139,8 +139,8 @@ public RegionType getType() {
|
|||||||
Area toArea() {
|
Area toArea() {
|
||||||
int x = getMinimumPoint().getBlockX();
|
int x = getMinimumPoint().getBlockX();
|
||||||
int z = getMinimumPoint().getBlockZ();
|
int z = getMinimumPoint().getBlockZ();
|
||||||
int width = getMaximumPoint().getBlockX() - x;
|
int width = getMaximumPoint().getBlockX() - x + 1;
|
||||||
int height = getMaximumPoint().getBlockZ() - z;
|
int height = getMaximumPoint().getBlockZ() - z + 1;
|
||||||
return new Area(new Rectangle(x, z, width, height));
|
return new Area(new Rectangle(x, z, width, height));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user