aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2022-10-29 22:26:02 +0800
committershedaniel <daniel@shedaniel.me>2022-10-29 22:35:51 +0800
commitd63545551cbf1ccaebe01b7b3e7d668854b50883 (patch)
tree8e72dee02bb5af3266c77ccf65e8bbb048b64f9b
parentd87a94e4614708de005a7431680ec0a51308f6ec (diff)
downloadRoughlyEnoughItems-d63545551cbf1ccaebe01b7b3e7d668854b50883.tar.gz
RoughlyEnoughItems-d63545551cbf1ccaebe01b7b3e7d668854b50883.tar.bz2
RoughlyEnoughItems-d63545551cbf1ccaebe01b7b3e7d668854b50883.zip
Prevent Minecraft.getInstance().level == null reloads
-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 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);