Block verifier correct

This commit is contained in:
ForestOfLight
2025-04-15 02:23:21 -07:00
Unverified
parent 567abd0f5f
commit 296af63134
7 changed files with 85 additions and 34 deletions
+5 -7
View File
@@ -92,12 +92,8 @@ export class StructureInstance {
*getBlocks() {
const max = this.#structure.size;
for (let x = 0; x < max.x; x++) {
for (let y = 0; y < max.y; y++) {
for (let z = 0; z < max.z; z++) {
yield this.#structure.getBlockPermutation({ x, y, z });
}
}
for (let y = 0; y < max.y; y++) {
yield * this.getLayerBlocks(y);
}
}
@@ -105,7 +101,9 @@ export class StructureInstance {
const max = this.#structure.size;
for (let x = 0; x < max.x; x++) {
for (let z = 0; z < max.z; z++) {
yield this.#structure.getBlockPermutation({ x, y, z });
const blockPermutation = this.#structure.getBlockPermutation({ x, y, z });
blockPermutation.location = { x, y, z };
yield blockPermutation;
}
}
}