export function breakShield(e){if("minecraft:player"!==e.typeId)return!1;const n=e.getComponent("equippable");return void 0!==n.getEquipment("Mainhand")&&e.isSneaking&&"minecraft:shield"===n.getEquipment("Mainhand").typeId?(n.setEquipment("Mainhand"),e.runCommand("/playsound item.shield.block @a[r=16] ~~~"),e.runCommand("/playsound mob.zombie.woodbreak @a[r=16] ~~~"),!0):!(void 0===n.getEquipment("Offhand")||!e.isSneaking||"minecraft:shield"!==n.getEquipment("Offhand").typeId)&&(n.setEquipment("Offhand"),e.runCommand("/playsound item.shield.block @a[r=16] ~~~"),e.runCommand("/playsound mob.zombie.woodbreak @a[r=16] ~~~"),!0)}export function freezeWater(e){let n=e.getBlockFromViewDirection({maxDistance:13,includeLiquidBlocks:!0,includePassableBlocks:!0});if(void 0===n)return;let i=n.block.location;e.runCommand("/fill "+(i.x-3)+" "+i.y+" "+(i.z-3)+" "+(i.x+3)+" "+i.y+" "+(i.z+3)+" frosted_ice [] replace water")}