Attempt to get block drops from MI barrel/tank without attached block entity can crash the game
James103 opened this issue ยท 2 comments
When an MI barrel or tank is broken or its drops are otherwise retrieved, the mod checks if the block entity, which holds the content of the barrel, is empty or locked when determining whether to copy the block entity data into the barrel to be dropped.
However, mods like Building Gadgets 2 can call the function to get the item which drops from breaking the barrel without the barrel having an attached block entity. This breaks these mods' functionality, which can cause errors or even crash the game.
Original issue: Direwolf20-MC/BuildingGadgets2#143
Fixing this will likely need a check to see if the block's block entity is null, and if so returns an empty barrel/tank/appropriate storage unit.