Commit
1953f52da1ece0feb56dea20592c1b86616b31a5
by md_5SPIGOT-2439: Consistently fire Chunk(Load|Unload)Event
Clean up implementation and firing of both of these events by routing
both unload and load behaviors to consistent method calls.
This fixes issues where a few places would not call Load or Unload
events when it should have.
Additionally, reduces diff by moving the neighbor marking code into
these consistent points.
Additional benefits of the change include improving the neighbor marking
methods to use getChunkIfLoaded instead of getLoadedChunkAt in some
places, as the latter will cause chunks to be marked active and not
unload.
Finally, this also updates CraftWorld.loadChunk to use the new methods,
as the previous logic did not properly handle the new unload queue.