anyone know how to fix this
[Scripting][error]-TypeError: not a function at _destroyConnectedBlocks (main.js:73) at veinmine (main.js:60) at <anonymous> (main.js:89)
class VeinMiner {
constructor(dimension, blockId) {
this.blocksBroken = -1
this.dimension = dimension
this.blockId = blockId
this.queue = []
}
veinmine(player, blockLocation) {
this._destroyConnectedBlocks(blockLocation)
for (const bl of this.queue) {
// make sure that the block has not been destroyed while this function was waiting in the queue and it hasnt reached the block limit
if (this.dimension.getBlock(bl).id == this.blockId && this.blocksBroken < 150) {
this._destroyConnectedBlocks(bl)
}
}
player.addEffect(MinecraftEffectTypes.hunger, 20, Math.min(Math.ceil(this.blocksBroken / 3.5), 255))
}
_destroyConnectedBlocks(blockLocation) {
this.dimension.runCommand(`setblock ${blockLocation.x} ${blockLocation.y} ${blockLocation.z} air 0 destroy`)
this.blocksBroken++
let blockLocations = new BlockLocation(blockLocation.x + 1, blockLocation.y + 1, blockLocation.z + 1).blocksBetween(new BlockLocation(blockLocation.x - 1, blockLocation.y - 1, blockLocation.z - 1))
for (const bl of blockLocations) {
let block = this.dimension.getBlock(bl)
if (block.id == this.blockId) {
this.queue.push(bl)
}
}
}
}
world.events.blockBreak.subscribe(e => {
if (e.player.isSneaking && !e.player.hasTag('veinminer:veinminerDisabled')) {
new VeinMiner(e.block.dimension, e.brokenBlockPermutation.type.id).veinmine(e.player, e.block.location)
}
})```