Start Structure Verifier
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user