TinyModularThings / Chunk-Pregenerator-Issue-Tracker

Issue Tracker & Wiki For Chunk Pregenerator
16 stars 0 forks source link

Point of Interest #25

Closed SamuelJolaoso closed 1 year ago

SamuelJolaoso commented 1 year ago

When im using chunk pregenerator, the poi stays at 50,000. Is that an issue? Will I lose pois doing this?

Speiger commented 1 year ago

The points of Interest are a memory leak in a Pregeneration Context. Minecraft never unloads points of Interest. Even so they can be unloaded safely.

Why are they a memory leak: Because even a small 100 chunk radius can cause like a million of these to spawn. Especially in modded. Which causes you to run out of ram if you exceed certain ranges.

So what chunk pregen does is: Save them to disk (which the server does already but just making sure everything is up to date) and then remove them. When the game needs them they can be loaded.

Why 50k? Minecraft needs them from now and then and constantly unloading them causes issues, so keep a small buffer and only unload the least used ones and keep the frequently used once in.

TL:DR don't worry this is intended behavior so you can have larger worldgeneration ranges without running out of ram :)