From d63545551cbf1ccaebe01b7b3e7d668854b50883 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 cff3fa321..01e4fc1fd 100644 --- a/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCoreClient.java +++ b/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCoreClient.java @@ -454,6 +454,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