dlee13/hold-that-chunk

Explain the features

Closed this issue · 1 comments

  • I understand that the difference between this and Farsight is that this one does not keep chunks in cache indefinitely. What is the normal time for the cache cleanup then? 1 hour? 2 hours?
    Edit: saw the config, 10 minutes. I know it's configurable, but isn't that too small as a default?
  • The main unloading only happens when the chunk is not within render distance, right?
  • Are chunks also cleared in other states, including:
    • Dimension/world change (e.g. vanilla portals or multiworld plugins)
    • Server leave
    • Game close
  • I understand that the difference between this and Farsight is that this one does not keep chunks in cache indefinitely. What is the normal time for the cache cleanup then? 1 hour? 2 hours?
    Edit: saw the config, 10 minutes. I know it's configurable, but isn't that too small as a default?

My intention in making this mod was primarily to remedy the chunk loading struggles encountered when holding ice boat races and elytra course races with my friends. The typical lap times for the shortest ice boat course on our server are around 40 seconds, and the lap times for the longest course are around 6 minutes. So this default serves my own needs well. I am open to changing the default, however, I think I will also add a hotkey-based method of immediately handling the queued chunk unloads before that. Actually, you're right. I'll change the default to 1 hour.

  • The main unloading only happens when the chunk is not within render distance, right?

Yes, the real chunk unloads only happen when the chunk has not been within render distance for the duration of the delay config. Whenever a player moves back to within render distance, the client will get a chunk load packet. You can see in ChunkUnloader::onChunkLoad that the delayed chunk unload which was previously queued will be canceled. Then the delayed chunk unload can be queued again when the player moves away and the client gets a new chunk unload packet for that chunk.

  • Are chunks also cleared in other states, including:

    • Dimension/world change (e.g. vanilla portals or multiworld plugins)

Actually, I did not investigate that case enough yet to fully understand it.

  • Server leave

Yes, the world gets cleaned up whenever the client disconnects from a server.

  • Game close

Yes, everything gets cleaned up when the JVM stops.