import*as mc from"@minecraft/server";const umvuthanaBlocks=["minecraft:stripped_mangrove_log","minecraft:stripped_mangrove_wood","minecraft:stripped_oak_wood","minecraft:acacia_slab","minecraft:red_sandstone_slab","minecraft:acacia_stairs","minecraft:red_sandstone_stairs","minecraft:magma","hf_mzs:clawed_log","minecraft:mangrove_fence","minecraft:iron_bars","minecraft:skull","minecraft:chest"];function isUmvuthanaBlock(a){for(let t=0;t<umvuthanaBlocks.length;t++)if(umvuthanaBlocks[t]===a)return!0;return!1}export function onBreakBlockUmvuthana(a){isUmvuthanaBlock(a.block.typeId)&&mc.system.run((()=>{markUmvuthanaTarget(a.player)}))}export function onPlaceBlockUmvuthana(a){void 0!==a.player.dimension.getEntities({maxDistance:32,families:["hf_mzs_structure_umvuthana_village"],location:a.player.location})[0]&&markUmvuthanaTarget(a.player)}export function onHitBlockUmvuthana(a){"minecraft:frame"===a.hitBlock.typeId&&markUmvuthanaTarget(a.damagingEntity)}export function markUmvuthanaTarget(a){a.typeId.includes("umvuthana")||"minecraft:player"===a.typeId&&"creative"===a.getGameMode()||(a.addTag("hf_mzs_targetted_by_umvuthana"),a.setDynamicProperty("hf_mzs:umuthana_target_timer",60))}export function umvuthanaTargetTimePass(a){const t=a.getDynamicProperty("hf_mzs:umuthana_target_timer");void 0!==t&&(t>0&&a.setDynamicProperty("hf_mzs:umuthana_target_timer",t-1),0===t&&a.removeTag("hf_mzs_targetted_by_umvuthana"))}