Skip to content
Success

Changes

Summary

  1. #640: Fix chunk load/unload callbacks for chunk load cancellations (details)
Commit 7f61a2526eab7818682ea0761e54f35f80cd2d6a by md_5
#640: Fix chunk load/unload callbacks for chunk load cancellations

When a chunk goes from a ticket level where it is loading a
full chunk to an inactive state (i.e ticket level 33 to
ticket level 45) the full status future will be completed
with a "Right" Either (indicating unloaded). However, this
will also schedule the unload callback immediately.

However, the callback is not immediately executed. This means
the next unload/load callback that needs to be scheduled will
fail. The fix applied is to not schedule a callback if the
chunk is not loaded - if the Either is "right."

Even better, due to how completablefuture works, exceptions
are not printed by default. So the exception thrown by the
callback executor was not printed and the failure
hidden from console. This explains why no-one has tracked this issue.
Now the exception is printed so future failures with the
callback system (if any) can be tracked easier.
The file was modified nms-patches/PlayerChunk.patch