Ender Utilities

Ender Utilities

17M Downloads

Handy Bag causing the game to become unresponsive

ElinM-Challenge opened this issue ยท 3 comments

commented

I put my handy bag in ae system (Applied Energistics 2) accidentally, when i take it out, the game become unresponsive.
When i try to take it out by jei cheat mode, the game become unresponsive again.

Upon reviewing the minecraft.log file, I noticed the following error:
[Netty Local Client IO #0/ERROR]: NetworkDispatcher exception java.lang.IllegalArgumentException: Payload may not be larger than 32767 bytes

I suspect that this error is the cause of the game's unresponsiveness. Is there a possibility that this issue will be addressed in future updates?

Thank you for taking the time to review this issue! :)

minecraft-exported-crash-info-2024-11-02T14-59-53.zip

commented

The reason is that the Hand Bag (and also the Handy Chest) which store items on memory cards, currently store all of that NBT data directly in the memory card items. This can become a bigger issue if you have lots of items on the cards, lots of cards in the bag, and especially if some of those stored items also contain lots of NBT data...

This can lead to a situation where you will essentially "inventory ban" yourself from the server/game, because the inventory sync code has some packet size limits. However the size limit shouldn't be that small as you indicated, maybe that packet is specifically for the AE system somehow? If the bag's total NBT would already be too big for the player inventory, then you would have gotten kicked out earlier when you had it in your inventory.

Can you maybe get it out of the AE system by exporting it to some chest using an export bus thing whatever it was called, with a filter that ignores NBT data?

And then also be careful with the bag and memory cards and try to avoid putting in items that contain lots of NBT data, such as any other storage items that might also contain the NBT data directly in the item. So never put for example memory cards that contain items inside an another card (= bag), same for any other "simple" (= "non-ender type") storage items from other mods. In other words never nest non-ender type storage items unless you know that they don't store the items directly in the item NBT data.

The fix for this would be to rewrite the mod to store the items in an external storage system, and the cards would just contain a unique ID that is use to access the items from that storage system. (By storage system here I mean i the code, not as a game concept.) This has been on my todo list for ages, but I kinda doubt the mod would get that big of an update anymore. Because this would be a rather large change in the code and would need a bunch of testing to try to make sure it doesn't break anything or lose items in the conversion from the old way of storing them directly in the item NBT to storing them in that new separate system.

commented

I am genuinely delighted by the thorough and earnest response you've provided. Your insights are greatly appreciated. Now I have a clear understanding of this issue, and I value the suggestions you've offered. I intend to explore alternative approaches to resolve the issue.

My sincerest gratitude once again. In the end, should I close this issue?

commented

I found a mod that can solve this problem!

https://github.com/TonimatasDEV/PacketFixer