[1.12.2] Crash When Pressing U (JEI) - Mod Interaction with EnderIO Painter
MokahTGS opened this issue ยท 7 comments
There is a crash that occurs when player press the U key on items to see their usage in JEI that seems to be a bad interaction between those mods blocks and Ancient Warfare. Initially I posted this bug in the EnderIO Github because it happened while pressing U on the Sag Mill.
SleepyTrousers/EnderIO-1.5-1.12#4755 (comment)
This is a crash due to the rendering in ancient warfare of blocks. Ender io triggers it when it's getting the models of blocks for painting recipes.
EnderIO: EnderIO-1.12.2-5.0.29.jar
EnderCore: EnderCore-1.12.2-0.5.35.jar
Ancient Warfare: 1.12.2-2.6.1.262
Minecraft: 1.12.2
Forge: 2707
https://paste.dimdev.org/newojekipe.mccrash
Full mod list: https://pastebin.com/JN5H9P0E
I can't open the crash log, the site is simply unreachable for me. Could you put it on pastebin / hastebin?
Try that. I think that's the one.
In short: This fails:
((ItemBlock) itemStack.getItem()).getBlock().getStateFromMeta(itemStack.getItem().getMetadata(itemStack.getMetadata()));
It looks very convoluted, but this is how vanilla's ItemBlock+Block work together to convert an item damage to a blockstate.
The problem here isn't that AW doesn't have proper getStateFromMeta code, but that it gets passed in invalid value. The block in question only has Horizontal PropertyDirection but it gets meta of DOWN passed in. I guess I can add boundary checks and default to some value if I get incorrect one passed in, but it would make sense to check why the painting machine actually tries to pass in the incorrect value.
Hold on I see what you're doing you're just taking the item meta and try to convert that to a block state? That block definitely isn't prepared for this, it uses getStateForPlacement implementation when block is placed.