export function breakNorthSouth(location, dimension, blocksToBreak, enchantment) {
    for (let x = -1; x <= 1; x++) {
        for (let y = -1; y <= 1; y++) {
            const replaceBlock = dimension.getBlock({
                x: location.x + x,
                y: location.y + y,
                z: location.z
            });
            if (blocksToBreak.includes(replaceBlock.typeId)) {
                if (enchantment) {
                    dimension.spawnItem(replaceBlock.getItemStack(), replaceBlock);
                    replaceBlock.setType('minecraft:air');
                }
                else
                    dimension.runCommand(`setblock ${replaceBlock.x} ${replaceBlock.y} ${replaceBlock.z} air destroy`);
            }
        }
    }
}
export function breakEastWest(location, dimension, blocksToBreak, enchantment) {
    for (let z = -1; z <= 1; z++) {
        for (let y = -1; y <= 1; y++) {
            const replaceBlock = dimension.getBlock({
                x: location.x,
                y: location.y + y,
                z: location.z + z
            });
            if (blocksToBreak.includes(replaceBlock.typeId)) {
                if (enchantment) {
                    dimension.spawnItem(replaceBlock.getItemStack(), replaceBlock);
                    replaceBlock.setType('minecraft:air');
                }
                else
                    dimension.runCommand(`setblock ${replaceBlock.x} ${replaceBlock.y} ${replaceBlock.z} air destroy`);
            }
        }
    }
}
export function breakUpDown(location, dimension, blocksToBreak, enchantment) {
    for (let x = -1; x <= 1; x++) {
        for (let z = -1; z <= 1; z++) {
            const replaceBlock = dimension.getBlock({
                x: location.x + x,
                y: location.y,
                z: location.z + z
            });
            if (blocksToBreak.includes(replaceBlock.typeId)) {
                if (enchantment) {
                    dimension.spawnItem(replaceBlock.getItemStack(), replaceBlock);
                    replaceBlock.setType('minecraft:air');
                }
                else
                    dimension.runCommand(`setblock ${replaceBlock.x} ${replaceBlock.y} ${replaceBlock.z} air destroy`);
            }
        }
    }
}
