ItemSwapper icon indicating copy to clipboard operation
ItemSwapper copied to clipboard

Litematica mixin interferes with Litematica’s pick block behavior

Open xane256 opened this issue 9 months ago • 1 comments

Version information

itemswapper-fabric-0.5.3-mc1.20.1.jar

Other relevant installed mods

malilib 1.20.1-0.16.2, Litematica 1.20.1-0.15.3

Expected Behavior

  1. In survival, pick-block on a schematic block that is either Correct or Missing does not obey Litematica’s pickBlockableSlots setting, even when pickBlockAvoidTools is set to False. In other words filling the hotbar with tools is not the reason pickBlockableSlots is ignored. I suspect the reason is because ItemSwapper has its own pick block behavior in the Litematica mixin.
  2. In creative, pick block on a Missing schematic block does not give you the item, but if you have the item in "survival inventory" (in creative mode) then the item does get swapped to hotbar.

Actual Behavior

  1. The item should be swapped to the hotbar into a slot that obeys Litematica’s pickBlockableSlots setting. This is the observed behavior when ItemSwapper is not installed.
  2. The item should be given to the player in creative if necessary, similar to what Litematica does when ItemSwapper is not installed.

Reproduction Steps

  1. In survival:
  • Load a schematic containing stone blocks
  • set litematicas pickBlockableSlots to 4,5,6,7
  • put swords in slots 1,2,3
  • Fill hotbar with dirt
  • put stone in inventory
  • do pick block on the ghost stone while holding a sword. Notice that the sword is replaced with stone instead of the stone going into one of the dirt slots.
  1. in creative:
  • load a schematic of stone blocks
  • do /clear
  • pick block the stone
  • Notice that you dont get any stone

Render engine

  • [X] Vanilla
  • [ ] Sodium(optionally with Iris)
  • [ ] Optifine
  • [ ] VulkanMod
  • [ ] Canvas
  • [X] Other

Additional information

https://github.com/tr7zw/ItemSwapper/blob/38a3fdf6ef5b194590f915d66a692be44c2e7f2e/XTFabric/src/main/java/dev/tr7zw/itemswapper/mixin/LitematicaMixin.java#L23

xane256 avatar Sep 20 '23 00:09 xane256