SuperMartijn642's Core Lib

SuperMartijn642's Core Lib

85M Downloads

[Bug] Incompatibility with Bank Storage

Natanaelel opened this issue ยท 0 comments

commented

(I'm the dev of bank storage)
Version Info

  • Minecraft, 1.21.1 neoforge
  • Rechiseled, 1.1.6a
  • Fusion, 1.1.1a

Description of the Bug
When placing blocks from a bank, the bank get consumed instead of the item.
This is caused by BaseBlockItem#interactWithBlock re-creating the UseOnContext ignoring stack, and instead (wrongly?) assuming the player-held item is the one to decrement.

Solutions
I can think of 3 solutions:

  1. From my side: Replace the hand with the block before placing it, and then restore the bank.
  2. From your side: Taking the stack parameter into account when creating the UseOnContext.
  3. Both 1 and 2.
    I think 2 is the best solution as I don't have to worry about all the mods with hand auto-refill features and similar, causing weird behaviour. It is also super simple to fix on your side.
    What do you think?

Linked issue