tr7zw / ItemSwapper

Tweaks to the inventory system based on Xisumavoid's video.
Other
101 stars 30 forks source link

[BUG] The 'Disable Pick Block on Tools' is not working correctly when picking 'ghost' blocks in the litematica schematic overlay #203

Closed RashidFTW closed 6 months ago

RashidFTW commented 6 months ago

Version information

itemswapper-fabric-0.5.6-mc1.20.1+git.cc88083

Other relevant installed mods

Litematica

Expected Behavior

Either the picking option shouldn't work at all on litematica ghost blocks and let Litematica do it's thing, or since the pick block (from shulkerbox) feature is really nice it should respect the 'Disable Pick Block on Tools' option recently added!

Actual Behavior

The litematica mod on it's own wont pick a stack from shulker boxes. Here is what happens without the ItemSwapper mod:

https://github.com/tr7zw/ItemSwapper/assets/160150516/7a2be1a0-e4c9-4301-90a0-0d3d894e388e

Here is what happens with the ItemSwapper mod (works correctly with normal blocks, but not with 'ghost' blocks):

https://github.com/tr7zw/ItemSwapper/assets/160150516/348a6d42-a1e0-44bb-9b63-c7ed05a822a2

I can test the two mods in a sandbox if needed, but testing with/without shows that another mod is not likely causing this.

Reproduction Steps

Check preview above.

Render engine

Additional information

For instance, if I try to pick a block that's placed in the world, the option works as intended. However if it's a litematica ghost block, picking will ignore the option and replace the tool that's selected. Interestingly enough, even if the player has that block already in their inventory, picking will ignore that stack and will grab a new stack from one of the shulker boxes in the inventory instead of swapping with the stack existing in the inventory.

This picking of litematica ghost blocks might yet have other bugs that I have not found/tested, but this one is the annoying one that I hope gets fixed.

tr7zw commented 6 months ago

Please test with the latest dev build.

RashidFTW commented 5 months ago

Amazing! Just tested, now it indeed works as intended on both real and 'ghost' blocks. Thanks for the quick fix 😀

tr7zw commented 5 months ago

Note that its now bound to the 3 way toggle in the settings. So you can fully disable pickblock with tools, fall back to whatever litematica would do or allow pickblocking out of shulkers while holding a tool.