How to get the location of the broken block in blockbreak event?
i cant get the sign's component, it returns undefined, and i can't copy the text of the sign for the sign replacement
world.events.blockBreak.subscribe(block => {
let {x, y, z} = block.player.location //location of player
let blockPermutation = block.brokenBlockPermutation
let blockID = blockPermutation.type.id
let sign = block.player.dimension.getBlock(block.block.location)
const content = sign.getComponent('sign') //this returns undefined idk why
const text = content.getText().split("\n")
console.warn(text)
dimension.fillBlocks(block.block.location,block.block.location,blockPermutation) // and this doesn't include the sign's text for some reason
})