Game hangs on loading if mod grid used with mod Enchanted ToolTips
matthew-cline opened this issue · 9 comments
The game hangs on loading, with the progress square showing 100%, if I used both the mods Enchanted ToolTips and grid, but works fine if it's just one or the other. The log file shows this error, which isn't present when the game runs properly:
[Info: 2019-12-16 21:42:52.699001988: GameCallbacks.cpp(142)] Game/net.minecraft.class_3244 (Server thread) Info Khym_Chanur lost connection: Internal Exception: java.lang.ClassCastException: class net.minecraft.class_3248 cannot be cast to class net.minecraft.class_2602 (net.minecraft.class_3248 and net.minecraft.class_2602 are in unnamed module of loader net.fabricmc.loader.launch.knot.KnotClassLoader @48075da3)
The only reference I've seen to this error is in this pastebin.
This happens even if:
- I use a freshly generated world.
- The only mods present are Enchanted ToolTips, grid and the base Fabric API mod file.
- I delete the directories
$HOME/.minecraft/.mixin.out
and$HOME/.minecraft/.fabric
before launching Minecraft.
My environment:
- Fedora 30, 64-bit Linux
- Minecraft 1.15, using the bundled JRE
- Fabric launcher installed with
fabric-installer-0.5.2.39.jar
- Mod files: fabric-api-0.4.24+build.279-1.15.jar, EnchantedToolTips-1.2.3.jar, grid-1.15-fabric0.4.23-1.5.jar
Here is a ZIP file of the relevant log and config files.
Grid is using an old version of cotton client commands built for 1.14 unsure if that’s compatible with 1.15.
The mods don’t touch any of the same mixins, must be an incompatibility between dependencies
(I'm the maker of the grid mod). class_2602 is ClientPlayPacketListener, class_3248 is ServerLoginNetworkHandler. This sounds like a client to server packet being sent to the client, or a server to client packet being sent to the server. There has been talk on the fabric Discord about that happening under some circumstances.
Will look further into that tomorrow as it's 0:30 am here.
Grid is using an old version of cotton client commands built for 1.14 unsure if that’s compatible with 1.15.
The grid commands are working just fine for me.
Cotton-Client-Commands has a version 1.0 pushed to GitHub, but their newest published version, on curseforge and in their maven, is still the one I'm using (and it works for me on 1.15 with grid and a few other mods).
The problem seems to be that Enchanted Tooltips defines, in its fabric.mod.json, an entrypoint for Cotton Client Commands, which the mod doesn't provide or use:
"cotton-client-commands": [
"net.kyrptonaught.enchantedtooltips.GenEnchantsCommand"
],
Which means if any other mod brings cotton client commands with it, it'll try to execute this nonexistent entrypoint, and fail. I don't really understand how that can lead to the class confusion that we have here, but when I extracted the fabric.mod.json, removed these 3 lines, and replaced the changed file into the jar, loading and logging in to a server and to singleplayer worked well.
I guess this issue should be deleted from the fabric project, as it's a mod problem, not a fabric problem.
Ah good catch, I must’ve missed that. Compiling a build as we speak. It is odd that it was a hard crash rather than just throwing an error
We might seek to add a module in fabric api covering such class casts (patching net.minecraft.network.ClientConnection#handlePacket
)