Refactoring StructureInstance

This commit is contained in:
ForestOfLight
2025-04-18 01:22:50 -07:00
Unverified
parent 35b7575d2f
commit 80aed5f349
16 changed files with 372 additions and 313 deletions
@@ -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();