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
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
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:


## Stopping the Pathfinder

You can call `stopPathfinding()` on the pathfinder to stop the pathfinder. This will stop the pathfinder and clear the
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems a bit redundant

@@ -0,0 +1,126 @@
---
slug: /dev/mob-goals
description: A guide to the PDC API for storing data.
Copy link
Contributor

Choose a reason for hiding this comment

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

This is wrong

}

@Override
public @NotNull GoalKey<Camel> getKey() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can remove the NotNull annotations it's better to assume types are not null by default

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.

5 participants