Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

PathfinderGoal which picks randomly from a list of subgoals #24

Open
0ffz opened this issue Sep 12, 2020 · 0 comments
Open

PathfinderGoal which picks randomly from a list of subgoals #24

0ffz opened this issue Sep 12, 2020 · 0 comments

Comments

@0ffz
Copy link
Member

0ffz commented Sep 12, 2020

The goal would randomly pick subgoals until one works, and keep doing the one so long as it can keep executing. Unsure if this is what minecraft does with two equal priority goals, but we may want a weighted random option as well.

The idea would be to achieve this pattern after serialized:

pathfinders:
    1: !<random>
       - !<goal1> {}
       - !<goal2> {}

Unsure how a weighted random could work in this case, can't use maps because we may want repeated values.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant