There is a duping issue that can be reproduced following these steps.
Join a slime world.
Drop items on ground.
Leave slime world.
Join slime world.
Pickup items off ground.
Leave slime world.
Join slime world.
At this point, the item stack that you dropped on step 2 should still be there despite picking it up. This issue doesn't just affect items, but all entities. You can see a demonstration of this dupe here.
This issue seemed to be caused by a change to saving system of entities for 1.19.2. Entities are saved to a map of entity lists when a chunk is unloaded, then loaded from that map when loaded again. When there were no entities in the chunk to store on unload, the map wouldn't be modified, leaving the last thing saved in there to be loaded again on next load.
This is resolved by removing the stored entity list from the map when the chunk has no entities on chunk unload.
This PR also includes a fix to debug messages that weren't printing the proper chunk coordinates. I can move this to a separate PR if required.
There is a duping issue that can be reproduced following these steps.
At this point, the item stack that you dropped on step 2 should still be there despite picking it up. This issue doesn't just affect items, but all entities. You can see a demonstration of this dupe here.
This issue seemed to be caused by a change to saving system of entities for 1.19.2. Entities are saved to a map of entity lists when a chunk is unloaded, then loaded from that map when loaded again. When there were no entities in the chunk to store on unload, the map wouldn't be modified, leaving the last thing saved in there to be loaded again on next load.
This is resolved by removing the stored entity list from the map when the chunk has no entities on chunk unload.
This PR also includes a fix to debug messages that weren't printing the proper chunk coordinates. I can move this to a separate PR if required.