Before Format Wars
This commit is contained in:
@@ -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}`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user