mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-11 16:07:38 +00:00
Make sure NEI plugins are loaded before processing keybindings (#375)
NEI plugins are initialized in a separate thread. If this takes too long, the client tick handler might already be running checking the keybindings in KeyManager while a plugin calls API.addKeyBind() which can lead to a CME. Reported in https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/13292 Thanks to @Denostrov for helping me track this down.
This commit is contained in:
1 parent
5eeb001534
commit
30c87e9160
2 files changed
+10
-3
No files matched your search
@@ -276,7 +276,11 @@ public class ClientHandler {
|
||||
|
||||
if (!NEIClientConfig.isEnabled()) return;
|
||||
|
||||
KeyManager.tickKeyStates();
|
||||
/*
|
||||
* NEI plugins are loaded in a separate thread. Make sure loading them has finished otherwise a CME might
|
||||
* occur in KeyManager if a plugin calls API.addKeyBind() during initialization.
|
||||
*/
|
||||
if (NEIClientConfig.isLoaded()) KeyManager.tickKeyStates();
|
||||
|
||||
NEIController.updateUnlimitedItems(mc.thePlayer.inventory);
|
||||
if (mc.currentScreen == null) NEIController.processCreativeCycling(mc.thePlayer.inventory);
|
||||
|
||||
Reference in new issue
Block a user