aboutsummaryrefslogtreecommitdiff
path: root/runtime/src/main/java
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2022-10-29 22:26:02 +0800
committershedaniel <daniel@shedaniel.me>2023-05-29 21:17:52 +0800
commitf9ba02a4e4fe483ab0a9c9c016bc8fb9306a5cb8 (patch)
treec58099dbe7ee5a8ff29f5d0eafe1168342669199 /runtime/src/main/java
parentcf8206146e065f756d4229a3359214f54f70319f (diff)
downloadRoughlyEnoughItems-f9ba02a4e4fe483ab0a9c9c016bc8fb9306a5cb8.tar.gz
RoughlyEnoughItems-f9ba02a4e4fe483ab0a9c9c016bc8fb9306a5cb8.tar.bz2
RoughlyEnoughItems-f9ba02a4e4fe483ab0a9c9c016bc8fb9306a5cb8.zip
Prevent Minecraft.getInstance().level == null reloads
Diffstat (limited to 'runtime/src/main/java')
-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 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);