klikli-dev / theurgy

An open-source magic mod built around classical alchemy to replicate and transmutate matter, and create magical artifacts.
https://www.curseforge.com/minecraft/mc-mods/theurgy
13 stars 10 forks source link

Crash when breaking Sal Ammoniac Accumulator and Pyromantic Brazier (java.lang.NoSuchMethodError) #189

Closed amahlaka closed 4 months ago

amahlaka commented 4 months ago

Describe the bug When breaking either a Sal Ammoniac Accumulator or a Pyromantic Brazier, the game crashes with the following error: java.lang.NoSuchMethodError: 'void net.neoforged.neoforge.items.wrapper.RecipeWrapper.<init>(net.neoforged.neoforge.items.IItemHandlerModifiable)'

The Relevant line of code for the Accumulator: https://github.com/klikli-dev/theurgy/blob/aaa249d85e34f36a30eb6983feee74a725627683/src/main/java/com/klikli_dev/theurgy/content/apparatus/salammoniacaccumulator/SalAmmoniacAccumulatorBlock.java#L76

It seems that the function Containers.dropContents is depracated, and is expecting only IItemHandlerModifiable type of object as input, but the currently used item.inventory is of type ItemStackHandler

To Reproduce Steps to reproduce the behavior:

  1. Place block 'Sal Ammoniac Accumulator' or 'Pyromantic Brazier'
  2. Break either of the place blocks
  3. Game Crashes with the above mentioned error.

Expected behavior For the block to break and not crash the game as it drops it's contents

System (please complete the following information):

Additional context This seems to be somewhat related to the crash that happens with the Calcination oven (#188)