Before Format Wars

This commit is contained in:
2024-08-29 10:45:07 +02:00
parent 35af9ffc97
commit 545e47a9f3
20 changed files with 1243 additions and 399 deletions

View File

@@ -1,5 +1,5 @@
import { Entity, Vector3, world } from "@minecraft/server";
import { Vector3ToString, vector3 } from "./vectorUtils";
import { Vector3Add, Vector3ToString, vector3 } from "./vectorUtils";
import { mindKeeper } from "../../main";
//Make a facing with vector3
@@ -11,10 +11,11 @@ function teleportAgent(position: Vector3, facing: Vector3 = vector3(0, 0, 0)): v
.getDimension("overworld")
.runCommand(`/execute as @a run tp @e[type=agent] ${position.x} ${position.y} ${position.z}`);
} else {
let facing2 = Vector3Add(position, facing);
world
.getDimension("overworld")
.runCommand(
`/execute as @a run tp @e[type=agent] ${position.x} ${position.y} ${position.z} facing ${facing.x} ${facing.y} ${facing.z}`
`/execute as @a run tp @e[type=agent] ${position.x} ${position.y} ${position.z} facing ${facing2.x} ${facing2.y} ${facing2.z}`
);
}
}