mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-28 20:19:00 +01:00
Added method to count the blocks in a cuboid region
This commit is contained in:
parent
a02fe633e2
commit
71aaa574b2
@ -114,6 +114,11 @@ public String getTypeName() {
|
||||
* @return
|
||||
*/
|
||||
public int countBlocks() {
|
||||
return 1;
|
||||
int xLength = max.getBlockX() - min.getBlockX() + 1;
|
||||
int yLength = max.getBlockY() - min.getBlockY() + 1;
|
||||
int zLength = max.getBlockZ() - min.getBlockZ() + 1;
|
||||
|
||||
int volume = xLength * yLength * zLength;
|
||||
return volume;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user