Jump to content

[1.15.2] The limit on the amount of mods


Recommended Posts

Adding a certain amount of mods to the game breaks client-server connectivity. There is no hard limit on how many mods I can add before this happens, and it's not related to any particular mod, as I far as I can tell. The connectivity fails on the attempt to login to the server. There's no relevant message on the server rather than "playername left the game". The client message is this: 




The "size" is always different, depending on what mods were added to make this start happening, but it's always the case that the size is bigger than this "protocol maximum of 2mb".


It all started when as I was exploring the game and the mods, I was gradually adding more mods to the server (with the same world), and at some moment some mods were starting to cause this. In that case I was thinking that a mod might have been broken or incompatible with something, so I simply removed it, restored the world from the backup that I had made before the procedure, and continued adding the other mods. One thing that was bothering me a bit then was that I've noticed that the troublemakers were usually bigger mods like "MiningColonies" and other mods with much content. It was also strange that there were no complaints about issues similar to mine nowhere in mods comments or issues.


After some time I'm getting to a point where adding just any mod, even the tiniest one is causing this problem. Of course, the "size" is always differen, depending on the mods that cause this. I'm at about 170 mods now and this problem is preventing me from playing the modpack that I've assembled. I've done the following tests when this started happening:


  • existing world with 160 mods + 10 new mods => badly compressed packet
  • these 10 new mods alone in a new world => ok
  • various combinations of 50% of these 160 mods + these 10 new mods + new world => ok
  • these 160 mods + these 10 mods + new world => badly compressed packet


The "160" and "10" figures are approximate but very close to what I was doing, since I did a lot of tests with various mods and combinations. Each time everything seems to always point to one thing: it looks like mods add "content" to the game that at some point overflows 2mb of a packet and that's the end. No specific mods or mod combinations were found to be the cause of this trouble. I've checked a lot of combinations by loading different amounts of various mods, testing both on a new world and on the existing one.


I am not sure how this even possible, because packets in a protocol usually exist for the very reason of being able to transfer some big amount of data by dividing it in smaller more manageable chunks, so does it indicate there is some bug in packet encoder/decoder?

I am not sure why am I getting into this problem since there are mod packs with a much higher count of mods than what I have.


Since Forge is the facility that alows using mods in the first place, I've tried looking for any mentions of a limit for the number (or "weight"?) of mods that can be loaded, but have not found any. In relevant reddit posts (How many mods in a modpack is too many?What do you consider to be too many mods?) people never point out the "badly compressed packet" to be the issue. And again, ~170 mods is not too many since some existing modpacks include even more.


So what is happening? Am I hitting some unspoken limit of content weight? If so, then:

  • why is this never mentioned anywhere?
  • why Forge, being the one who allows for adding mods to the game in the first place, does not alleviate this problem by altering the "the protocol" if it's already changing much in Minecraft beside that?
  • if the latter is not possible then why there is no clear message or error on either the server or the client side that the number of mods that the game can support had been reached?
  • I'm not cursing Forge here, rahter I'm trying to understand what is actually happening and why there is so little information on this problem at all
  • I am fairly new to Minecraft and appologize if I'm missing something obvious or some common knowledge


I am attaching the logs of both the server and the client here. There are some errors like "...Could not serialize..." in the server log, but these don't look like the source of the problem because they were there even before that. Also, I've searched for info about these messages and most people say that they can be safely ignored.


Link to comment
Share on other sites

Well, that's the problem, there's no exception in the logs about it and no crash. As I said, the server merely writes off this as "user left the game", while the client only shows that message. The logs that I have attached are the precise logs of me replicating this issue specifically for gathering the logs on both the server and the client. As you see, they don't contain any mention of the exception. I'd be glad myself if there was an exception logged because that at least would give some idea of what is happening (I'm a Java dev too), but no.


The only thing I can do more is give a link to an archive that contains one of the examples of a modpack that is giving this issue, so it could be replicated locally, perhaps. Would this help?


Also I searched more and found the [removed link to copyrighted code - diesieben07] where this exception is thrown, if it would give any help. This code, apparently is for Minecraft 1.12.2, and I am on 1.15.2, but obviously not much is different.


I am very interested in resolving this issue, or at least gaining a clear understanding of under what circumstances does this happen because now it literally prevents me from investing any further into Minecraft because I cannot predict what is going to cause the games to fail, what mods can I add. If some more logs or tests are required to help understanding this, I will gladly cooperate!

Link to comment
Share on other sites

Yeah, the error message does not say much :/ And the modpack is fully public, it's just a collection of mods, I did not even change any configs or do anything else like quests, so if you add it to a client-server pair, all the default configs that they'd generate are what I am testing with. I only added `server.properties` here just in case, because I set the world seed there.


Download the modpack

Link to comment
Share on other sites

Oh, this sounds like it could be a very possible cause, and I've just tested, it plays well with the two facts:

  • if I generate a world with the modpack and then remove some more recipe-heavy mods, the world that was generated with the full pack loads well after FML removes the stuff from it
  • my 3-weeks-old main world, where I was exploring Minecraft and where the problem originated from, starts working again if I focus on removing only the few of the most recipe-intensive mods

So I can only confirm this with my tests, that seems to be the recipes load issue!


Sure it would be cool if Forge could help stabilize that behavior there to make mod support even more awesome! A bigger number of recipes is something very likely to only grow in demand.


And I very much appreciate your support and work on investigating this issue!

Edited by noncom
Link to comment
Share on other sites

Thank you very much! I have read the issue thread and subscribed to it.


I hope it gets resolved, would love to see Minecraft and Forge free of this limitation :)


If any kind of help, assistance or input would be required from me, feel free to contact me.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.