import*as mc from"@minecraft/server";import*as selectors from"../utils/selectors";export function eventBehavior(e){const i=e.entity;if("minecraft:entity_spawned"===e.eventId){let e=selectors.union({location:i.location,maxDistance:15},["pig","sheep","cow","chicken"],i.dimension,i.id);if(void 0!==e[0])return void i.remove();if(e=selectors.union({location:i.location,maxDistance:32},["villager","illager"],i.dimension,i.id),void 0!==e[0])return void i.remove();if(e=selectors.union({location:i.location,maxDistance:42},["hf_mzs_umvuthana"],i.dimension,i.id),e.length>=5)return void i.remove();i.triggerEvent("spawn")}}