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}`
);
}
}

View File

@@ -222,6 +222,12 @@ function spawnParticle(
return;
}
map.setVector3("variable.direction", vector3(0, 0, 0));
// map.setFloat("Variable.r", 2);
map.setColorRGB("variable.color", {
red: 1,
green: 1,
blue: 1,
});
const dimension = world.getDimension("overworld");
if (dimension) {