Theurgy

Theurgy

15M Downloads

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

amahlaka opened this issue ยท 0 comments

commented

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:

Containers.dropContents(pLevel, pPos, new RecipeWrapper(blockEntity.inventory));

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)