Start Structure Verifier

This commit is contained in:
ForestOfLight
2025-04-13 18:15:28 -07:00
Unverified
parent 1a56192682
commit 184d2abdcd
4 changed files with 128 additions and 4 deletions
+12 -4
View File
@@ -75,6 +75,10 @@ export class StructureInstance {
return this.#options.currentLayer || 0;
}
getBlock(structureLocation) {
return this.#structure.getBlockPermutation(structureLocation);
}
*getBlocks() {
const max = this.#structure.size;
for (let x = 0; x < max.x; x++) {
@@ -95,10 +99,6 @@ export class StructureInstance {
}
}
getBlock(structureLocation) {
return this.#structure.getBlockPermutation(structureLocation);
}
getBounds() {
return {
min: { x: 0, y: 0, z: 0 },
@@ -115,6 +115,10 @@ export class StructureInstance {
};
}
getTotalVolume() {
return this.#structure.size.x * this.#structure.size.y * this.#structure.size.z;
}
rename(newName) {
world.setDynamicProperty(`structOptions:${this.name}`, void 0);
this.name = newName;
@@ -241,4 +245,8 @@ export class StructureInstance {
else
this.setLayer(this.#options.currentLayer - 1);
}
getDimension() {
return world.getDimension(this.#options.dimensionId);
}
}