Added method to count the blocks in a cuboid region

This commit is contained in:
DarkLiKally 2011-02-26 13:11:27 +01:00
parent a02fe633e2
commit 71aaa574b2

View File

@ -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;
}
}