diff --git a/src/main/resources/assets/carpet/scripts/ai_tracker.sc b/src/main/resources/assets/carpet/scripts/ai_tracker.sc index e845d58a..c7ee3db8 100644 --- a/src/main/resources/assets/carpet/scripts/ai_tracker.sc +++ b/src/main/resources/assets/carpet/scripts/ai_tracker.sc @@ -1,5 +1,3 @@ -import('math','_euclidean'); - _command() -> ' ai_tracker allows to display some extra information about @@ -342,16 +340,16 @@ __config() ->{ 'commands'->{ ''->'_command', 'clear'->'clear', - 'toggle boxes'->_()->global_display_boxes = !global_display_boxes, - 'toggle '->['__toggle',null], - 'toggle villager '->_(d)->__toggle('villager_'+d,null), - 'toggle villager hostile_detection '->_(h)->__toggle('villager_hostile_detection',h), + 'toggle_boxes'->_()->global_display_boxes = !global_display_boxes, + ''->['__toggle',null], + 'villager '->_(d)->__toggle('villager_'+d,null), + 'villager hostile_detection '->_(h)->__toggle('villager_hostile_detection',h), 'update_frequency '->_(ticks)->(global_interval = ticks;global_duration = ticks + 2), 'transparency '->_(alpha)->global_opacity = alpha }, 'arguments'->{ 'display'->{'type'->'term','options'->['item_pickup','velocity','portal_cooldown','health','pathfinding','xpstack']}, - 'villager_display'->{'type'->'term','options'->['iron_golem_spawning','buddy_detection','hostile_detection','breeding']}, + 'aspect'->{'type'->'term','options'->['iron_golem_spawning','buddy_detection','hostile_detection','breeding']}, 'ticks'->{'type'->'int','min'->0,'max'->100}, 'alpha'->{'type'->'int','min'->0,'max'->255}, 'hostile'->{'type'->'term','options'->keys(global_hostile_to_villager)} @@ -425,7 +423,7 @@ __mark_path_element(path_element, visuals) -> __is_hostile(v, m) -> ( mob = m~'type'; - has(global_hostile_to_villager:mob) && (_euclidean(pos(v)-pos(m)) <= global_hostile_to_villager:mob) + has(global_hostile_to_villager:mob) && (sqrt(reduce(pos(v)-pos(m), _a+_*_ , 0)) <= global_hostile_to_villager:mob) );