const location = {x: 0, y: -59, z: 0}
const id = system.runInterval(() => {
if (world.getDynamicProperty('blockPlaced')) return system.clearRun(id)
let block = world.getDimension('overworld').getBlock(location)
if (block != undefined) {
block.setType('cobblestone')
world.setDynamicProperty('blockPlaced', true)
}
})
#/Setblock at world start
1 messages · Page 1 of 1 (latest)
Perfect but getBlock can throw an error when unloaded.
try {
// get block
} catch {}
This is probably a typo in the documentation.
Nah documention aint up to date fr
For me it return undefined
Because you are accessing a loaded block or one in ticking area
Not at all
I'll check it later
Kk