feat: rework commands and fix bugs

This commit is contained in:
ForestOfLight
2026-05-20 17:08:03 -07:00
Unverified
parent b1370b5d28
commit 7ea64d1e6a
38 changed files with 527 additions and 525 deletions
@@ -1,6 +1,6 @@
import { world } from "@minecraft/server";
import { Vector } from "../../lib/Vector";
import { InvalidStructureError } from "../Errors/InvalidStructureError";
import { StructureNotFoundError } from "../Errors/StructureNotFoundError";
export class Structure {
structureId;
@@ -10,7 +10,7 @@ export class Structure {
this.structureId = structureId;
this.#structure = world.structureManager.get(structureId);
if (!this.#structure)
throw new InvalidStructureError(`[Construct] Structure '${structureId}' not found on world.`);
throw new StructureNotFoundError(structureId);
this.#structure.saveToWorld();
}