Skip to content

Commit

Permalink
Merge branch 'master' into add-more-minecraft-test-projects
Browse files Browse the repository at this point in the history
  • Loading branch information
modmuss50 authored Oct 26, 2024
2 parents bc5dc58 + e7694f0 commit 6e871b3
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@ public abstract class AbstractSecureClassLoader extends SecureClassLoader {
public AbstractSecureClassLoader(String name, ClassLoader parent) {
super(name, parent);
}

static {
ClassLoader.registerAsParallelCapable();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public final class FabricLoaderImpl extends net.fabricmc.loader.FabricLoader {

public static final int ASM_VERSION = Opcodes.ASM9;

public static final String VERSION = "0.16.6";
public static final String VERSION = "0.16.7";
public static final String MOD_ID = "fabricloader";

public static final String CACHE_DIR_NAME = ".fabric"; // relative to game dir
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ public void findCandidates(ModCandidateConsumer out) {
URL url = mods.nextElement();

try {
Path path = UrlUtil.getCodeSource(url, "fabric.mod.json");
assert path.equals(LoaderUtil.normalizeExistingPath(path));
Path path = LoaderUtil.normalizeExistingPath(UrlUtil.getCodeSource(url, "fabric.mod.json")); // code source may not be normalized if from app cl
List<Path> paths = pathGroups.get(path);

if (paths == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ public List<ModCandidateImpl> discoverMods(FabricLoaderImpl loader, Map<String,
}
}

futures.add(pool.submit(new ModScanTask(pendingPaths, requiresRemap)));
if (!pendingPaths.isEmpty()) {
futures.add(pool.submit(new ModScanTask(pendingPaths, requiresRemap)));
}
};

for (ModCandidateFinder finder : candidateFinders) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public static void init(EnvType side, FabricLoaderImpl loader) {
try {
Mixins.addConfiguration(config);
} catch (Throwable t) {
throw new RuntimeException(String.format("Error creating Mixin config %s for mod %s", config, mod.getMetadata().getId()), t);
throw new RuntimeException(String.format("Error parsing or using Mixin config %s for mod %s", config, mod.getMetadata().getId()), t);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static final class Metadata {
private IMixinTransformer mixinTransformer;
private boolean transformInitialized = false;
private volatile Set<Path> codeSources = Collections.emptySet();
private volatile Set<Path> validParentCodeSources = Collections.emptySet();
private volatile Set<Path> validParentCodeSources = null; // null = disabled isolation, game provider has to set it to opt in
private final Map<Path, String[]> allowedPrefixes = new ConcurrentHashMap<>();
private final Set<String> parentSourcedClasses = Collections.newSetFromMap(new ConcurrentHashMap<>());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@ public abstract class AbstractSecureClassLoader extends SecureClassLoader {
public AbstractSecureClassLoader(String name, ClassLoader parent) {
super(parent);
}

static {
ClassLoader.registerAsParallelCapable();
}
}

0 comments on commit 6e871b3

Please # to comment.