This commit is contained in:
2024-08-05 12:06:10 +02:00
parent d41fefe098
commit 7259b53176
9 changed files with 61 additions and 31 deletions

View File

@@ -1,4 +1,4 @@
import { Entity, MinecraftEntityTypes, Vector3, world } from "@minecraft/server";
import { Entity, Vector3, world } from "@minecraft/server";
import { Vector3ToString, vector3 } from "./vectorUtils";
import { mindKeeper } from "../../main";
function teleportAgent(position: Vector3) {

View File

@@ -37,11 +37,11 @@ function rotate(pos: Vector3, angle: number) {
return vector3(newX, pos.y, newZ);
}
const particleData = new MolangVariableMap().setColorRGB("variable.color", {
const particleData = new MolangVariableMap();
particleData.setColorRGB("variable.color", {
red: 1,
green: 1,
blue: 1,
alpha: 1,
});
function drawArrow(offsetPos: Vector3) {

View File

@@ -1,4 +1,4 @@
import { BlockType, MinecraftBlockTypes, Vector3, world } from "@minecraft/server";
import { BlockType, BlockVolume, MinecraftBlockTypes, Vector3, world } from "@minecraft/server";
type Wall = {
startPos: Vector3;
@@ -6,11 +6,13 @@ type Wall = {
};
function clearWall(wall: Wall) {
world.getDimension("overworld").fillBlocks(wall.startPos, wall.endPos, MinecraftBlockTypes.air);
let volume: BlockVolume = new BlockVolume(wall.startPos, wall.endPos);
world.getDimension("overworld").fillBlocks(volume, MinecraftBlockTypes.air);
}
function fillWall(wall: Wall, block: BlockType) {
world.getDimension("overworld").fillBlocks(wall.startPos, wall.endPos, block);
let volume: BlockVolume = new BlockVolume(wall.startPos, wall.endPos);
world.getDimension("overworld").fillBlocks(volume, block);
}
function startLevel(commandBlockPos: Vector3) {