1.15.2 How can i get a chunk with x and z asynchroniously?

Discussion in 'Spigot Plugin Development' started by PixliePlaysYT, Jan 12, 2020.

  1. Title says it all ^^
  2. Impossible to get true async loading for plugins without something like Paper.
  3. True. But. You could maybe get a ChunkSnapshot of a chunk that is already in the cache.
    So if you dont cause the chunk to be loaded you could try to call the getChunkSnapshot() method async.
  4. You can’t get a snapshot async. The snapshot can be *used* async but it can’t be retrieved without being on the main thread.

    “Purpose is to allow clean, efficient copy of a chunk data to be made, and then handed off for processing in another thread (e.g. map rendering”

    Not exactly sure what OP is planning to do but regardless the fact you cannot load a chunk async in spigot, sync copy and async process a snapshot could potentially be a solution either way. This is an xyproblem for sure.