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

[1.7.10 / 1180] ChunkIOExecutor.syncChunkLoad not caching #1429

Closed
MaineQat opened this issue Sep 24, 2014 · 2 comments
Closed

[1.7.10 / 1180] ChunkIOExecutor.syncChunkLoad not caching #1429

MaineQat opened this issue Sep 24, 2014 · 2 comments

Comments

@MaineQat
Copy link

While working on our mod, I noticed that our custom Entity would be constantly re-read during chunk load via readEntityFromNBT, even while little activity was occurring.

After further analysis, I discovered that the same chunks were being constantly re-loaded - every frame, but never unloaded. Chunks loaded with ChunkIOExecutor.syncChunkLoad are not added to the ChunkProviderServer's loadedChunkHashMap, which can cause them to be loaded repeatedly (with a ChunkEvent.Load each time) and never trigger a ChunkEvent.Unload.

This is silent behavior, so there is nothing useful in logs.

It is more likely to be triggered by logic that looks at blocks near edges of the loaded world (e.g, an Entity AI task that looks at nearby blocks when an entity is at the edge of the loaded world).

It seems that the chunk should be cached for a short while, or at least for the remainder of the frame.

@yuuka-miya
Copy link

As I posted on forums:

Does the issue persist in 1217?

ChunkIO is @bloodmc 's thing, tagging to let him know.

@LexManos
Copy link
Member

Only post issues if you have reproduced it on the LASTEST Forge. As in many cases it has already been fixed.
And please, if you can, provide a simple mod to illustrate your issue. Especially if it is one of these background issues.

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

3 participants