Skip to content

Fix transformer issues - #572

Open
jchung01 wants to merge 4 commits into
AE2-UEL:masterfrom
jchung01:asm-fixes
Open

Fix transformer issues#572
jchung01 wants to merge 4 commits into
AE2-UEL:masterfrom
jchung01:asm-fixes

Conversation

@jchung01

@jchung01 jchung01 commented Jul 4, 2025

Copy link
Copy Markdown
  • Fix re-entrance as outlined in Use safer class writer to fix re-entrance #555
  • Add missing item stack size patch to Forge PacketUtil#writeItemStackFromClientToServer().
  • Convert patches for ItemStack, PacketBuffer and PacketUtil to ClassVisitors.
  • Optimizes packet patches to use varint for stack size instead of byte + int. This is to make it more easily compatible with ModularUI (see below).

Previously, recieved CPacketClickWindow packets had invalid ItemStacks sent by the client because the itemstack in the packet is sent using PacketUtil, which is not patched, while the itemstack is read using PacketBuffer#readItemStack(). This meant stack sizes past the vanilla amount were not being received correctly. Somehow, this did not cause visible issues in AE2 guis when interacting with oversized slots. However, it can cause network errors and kick the player on dedicated servers when ModularUI is present due to it also patching stack sizes and making assumptions on how to exclude its patches when AE2 is present.

See CleanroomMC/ModularUI#154 for more details. This PR makes the necessary changes on AE2's side to fix the error. Once this is merged, necessary changes should be made on MUI's side to fix the error.

jchung01 added 2 commits July 4, 2025 11:49
- Also moves PickBlock hook out of visitor to avoid loading MC classes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant