Skip to content

MUI causes crash with AE2 guis #154

@jchung01

Description

@jchung01

On a dedicated server, with this mod and AE2-UEL, if you configure an ME interface's slot to be >64, and you try to take out the stocked item, it will kick the player with the following error:

[Netty Server IO #2/ERROR] [FML]: NetworkDispatcher exception
io.netty.handler.codec.DecoderException: java.io.IOException: Packet 0/7 (CPacketClickWindow) was larger than I expected, found 1 bytes extra whilst reading packet 7
   ...

This issue is because both mods apply ASM from parts of StackUp, because of two things:

  1. Their implementations of increased stack sizes differ.
  2. AE2 does not patch Forge's PacketUtil#writeItemStackFromClientToServer().

MUI replaces the stack count read/write from read/writeByte() to read/writeVarInt(), but AE2 uses a magic number as the byte and then read/writes an int following it. Because of this, the written packet from client will use MUI's impl, while the read packet from server will use AE2's impl, leading to a difference in expected vs actual packet size, causing the exception.

The solution would be to have AE2 patch PacketUtil#writeItemStackFromClientToServer(), and MUI to not apply their patch for PacketUtil once AE2 patches it.

Tested versions - AE2-UEL v0.56.7 and MUI v2.5.0-rc5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions