Simple Magnets

Simple Magnets

32M Downloads

[Bug] ...disconnected from server

LWmods opened this issue ยท 14 comments

commented

Version Info

  • Minecraft, 1.21.1
  • Simple Magnets, simplemagnets-1.1.11a-forge-mc1.21

Description of the Bug
I'm getting kicked or crashing from the server with a magnet in my inventory. it started the moment i crafted and activated the basic tier magnet.
pastebin bellow.
Steps to Reproduce
craft and activate a magnet. could be another mod issue I haven't tested yet

Screenshots
https://pastebin.com/KaMML06q

commented

yes the mod is present on both client and server. the only way i was able to reconnect was to delete my player data

commented

Did you install the mod on the server?

commented

The log doesn't really give any info sadly. It just an error when trying to decode the clientbound/minecraft:container_set_slot. This usually happens when an item is missing from the registry, for example when the mod is not installed on both sides.

Could you also share the logs/latest.log log file? Not sure if it will help, but perhaps it shows some earlier errors.

commented

https://pastebin.com/t6H3VtPB this is the log, also when i tried to log back in my parnter would also be disconnected with the same error although she did not have a magnet.

commented

That log doesn't show a crash or error, is that from the same session as the crash log from your first message?

I also tried to reproduce the issue by joining a server, using /give to get a basic magnet, activating it, and picking up blocks with it, but it appears to work fine.
Perhaps you are using an older version of my core library? I believe if you are using version 1.1.17 of my core library rather than 1.1.17a or 1.1.17b, it might cause that issue.

commented

im using supermartijn642corelib-1.1.17b-forge-mc1.21.jar it was what curseforge downloaded automatically, ive just logged in and given myself a magnet via the command and instantly disconnected again so here is the latest log https://pastebin.com/ARbVkypk. i dont get a chance to do anything the moment i activate the magnet i am disconnected and have to delete my player data. it very well could be another mod, ill start removing them and see if i can narrow it down

commented

Could you share the logs/latest.log from the client?

commented

https://pastebin.com/rP87mY0R this is my client log

commented

Thank, doesn't appear there's any more info in there either sadly.
I tried with the same version of Forge and Simple Magnets (+ library), so at this point I would have to guess it is indeed related to some other mod you have.

commented

i appreciate your help, ill start taking mods out and report back if i find anything.

commented

So I downloaded all the mods you had in your crash log and added them to my dev environment. Specifically the following mods:

balm-forge-1.21.1-21.0.18-all.jar
chunkloaders-1.2.8-forge-mc1.21.jar
collective-1.21.1-7.84.jar
common-networking-forge-1.0.15-1.21.jar
cookingforblockheads-forge-1.21.1-21.1.1.jar
excompressum-forge-1.21.1-21.1.2.jar
ExtremeSoundMuffler-3.48_Forge-1.21.jar
fusion-1.1.1-forge-mc1.21.jar
itemcollectors-1.1.10-forge-mc1.21.jar
jei-1.21.1-forge-19.8.4.113.jar
jrftl-1.21-forge-1.8.0.jar
moreoverlays-1.23.1-mc1.21-forge.jar
MouseTweaks-forge-mc1.21-2.26.jar
O.F.Device-forge-1.21-6.1.0.jar
rechiseled-1.1.6a-forge-mc1.21.jar
superflatworldnoslimes-1.21.1-3.4.jar
supermartijn642configlib-1.1.8-forge-mc1.21.jar
supermartijn642corelib-1.1.17b-forge-mc1.21.jar
tiab-forge-1.21-6.1.0.jar
trashslot-forge-1.21.1-21.1.1.jar
travelersbackpack-forge-1.21-10.0.1.jar
treeharvester-1.21.1-9.1.jar

(minus JourneyMap and plus Simple Magnets ofc)
With this set of mods I am indeed able to reproduce the issue.
I spent about the last hour testing trying to find which mods are relevant to the issue, but it seems removing any single one of these mods, the issue disappears. This makes absolutely no sense to me. Even removing completely different mods like More Overlays which only does rendering, or Mouse Tweaks which just interacts with inventories, the issue magically goes away.
I have honestly no clue what is going at this point.

commented

It seems the same issue happens when trying to use a backpack from Traveler's Backpack. My guess is that this is some kind of Forge issue, but I have no clue what would be causing it.

commented

I was having similar results earlier removing mods I had it down to trash slot and rechiseld but then it started again. I can't do anymore tonight but I will look into contacting the forge devs in the morning.

commented

The source of the issue appears to be the fact that the data component type (the thing that replaces item nbt since 1.20.5) registry is not synchronized between the client and server. This essentially randomly causes errors when the id for a data component type happens to differ between client and server as the client would be trying to read data component data using the wrong data component type.
This is something that affects any mod adding a data component type and I think would need to have a solution in Forge.

I have created an issue for Forge here MinecraftForge/MinecraftForge#10113.
For now, I'll close the issue as it is not caused by Simple Magnets.
Thank you for reporting the issue!