aboutsummaryrefslogtreecommitdiff
path: root/runtime-engine
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2022-11-07 21:45:53 +0800
committershedaniel <daniel@shedaniel.me>2022-11-07 21:46:09 +0800
commit9a6370e1cda521f1a4506727794546727a809bdf (patch)
treeb27fae841120a01226f36f6868fa8c2d8fad3e70 /runtime-engine
parentc57bc7f92600c5156f2300df326b5b3e485ad1f0 (diff)
downloadRoughlyEnoughItems-9a6370e1cda521f1a4506727794546727a809bdf.tar.gz
RoughlyEnoughItems-9a6370e1cda521f1a4506727794546727a809bdf.tar.bz2
RoughlyEnoughItems-9a6370e1cda521f1a4506727794546727a809bdf.zip
Merge commit '46d2c64c4303bc007055268075ea9be4e9852e5e' into modularity
Diffstat (limited to 'runtime-engine')
-rw-r--r--runtime-engine/initialization/src/main/java/me/shedaniel/rei/impl/common/init/CoreInitialization.java2
-rw-r--r--runtime-engine/plugins/src/main/java/me/shedaniel/rei/impl/common/plugins/PluginManagerImpl.java12
2 files changed, 13 insertions, 1 deletions
diff --git a/runtime-engine/initialization/src/main/java/me/shedaniel/rei/impl/common/init/CoreInitialization.java b/runtime-engine/initialization/src/main/java/me/shedaniel/rei/impl/common/init/CoreInitialization.java
index fc6304272..22cad60d2 100644
--- a/runtime-engine/initialization/src/main/java/me/shedaniel/rei/impl/common/init/CoreInitialization.java
+++ b/runtime-engine/initialization/src/main/java/me/shedaniel/rei/impl/common/init/CoreInitialization.java
@@ -42,6 +42,7 @@ import me.shedaniel.rei.api.common.transfer.info.MenuInfoRegistry;
import me.shedaniel.rei.impl.client.init.CoreClientInitialization;
import me.shedaniel.rei.impl.common.InternalLogger;
import me.shedaniel.rei.impl.common.Internals;
+import net.minecraft.client.Minecraft;
import net.minecraft.server.packs.PackType;
import net.minecraft.util.Unit;
import org.apache.commons.lang3.mutable.MutableLong;
@@ -99,6 +100,7 @@ public class CoreInitialization {
}
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);
diff --git a/runtime-engine/plugins/src/main/java/me/shedaniel/rei/impl/common/plugins/PluginManagerImpl.java b/runtime-engine/plugins/src/main/java/me/shedaniel/rei/impl/common/plugins/PluginManagerImpl.java
index cca94c79e..39b1e5a10 100644
--- a/runtime-engine/plugins/src/main/java/me/shedaniel/rei/impl/common/plugins/PluginManagerImpl.java
+++ b/runtime-engine/plugins/src/main/java/me/shedaniel/rei/impl/common/plugins/PluginManagerImpl.java
@@ -149,7 +149,17 @@ public class PluginManagerImpl<P extends REIPlugin<?>> implements PluginManager<
}
public String getPluginProviderName() {
- return provider.getPluginProviderName();
+ String providerName = provider.getPluginProviderName();
+
+ if (provider.provide().size() >= 1) {
+ String pluginName = plugin.getPluginProviderName();
+
+ if (!providerName.equals(pluginName)) {
+ providerName = pluginName + " of " + providerName;
+ }
+ }
+
+ return providerName;
}
}
}