MineInAbyss / Mobzy

Config-driven custom mobs for Spigot using ECS
https://mineinabyss.com/Mobzy/
MIT License
41 stars 7 forks source link

Conditional PathfinderGoal #57

Open 0ffz opened 3 years ago

0ffz commented 3 years ago

A pathfinder that would take a list of GearyConditions and map of ints to other pathfinders.

If the conditions are met, try to run the pathfinders based on priority as defined by the map.

Syntax goal:

goals:
  1: !<if>
    conditions:
      - !<health>
        within: 0..10
    run:
      1: !<mobzy:behaviour.throw_items> {}
      2: !<anothergoal> {}

Check out geary's ConditionalAction for a really similar example

P.S. if someone has a better name than conditions for the list of conditions, lemme know!