Puzzles Lib [Forge & Fabric]

Puzzles Lib [Forge & Fabric]

77M Downloads

[Bug]: Conflict with ItemSwapper

pajicadvance opened this issue ยท 1 comments

commented

Mod Loader (Required)

Fabric

Minecraft Version(s) (Required)

1.21.1

Mod Version(s) (Required)

v21.1.3

Other Mods Involved (Required)

Yes

Notes (Required)

Installing Puzzles Lib prevents walking with the ItemSwapper UI open, even when Allow Walking With UI is set to ON in ItemSwapper config

  1. Install ItemSwapper 0.7.1, Puzzles Lib 21.1.3, and ModMenu (to access configs)
  2. Ensure that Allow Walking With UI is set to ON in ItemSwapper config
  3. Load into a world, select any item in the hotbar and press and hold R to open the ItemSwapper UI
  4. With the UI still open, try to walk in any direction. It does not work
  5. Uninstall Puzzles Lib and try the same thing. It does work

Investigation:

ItemSwapper uses KeyMapping.same() calls to determine whether to release the key presses or not: https://github.com/tr7zw/ItemSwapper/blob/main/src/main/java/dev/tr7zw/itemswapper/mixin/KeyMappingMixin.java

PuzzlesLib modifies the KeyMapping.same() method to add additional logic and cancels it early: https://github.com/Fuzss/puzzleslib/blob/main/1.21.1/Fabric/src/main/java/fuzs/puzzleslib/fabric/mixin/client/KeyMappingFabricMixin.java. Most likely it makes the calls used in ItemSwapper always return false when they would normally return true.

latest.log (Required)

https://mclo.gs/J5x4oVo

commented

Fixed in v21.1.7, thanks!