From f9ba02a4e4fe483ab0a9c9c016bc8fb9306a5cb8 Mon Sep 17 00:00:00 2001 From: shedaniel Date: Sat, 29 Oct 2022 22:26:02 +0800 Subject: Prevent Minecraft.getInstance().level == null reloads --- runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCoreClient.java | 1 + 1 file changed, 1 insertion(+) (limited to 'runtime/src/main/java') diff --git a/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCoreClient.java b/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCoreClient.java index 6ea8997fc..650ed86d4 100644 --- a/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCoreClient.java +++ b/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCoreClient.java @@ -456,6 +456,7 @@ public class RoughlyEnoughItemsCoreClient { @ApiStatus.Internal public static void reloadPlugins(MutableLong lastReload, @Nullable ReloadStage start) { + if (Minecraft.getInstance().level == null) return; if (lastReload != null) { if (lastReload.getValue() > 0 && System.currentTimeMillis() - lastReload.getValue() <= 5000) { InternalLogger.getInstance().warn("Suppressing Reload Plugins of stage " + start); -- cgit