[IU] Industrial Upgrade

[IU] Industrial Upgrade

353k Downloads

State class does not override hashCode, causing issues with optimization mods

embeddedt opened this issue ยท 1 comments

commented

The com.denfop.blocks.State class is used as the value type for a blockstate property. However, this class does not override hashCode, which is a violation of Java conventions (classes that override equals should also override hashCode). This can cause it to function incorrectly if used as the key in a hashmap.

My mod, VintageFix, includes blockstate optimizations backported from FerriteCore, and one of those optimizations relies on being able to use property values as keys in a map. This works correctly for vanilla and in many large modpacks, but there is a crash on startup with Industrial Upgrade. I suspect this is due to the issue mentioned above. The crash log can be found on the ViF issue report if needed.

commented

fixed