badasintended / wthit

what the hell is that?
https://docs.bai.lol/wthit
Other
118 stars 21 forks source link

Cursed chest immediately disconnects us from our server #275

Closed sleepyuwus closed 2 weeks ago

sleepyuwus commented 3 weeks ago

Describe the issue

I play on a server with a friend, and somehow he managed to curse one of his chests? This problem occurs to both of us. When we look at the chest, we get disconnected. Moving our client-sided wthit-fabric-12.2.2 out of our mods folder fixed the issue for both of us.

Crazily enough, he blew up the first chest, but the issue returned on another chest that previously worked. (probably the first one he interacted with) Before he did we could both access the chest just fine. And also after we removed the mod there have not been any issues.

Mind you we use a handful of mods, so it could be an interaction thing. Unfortunately as long as this issue persists, we are unable to use the mod for now. I hope this helps someone.

Log output and crash report

log output in additional context

Additional context

disconnect-2024-07-07_23.42.23-client.txt 2024-07-08-4.log

deirn commented 3 weeks ago

Try disabling the tooltip, it should not trigger it if its hidden. Can I get a data dump of the chest? run the /data get block x y z command.

sleepyuwus commented 3 weeks ago

Sorry for the late response. SO. Obviously disabling the tooltip worked. The data dump is probably not so important anymore because i figured out the problem. It is an interaction with this mod: https://modrinth.com/mod/universal-graves When one of us dies, we get a grave compass that leads us to our grave. Normally this compass disappears if you pick up your stuff, so i didn't bother disabling the compass in the plugins options. If a grave compass is inside the chest, the tooltip probably cannot keep up? Something about that disconnects us immediately from the server. Grave compass inside chest = EVIL.

Bild_2024-07-10_133624507

Bild_2024-07-10_134845788

deirn commented 3 weeks ago

So it's from an item from a mod that uses Polymer, it seems to be related to server-only components.

CC: @Patbox, I need your input on this.

Patbox commented 3 weeks ago

Hmm, with Mojang's networking changes, it should convert correctly as long as it uses vanilla network itemstack codec and it uses vanilla packet payload system to write it.

deirn commented 3 weeks ago

Ah, does Polymer also mixin into vanilla item codec? Since item NBT/component sync is optional in WTHIT, I don't use it. https://github.com/badasintended/wthit/blob/ad453284c3cc5e1d3bae24df37fd3fcf35c722e7/src/pluginExtra/java/mcp/mobius/waila/plugin/extra/data/ItemDataImpl.java#L17-L50

Patbox commented 2 weeks ago

Looks like I missed a patch to DataComponentPatch.STREAM_CODEC / ComponentChanges.PACKET_CODEC. Will fix that on polymer side. Through you also should use PacketCodecs.registry(RegistryKeys.ITEM) (not sure yarn name) instead of [write/read]ById

deirn commented 2 weeks ago

Cool, I'll also change that. Thanks.