fixed ai_tracker commands
This commit is contained in:
1 parent
0fd7057138
commit
6ef85437a9
1 file changed
+6
-8
@@ -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 <display>'->['__toggle',null],
|
||||
'toggle villager <villager_display>'->_(d)->__toggle('villager_'+d,null),
|
||||
'toggle villager hostile_detection <hostile>'->_(h)->__toggle('villager_hostile_detection',h),
|
||||
'toggle_boxes'->_()->global_display_boxes = !global_display_boxes,
|
||||
'<display>'->['__toggle',null],
|
||||
'villager <aspect>'->_(d)->__toggle('villager_'+d,null),
|
||||
'villager hostile_detection <hostile>'->_(h)->__toggle('villager_hostile_detection',h),
|
||||
'update_frequency <ticks>'->_(ticks)->(global_interval = ticks;global_duration = ticks + 2),
|
||||
'transparency <alpha>'->_(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)
|
||||
);
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user