[Crash]: Pulling block from Compacting Drawer with vanilla filtering Hopper
whysoanti opened this issue · 4 comments
Description of the issue
Pulling a converted dried kelp block from a compacting drawer when the amount of kelp goes below the amount needed to craft a kelp block crashes the game.
Reproduction steps
- Place a Compacting Drawer on top of a Hopper
- Fill each slot of the Hopper with one Kelp Block
- Add Kelp Blocks to Compacting Drawers Storage
- Game crashes when pulling a Block after last Kelp Block was pulled
Mod version
2.0.7
Operating System
Windows 11
Minecraft version
1.20.1
Other mods
Fabric API 0.90.7
View log for more mods, but should crash without any additional mod.
Server
Not tested
Client
Happens
Logs
Crash Report
Extra Context
No response
We printed the amount removed (in the extract function) from the inventory and it seems it removes more than is actually stored in the inventory. We currently return 0 in both the insert and extract function to avoid crashing our server. Do you think this is a quick fix?
The issue here is that fabrics default logic for finding non-empty slots doesn't account for slots suddenly becoming empty as is possible with a compacting drawer. I'll create an alternative implementation and file a bug report