import { world ,system,BlockPermutation} from "@minecraft/server"
import {updateStairsAround,updateGravity,UpdateBlocksAround} from "./block_update.js"

world.afterEvents.playerPlaceBlock.subscribe(ev => {
    var block = ev.block
    if(block.hasTag("stairs"))
        updateStairsAround(block)
    updateGravity(block)
    UpdateBlocksAround(block)
    
    if(block.typeId == 'edx:redwood_leaves')
        block.setPermutation(BlockPermutation.resolve(block.typeId, {"edx:can_despawn": "false","edx:decay_tier": 8 }));
})