Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial docs for Entity Pathfinders and Mob Goal API #289

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

olijeffers0n
Copy link
Member

I have not extensively used either of these API's in the past, however these seem to work

@MiniDigger
Copy link
Member

this needs notes on how vanilla selects which goals to activate and prolly some more caveats on how pathfinding works from somebody who actually uses the pathfinder, iirc it can ge all kinda wonky to call moveTo every tick.

@Override
public void stop() {
// This is called when the goal stops. In this case, we just send a message to the player.
player.sendMessage(text("I Stopped following you!"));
Copy link
Sponsor Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
player.sendMessage(text("I Stopped following you!"));
player.sendMessage(text("I stopped following you!"));

boolean success = pathfinder.moveTo(player.getLocation());
```

If we want to access the current Path for the cow, we can call `getCurrentPath()` on the pathfinder:
Copy link
Sponsor Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If we want to access the current Path for the cow, we can call `getCurrentPath()` on the pathfinder:
If we want to access the current path for the cow, we can call `getCurrentPath()` on the pathfinder:

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

Successfully merging this pull request may close these issues.

None yet

4 participants