fix
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user