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

Custom Goals from the mod are not added to existing entities #111

Open
SuperHeroBaga opened this issue Apr 22, 2024 · 0 comments
Open

Custom Goals from the mod are not added to existing entities #111

SuperHeroBaga opened this issue Apr 22, 2024 · 0 comments

Comments

@SuperHeroBaga
Copy link

All the custom goals from the mod (like the cleric that heals, villagers that run away from polar bears, witches that attack villagers, and all the others), are added to their goal selectors only when the entity has been newly spawned (such as with a spawn egg, with the summon command or new chunks loaded with new entities spawned with them). Entities that are loaded upon re-entering a world or re-loading chunks that were originally already explored in the world won't have any of the custom goals, this is a pretty big deal because that means they will be present in only one session! (not even if the players gets far enough from the entities to unload the chunks they are on and then come back just to find out they lost all the additional goals, and yes rejoining the world won't do it).

The issue probably stands to the fact that the method the line of code that deals with adding all the goals to the entities is called only in some cases, one of them not being loading existing or saved in disk entities which are dealt by another method.

To solve the bug changing the method you are injecting that line of code to another more appropriate method or simply putting it there too will certainly do it.

Hope you can fix the issue because I really love your mod!

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

No branches or pull requests

1 participant