Charset Storage - Barrels

Charset Storage - Barrels

429k Downloads

Compression Crafting crashing when recipe shape doesn't match size of barrel grid

Ajama11 opened this issue ยท 3 comments

commented

Crash report: https://pastebin.com/UCfazkFU

Minecraft version: 1.12.2
Forge version: 14.23.3.2655
Mods installed: Charset Lib, Charset Storage Barrels, Charset Crafting

The crash happens when the item would be crafted after the animation plays. As long as the recipe shape doesn't match, it'll crash regardless of whether or not the recipe is valid. If the recipe shape matches, then it won't crash even if the recipe is invalid.

In the crash log provided, the versions were 0.5.0.235 for Lib and Crafting and 0.5.0.233 for Storage Barrels. I tested again with the latest versions on Curseforge (0.5.0.239 for Lib and Crafting, still 0.5.0.233 for Storage Barrels) and it produces the exact same error. Updating Forge to 14.23.3.2669 on top of that also produces the same error. Downgrading Lib and Crafting so that are 3 versions are 0.5.0.233 also produces the same error.

1x1 in 3x3, crashes: https://i.imgur.com/BpW5Tmv.png
1x1 in 1x1, works fine: https://i.imgur.com/Ir1Ud6o.png

3x3 in 3x3, works fine: https://i.imgur.com/X9GFuqU.png
Invalid 3x3 in 3x3, works fine: https://i.imgur.com/giiacWm.png

2x3 in 3x3, crashes: https://i.imgur.com/l9O7TUO.png
2x3 in 2x3, works fine: https://i.imgur.com/L1JuiXw.png

And to prove that it's not just the 3x3 grid crashing
2x2 in 2x3, crashes: https://i.imgur.com/MrU4ql8.png

I have no idea how the code works, so I apologize if all of this testing was redundant.

commented

This is a very good report!

This is caused by one of the dependency mods for Charset having an access transformer which Charset itself does not, meaning that Charset crashes without the presence of said mod. It can be fixed, however.

commented

The tests were slightly redundant, but that's something to praise rather than complain about - you've clearly put in effort.

As for why it crashes: Charset employs an advanced recipe lookup system to cut the time of recipe lookups by ~50% compared to vanilla. It's, however, a bit tricky to get it just right.

commented

(To be specific, the mod which provided the necessary patch that prevented the crashing was CraftTweaker. But we should not be depending on CraftTweaker. Not at all. However, many people do use CraftTweaker, so obviously they wouldn't see the bug.)

Fix incoming.