Refactoring StructureInstance
This commit is contained in:
@@ -31,7 +31,8 @@ export class StructureStatistics {
|
||||
}
|
||||
|
||||
getNonAirBlocks() {
|
||||
return this.instance.getActiveVolume() - this.verification.correctlyAir;
|
||||
const activeBounds = this.instance.getActiveBounds();
|
||||
return activeBounds.min.volume(activeBounds.max) - this.verification.correctlyAir;
|
||||
}
|
||||
|
||||
getStat(blockVerificationLevel) {
|
||||
@@ -45,7 +46,7 @@ export class StructureStatistics {
|
||||
getMessage() {
|
||||
let message = '';
|
||||
message += `§fStatistics for §a${this.instance.name}§f:`;
|
||||
if (this.instance.isUsingLayers())
|
||||
if (this.instance.hasLayerSelected())
|
||||
message += ` §7(layer ${this.instance.getLayer()})`;
|
||||
message += `\n§7Blocks: §2${this.getNonAirBlocks()}\n`;
|
||||
const skipped = this.getSkipped();
|
||||
|
||||
Reference in New Issue
Block a user