aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2022-10-29 22:26:02 +0800
committershedaniel <daniel@shedaniel.me>2022-10-29 22:26:02 +0800
commit0561ca0458d070f4eee12a896d49ab5e00b1ec92 (patch)
tree03e582b218e43817e981adb76dd05df4f2335238 /runtime
parent46d2c64c4303bc007055268075ea9be4e9852e5e (diff)
downloadRoughlyEnoughItems-0561ca0458d070f4eee12a896d49ab5e00b1ec92.tar.gz
RoughlyEnoughItems-0561ca0458d070f4eee12a896d49ab5e00b1ec92.tar.bz2
RoughlyEnoughItems-0561ca0458d070f4eee12a896d49ab5e00b1ec92.zip
Prevent Minecraft.getInstance().level == null reloads
Diffstat (limited to 'runtime')
-rw-r--r--runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCoreClient.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCoreClient.java b/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCoreClient.java
index ac3753e90..bcb3c0a45 100644
--- a/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCoreClient.java
+++ b/runtime/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsCoreClient.java
@@ -457,6 +457,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);