mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-23 13:46:45 +01:00
Improve plot getVolume method readability
This commit is contained in:
parent
a100f497b5
commit
c875487173
@ -1619,9 +1619,8 @@ public class Plot {
|
|||||||
public double getVolume() {
|
public double getVolume() {
|
||||||
double count = 0;
|
double count = 0;
|
||||||
for (CuboidRegion region : getRegions()) {
|
for (CuboidRegion region : getRegions()) {
|
||||||
count += (region.getMaximumPoint().getX() - (double) region.getMinimumPoint().getX() + 1) *
|
// CuboidRegion#getArea is deprecated and we want to ensure use of correct height
|
||||||
(region.getMaximumPoint().getZ() - (double) region.getMinimumPoint().getZ() + 1) *
|
count += region.getLength() * region.getWidth() * (area.getMaxGenHeight() - area.getMinGenHeight() + 1);
|
||||||
(area.getMaxGenHeight() - area.getMinGenHeight() + 1);
|
|
||||||
}
|
}
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user