Incopatibility with JEI : Games freezes when equipping an armor that is part of a set
Arthurcrs opened this issue ยท 7 comments
When equiping and unequipping items that have a set bonus from the mod "Set Bonus" the game freezes for a while. The more items in the modpack, the longer is the freezing.
Environment
- Minecraft 1.12.2
- Modpack with HEI, Set Bonus, and a bunch of dimension mods to increase the number of items in the game (the higher the number of items in the game, the longer the freeze)
- Replicated in both Forge versions 14.23.5.2859 and 14.23.5.2860
- All mods with default config (except Set Bonus)
Steps to Reproduce
- Create a set bonus in the "Set Bonus" config (the one attached in this issue can be used, it requires Ice and Fire and Spartan Weaponry)1.12.2.009+.txt
- Launch the game and join a world
- Equip a item that has a set bonus
- Notice a freezing
- Close the game
- Remove HEI
- Launch the game and join a world
- Equip a item that has a set bonus
- Game does not freeze
Notes:
- It is only noticiable in modpacks with many items, the larger the modpack, the longer the freezing
- It happens in both JEI and HEI
- When equiping and unequipping items that have a "Set Bonus", the log message appears "JEI Plugin is Registering subtypes" in the log, so it might be due to this.
- This issue was posted on "Had Enough Items" github. With the autor repplying "It uses some hideous reflection into JEI. This isn't something for me to fix in HadEnoughItems. Some reloading API may come soon. The mod dev can consult GroovyScript on how to correctly reload JEI." CleanroomMC/HadEnoughItems#101
Update:
- This issue only happens from version 1.12.2.021 onwards.
- Downgrading the mod to version 1.12.2.020 fixes the problem
Yeah...I was hoping this wouldn't be too heavy on computation, but I guess it is. This is a side-effect of the way I got JEI to be able to see Set Bonus tooltips (for JEI tooltip search).
The reason it's so inefficient right now is because the only way I found to get it to work correctly so far was to reload basically all of JEI when set item tooltips change.
I'll have to look into making this more efficient, or as an alternative, adding a config setting for disabling this feature...or maybe only making it do this when the player actually discovers something new in Set Bonus.
General reference: #12
@Arthurcrs
I've just released version 1.12.2.028, which has vastly improved performance for this, but I'm still not sure if its ideal. Maybe give it a try and tell me what you think when you get a chance.
I've made further performance improvements, to the point of being much more efficient than even JEI's regular performance...this further performance boost will be available in version 1.12.2.029 when I release it (I'll leave this issue open until then).
I'm pretty confident that this is no longer an issue in the latest release (1.12.2.029), so I'm going to close it.
Feel free to comment if you find that it's still having a performance issue somehow and I can re-open it.

