import*as mc from"@minecraft/server";import*as effects from"../effects";import*as selectors from"../utils/selectors";import*as vector from"../utils/vector";import{EXCLUDED_ENTITIES}from"../playerAbilities";export function tick1(e){if(e.hasTag("hf_mzs_hit"))return;let i;selectors.union({location:{x:e.location.x,y:e.location.y,z:e.location.z},maxDistance:1.5,excludeFamilies:["inanimate"],excludeTypes:EXCLUDED_ENTITIES},[],e.dimension,e.id).forEach((e=>{e.isValid()&&e.applyDamage(3),effects.applyFreezeEffect(e,60)})),i=void 0!==e.getDynamicProperty("hf_mzs:x_dir")?{x:e.getDynamicProperty("hf_mzs:x_dir"),y:e.getDynamicProperty("hf_mzs:y_dir"),z:e.getDynamicProperty("hf_mzs:z_dir")}:vector.down;const t=e.dimension.getBlockFromRay(e.location,i,{maxDistance:1.4,includeLiquidBlocks:!1,includePassableBlocks:!1});e.teleport(vector.add(e.location,vector.multiply(i,1.4))),void 0!==t&&(e.addTag("hf_mzs_hit"),e.runCommand("/tp @s ~~-4~"))}