EngineHub / WorldEdit

🗺️ Minecraft map editor and mod
https://enginehub.org/worldedit/
Other
3.05k stars 826 forks source link

WorldEdit on Fabric Server causes players to not connect with Java error (packet larger then expected) #2525

Closed alotod closed 1 month ago

alotod commented 1 month ago

WorldEdit Version

7.3.1

Platform Version

Fabric 0.15.11 on Docker

Confirmations

Bug Description

After adding the latest mod file into the 'mods' folder and restarting the server, players fail to connect with error: Internal Exception: io.netty.handler.codec.DecoderException: java.io.IOException: Packet play/serverbound/minecraft:custom_payload (class_2817) was larger than I expected, found 3 bytes extra whilst reading packet serverbound/minecraft:custom_payload. After removing WorldEdit from the server everyone can join without problem.

Expected Behavior

Every player can join without any issues.

Reproduction Steps

  1. Add the WE file to the mods directory on the server side.
  2. Restart the Minecraft server.
  3. Try to join.

Anything Else?

Other mods on server:

me4502 commented 1 month ago

I can't reproduce this issue, is there anything else about your setup that you haven't mentioned?

dougclow commented 1 month ago

I have a similar issue on Singleplayer - I can connect fine and most things seem to work fine (selecting with the axe, //replace, movement commands) but if I do //sel I get disconnected with: Internal Exception: io.netty.handler.codec.DecoderException: java.io.IOException: Packet play/clientbound/minecraft:custom_payload (class_2658) was larger than I expected, found 8 bytes extra whilst reading packet clientbound/minecraft:custom_payload

(Fabric but no other mods, native not Docker.)

dougclow commented 1 month ago

I've done some more systematic testing and tried pretty much every command in the docs apart from schematic, snapshot, and scripting commands, and everything works fine except for:

all of which disconnect me from the game with the same error.

I've not been able to test //curve because I can't get a convex polyhedral selection, because I can't use //sel, but all the other region commands, including //line, //set and //replace, work fine.

Minecraft 1.20.6 with Fabric Loader 0.15.10, Worldedit 7.3.1+6763-2e55f4f. Crash log on a minimal setup for reference.

aurorasmiles commented 1 month ago

I've been able to replicate this as described by @dougclow Using Fabric Loader 0.15.11 on 1.20.6 with WorldEdit 7.3.1, fresh install without any other mods. Some commands work fine, but //sel for example instantly disconnects me with a similar error

Edit: Funnily enough, //drawsel and then //sel works perfectls fine. It also throws me into the Multiplayer screen after disconnecting, even if I was in a singleplayer world

aurorasmiles commented 1 month ago

Not sure if it helps, but with additional debugging logs: https://paste.enginehub.org/IbzRoo9U1

WithLithum commented 1 month ago

Not sure but it probably has something to do with CUI packets

dougclow commented 1 month ago

Confirmed fixed for me in WorldEdit 7.3.2 - thanks so much!

(Late followup, sorry, have been travelling.)