Fix stupid minecraft

This commit is contained in:
2024-08-05 13:31:08 +02:00
parent 7259b53176
commit cd5f473460
24 changed files with 7208 additions and 156 deletions

View File

@@ -1,4 +1,5 @@
import { BlockType, BlockVolume, MinecraftBlockTypes, Vector3, world } from "@minecraft/server";
import { BlockType, BlockTypes, BlockVolume, Vector3, world } from "@minecraft/server";
import { MinecraftBlockTypes } from "../../vanilla-data/mojang-block";
type Wall = {
startPos: Vector3;
@@ -7,7 +8,7 @@ type Wall = {
function clearWall(wall: Wall) {
let volume: BlockVolume = new BlockVolume(wall.startPos, wall.endPos);
world.getDimension("overworld").fillBlocks(volume, MinecraftBlockTypes.air);
world.getDimension("overworld").fillBlocks(volume, MinecraftBlockTypes.Air);
}
function fillWall(wall: Wall, block: BlockType) {
@@ -16,7 +17,8 @@ function fillWall(wall: Wall, block: BlockType) {
}
function startLevel(commandBlockPos: Vector3) {
world.getDimension("overworld").fillBlocks(commandBlockPos, commandBlockPos, MinecraftBlockTypes.redstoneBlock);
let volume: BlockVolume = new BlockVolume(commandBlockPos, commandBlockPos);
world.getDimension("overworld").fillBlocks(volume, MinecraftBlockTypes.RedstoneBlock);
}
BlockTypes;
export { Wall, clearWall, fillWall, startLevel };