For whatever reason, vanilla does not mark the chunk as
dirty when changing its tick lists.
We also have it return dirty if the time since the last
save has changed, since it would affect the tick offsets
in the ticklist.
CB used the dirty flag to construct the chunk unload event,
but then sets mustNotSave to the inverted value of the event
after calling the event without considering that the chunk may
actually be brought up to loaded status again later. Then, CB
overrides the isUnsaved method of LevelChunk to additionally
use mustNotSave.
Thus, if the chunk is not marked dirty when unloading, the
mustNotSave value will be set to true. Then, once the chunk
is reloaded and edited the dirty flag will be set. However,
when unloading the chunk finally, the isUnsaved method
will return false due to mustNotSave being true. Thus, the
chunk will never be saved.
To fix these issues, no longer make mustNotSave override
isUnsaved and always set the save flag for the chunk unload
event.
This issue started popping up recently due to the recent
change to mark chunks as not dirty after saving them, which
increased the chance of the save issue occurring in the first
place.
* Added EntityToggleSitEvent Patches
* Updated event phrasing, fixed Boolean not being primitive, pandas now fire event, and event is defined and called in 1 line
* Updated event phrasing, fixed Boolean not being primitive, pandas now fire event, and event is defined and called in 1 line
* Added EntityToggleSitEvent Patches
* Added EntityToggleSitEvent Patches
* Added EntityToggleSitEvent Patches
Crashes caused by the missing AWT dependency come up in the support channels fairly often.
This patch detects the missing dependency and stops the server with a clear error message,
containing a link to instructions on how to install a non-headless JRE.
When we update the chunk state to border, it should be
the case that isChunkLoaded returns true and that
getChunkIfLoadedImmediately returns a non-null value.
Now add the chunk to the loaded map before making any
callbacks after updating to border state.
adding the getHandle method causes some issues with things like ProtocolLib
due to the expectation that all classes which provide a getHandle method
are public.