import*as mc from"@minecraft/server";import*as effects from"../effects";import*as selectors from"../utils/selectors";import*as vector from"../utils/vector";export function tick1(t){const e=t.dimension.getBlock(vector.add(t.location,{x:0,y:-1,z:0}));if(!e.isAir){const o=e.above().location;t.dimension.setBlockType(o,t.getProperty("hf_mzs:red")?"hf_mzs:red_raked_sand":"hf_mzs:raked_sand");const r=t.dimension.getBlock(o);let s=r.permutation;s=s.withState("minecraft:cardinal_direction",t.getProperty("hf_mzs:cardinal_direction")),s=s.withState("hf_mzs:corner",t.getProperty("hf_mzs:corner")),s=s.withState("hf_mzs:north_east",t.getProperty("hf_mzs:north_east")),s=s.withState("hf_mzs:north_west",t.getProperty("hf_mzs:north_west")),s=s.withState("hf_mzs:south_east",t.getProperty("hf_mzs:south_east")),s=s.withState("hf_mzs:south_west",t.getProperty("hf_mzs:south_west")),r.setPermutation(s),t.dimension.playSound("dig.sand",t.location,{volume:1,pitch:1}),"minecraft:torch"!==e.typeId&&"minecraft:redstone_torch"!==e.typeId||t.runCommand("setblock ~~~ air destroy"),t.remove()}}