mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 17:57:38 +00:00
Fix off by one error when calculating Poly2D region dimensions.
This commit is contained in:
parent
ab693a7521
commit
3f1a2bfc39
@ -250,7 +250,7 @@ public class Polygonal2DRegion extends AbstractRegion implements FlatRegion {
|
|||||||
* @return width
|
* @return width
|
||||||
*/
|
*/
|
||||||
public int getWidth() {
|
public int getWidth() {
|
||||||
return max.getBlockX() - min.getBlockX();
|
return max.getBlockX() - min.getBlockX() + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -259,7 +259,7 @@ public class Polygonal2DRegion extends AbstractRegion implements FlatRegion {
|
|||||||
* @return height
|
* @return height
|
||||||
*/
|
*/
|
||||||
public int getHeight() {
|
public int getHeight() {
|
||||||
return maxY - minY;
|
return maxY - minY + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -268,7 +268,7 @@ public class Polygonal2DRegion extends AbstractRegion implements FlatRegion {
|
|||||||
* @return length
|
* @return length
|
||||||
*/
|
*/
|
||||||
public int getLength() {
|
public int getLength() {
|
||||||
return max.getBlockZ() - min.getBlockZ();
|
return max.getBlockZ() - min.getBlockZ() + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user