Closed DaFuqs closed 3 months ago
That's a serious issue, and a bit annoying on MCs side for not handling that (considering that packets one level lower can be split). I think the best approach is probably to use the deprecated "codec to nbt" encoder instead
@DaFuqs please let me know if that fixes it. It may lead to a different error ( packet too big) because I am not sure if I have packet splitting set up on fabric as I don't think they offer it out of the box
I tested various combinations in new and old worlds with read and unread entries. I can confirm that resolved this issue.
The "mark all unlocked entries as read" button still does not seem to show up when first opening the book after join, but I will open a separate issue for that.
Describe the bug When joining a server or singleplayer, Modonomicon syncs the unlocks of the books from Server->Client using
SyncBookUnlockStatesMessage
. When multiple medium sized books are installed, or a single book with lots of content, theencode()
method throws an exception, because the the buffers size is exceeded.Stacktrace:
To Reproduce
Expected behavior The sync not breaking. Maybe by splitting the sync up into smaller chunks, or increasing the cap?
Screenshots
A screenshot at the time of sync shortly before the crash. It shows all data that would be synced![image](https://github.com/klikli-dev/modonomicon/assets/26429514/6c1ec432-c1f9-4be5-90be-ceb323fe1871)
System (please complete the following information):