Sinytra / Connector

A compatibility layer that allows running Fabric mods on MinecraftForge
https://sinytra.org/docs/connector
MIT License
453 stars 16 forks source link

Andromeda: Crash when opening creative menu. #1062

Open melontini opened 1 month ago

melontini commented 1 month ago

Mod Name

Andromeda

Mod Homepage

https://github.com/melontini/andromeda

Minecraft version

1.20.1

Describe the bug

Opening the creative menu leads to a crash.

Steps to reproduce

  1. Install latest version of Andromeda
  2. Open creative menu
  3. Crash.

Logs

https://gist.github.com/melontini/c0f80832d03a774935bde46edeac823e

Additional context

Vanilla categories have a "The stack count must be 1" requirement, but Dark Matter works around it by adding stacks to the underlying set directly, this works correctly on Fabric, since no additional verification is done on the contents of item groups.

But, for some reason, Forge decided to add additional verification to item group entries.

~In theory, this can be fixed by @ModifyArging the lambda or @Redirectinging stack.getCount(), but I wonder if anything else relies on this check.~ Actually looked into this. This would require directly copying the impl as-is from Fabric.