import*as mc from"@minecraft/server";import*as vector from"../utils/vector";import*as sculptor from"../entities/sculptor";export function useMobRemover(t){const e=t.damagingEntity,o=t.hitEntity;if("minecraft:player"===e.typeId){const t=e.getComponent("equippable").getEquipment(mc.EquipmentSlot.Mainhand);t&&"hf_mzs:mob_remover"===t.typeId&&mc.system.run((()=>{if(o&&o.isValid()){const[t,e]=o.typeId.split(":");if("hf_mzs"===t){if("hf_mzs:boulder"===o.typeId)return void o.triggerEvent("hf_mzs:on_hit");"hf_mzs:sculptor"===o.typeId&&sculptor.removeChildren(o,!0),o.dimension.spawnParticle("hf_mzs:death_small",o.location),o.dimension.playSound("random.pop",o.location,{volume:1,pitch:.75}),o.remove()}}}))}}