Skip to content

Commit bbcc58f

Browse files
committed
Merge 1.18 into 1.19.2
2 parents 7e2dc67 + 0c3cade commit bbcc58f

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

common/src/main/java/org/embeddedt/modernfix/core/ModernFixMixinPlugin.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ public ModernFixMixinPlugin() {
4141

4242
if (option.isUserDefined()) {
4343
source = "user configuration";
44+
} else if (!ModernFixPlatformHooks.isLoadingNormally()) {
45+
source = "load error";
4446
} else if (option.isModDefined()) {
4547
source = "mods [" + String.join(", ", option.getDefiningMods()) + "]";
4648
}

common/src/main/java/org/embeddedt/modernfix/core/config/ModernFixEarlyConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ private ModernFixEarlyConfig(File file) {
242242

243243
private void disableIfModPresent(String configName, String... ids) {
244244
for(String id : ids) {
245-
if(modPresent(id)) {
245+
if(!ModernFixPlatformHooks.isLoadingNormally() || modPresent(id)) {
246246
Option option = this.options.get(configName);
247247
if(option != null)
248248
option.addModOverride(false, id);

common/src/main/java/org/embeddedt/modernfix/dynamicresources/ModelBakeryHelpers.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import net.minecraft.world.level.block.state.properties.Property;
2727
import org.embeddedt.modernfix.ModernFix;
2828
import org.embeddedt.modernfix.api.entrypoint.ModernFixClientIntegration;
29+
import org.embeddedt.modernfix.platform.ModernFixPlatformHooks;
2930

3031
import java.io.IOException;
3132
import java.io.InputStream;
@@ -115,6 +116,8 @@ public static void gatherModelMaterials(ResourceManager manager, Predicate<PackR
115116
Set<ResourceLocation> modelFiles, UnbakedModel missingModel,
116117
Function<JsonElement, BlockModel> modelDeserializer,
117118
Function<ResourceLocation, UnbakedModel> bakeryModelGetter) {
119+
if(!ModernFixPlatformHooks.isLoadingNormally())
120+
return;
118121
Stopwatch stopwatch = Stopwatch.createStarted();
119122
final Object2IntOpenHashMap<String> blockstateErrors = new Object2IntOpenHashMap<>();
120123
/*

forge/src/main/java/org/embeddedt/modernfix/platform/forge/ModernFixPlatformHooksImpl.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ public static MinecraftServer getCurrentServer() {
7373
}
7474

7575
public static boolean isLoadingNormally() {
76+
if(!LoadingModList.get().getErrors().isEmpty())
77+
return false;
7678
return ModLoader.isLoadingStateValid();
7779
}
7880

0 commit comments

Comments
 (0)