Fix stupid minecraft
This commit is contained in:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user