Make sure JEI doesn't reload without a client world

This commit is contained in:
embeddedt 2023-05-02 10:47:07 -04:00
parent c415549f4e
commit 87958ff213
No known key found for this signature in database
GPG Key ID: A69433EC199B5613

View File

@ -82,6 +82,8 @@ public class ClientLifecycleHandlerMixin {
private void startJEIAsync(Runnable whenFinishedCb) {
cancelPreviousStart();
if(Minecraft.getInstance().level == null)
return;
ModernFix.LOGGER.info("Starting new JEI thread.");
JEIReloadThread newThread = new JEIReloadThread(() -> {
if(((JEIReloadThread)Thread.currentThread()).isStopRequested())