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

Handle mobs in unloaded chunks #9

Open
Maxopoly opened this issue Nov 10, 2015 · 4 comments
Open

Handle mobs in unloaded chunks #9

Maxopoly opened this issue Nov 10, 2015 · 4 comments
Labels

Comments

@Maxopoly
Copy link

If the plugin is reloaded or disabled, mobs in unloaded chunks wont be killed and they will no longer be tracked internally. Any control over them is lost. Either safe the uuids in a db or find a way to kill everything.

@Maxopoly Maxopoly added the bug label Nov 11, 2015
@suirad
Copy link

suirad commented Mar 22, 2016

You could probably hook OnChunkLoad and then call chunk.getEntities() and that should help with this problem. That along with enumerating all entities on plugin load/enable should be able to alleviate this.

@Maxopoly
Copy link
Author

Iterating over entities on load/enable doesnt include entities in unloaded chunks, which is the big problem.

@suirad
Copy link

suirad commented Mar 22, 2016

But what I am saying is, the entities that aren't loaded will not have an impact until they are loaded. So hooking them as the chunk loads will give you the opportunity to either track or clear them as needed.

@Maxopoly
Copy link
Author

Yeah, I'll probably have to do something like that

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

No branches or pull requests

2 participants