Paper icon indicating copy to clipboard operation
Paper copied to clipboard

Don't save entities when a chunk's save is cancelled

Open NewwindServer opened this issue 1 year ago • 0 comments

From searching code across GitHub, the primary use case for ChunkUnloadEvent.setSaveChunk(false) seems to be preventing certain worlds, like minigame worlds, from being saved.

In most cases, if you're not saving a chunk, it also makes sense not to save the entities within that chunk. Before version 1.17, this was the default behavior, as entities were saved within chunks.

However, in the current system, even when chunk saving is canceled, entities like shot arrows or unexploded TNT are still saved, which can cause leftover items in minigame worlds.

NewwindServer avatar Aug 28 '24 14:08 NewwindServer