import*as mc from"@minecraft/server";import{blockComponents}from"./utils/Components";import{log}from"./utils/Logger";class LightBlock{onTick(o){const i=o.block,t=o.dimension,n=mc.world.getDynamicProperty(`${t.id}:${i.x}:${i.y}:${i.z}`);if(null!=n){const o=JSON.parse(n);if("light_block"==o?.type){null==t.getEntitiesAtBlockLocation(i).find((i=>i.id==o?.owner&&i.hasTag("snst_bckp:glowing")))&&(mc.world.setDynamicProperty(`${t.id}:${i.x}:${i.y}:${i.z}`,void 0),t.runCommand(`setblock ${i.x} ${i.y} ${i.z} air`))}}else mc.world.setDynamicProperty(`${t.id}:${i.x}:${i.y}:${i.z}`,void 0),t.runCommand(`setblock ${i.x} ${i.y} ${i.z} air`)}}blockComponents["snst_bckp:light_block"]=new LightBlock;