Skip to content

Commit fdbaf14

Browse files
committed
Only remap mods that have an original namespace that's different to the target namespace.
Superseeds #483
1 parent 0fdd22e commit fdbaf14

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ group = org.quiltmc
55
description = The mod loading component of Quilt
66
url = https://github.com/quiltmc/quilt-loader
77
# Don't forget to change this in QuiltLoaderImpl as well
8-
quilt_loader = 0.30.0-beta.2
8+
quilt_loader = 0.30.0-beta.3
99

1010
# Fabric & Quilt Libraries
1111
asm = 9.9

src/main/java/org/quiltmc/loader/impl/QuiltLoaderImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public final class QuiltLoaderImpl {
131131

132132
public static final int ASM_VERSION = Opcodes.ASM9;
133133

134-
public static final String VERSION = "0.30.0-beta.2";
134+
public static final String VERSION = "0.30.0-beta.3";
135135
public static final String MOD_ID = "quilt_loader";
136136
public static final String DEFAULT_MODS_DIR = "mods";
137137
public static final String DEFAULT_CACHE_DIR = ".cache";

src/main/java/org/quiltmc/loader/impl/transformer/RuntimeModRemapper.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,20 +87,22 @@ final class RuntimeModRemapper {
8787
return;
8888
}
8989

90-
boolean mojmapEnvironment = "mojang".equals(mappingConfiguration.getTargetNamespace());
90+
String targetNamespace = mappingConfiguration.getTargetNamespace();
91+
boolean mojmapEnvironment = "mojang".equals(targetNamespace);
9192

9293
for (ModLoadOption mod : mods) {
9394
String namespace = mod.namespaceMappingFrom();
95+
if (namespace == null || namespace.equals(targetNamespace)) {
96+
continue;
97+
}
9498
if ("mojang".equals(namespace)) {
9599
if (mojmapEnvironment) {
96100
break;
97101
}
98102

99103
throw new UnsupportedOperationException("Cannot remap mojang mods to another environment!");
100104
}
101-
if (namespace != null) {
102-
modsToRemap.add(mod);
103-
}
105+
modsToRemap.add(mod);
104106
}
105107
}
106108

0 commit comments

Comments
 (0)