mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-04-03 05:57:42 -05:00
Shade tiny mappings parser inside the injection jar, add launch property for the mapping path
This commit is contained in:
@@ -69,7 +69,7 @@ public class YarnNamingService implements INameMappingService {
|
||||
}
|
||||
|
||||
String pathStr = System.getProperty("loom.srgtoyarn.path");
|
||||
if (pathStr == null) throw new RuntimeException("Missing system property 'loom.srgtoyarn.path'!");
|
||||
if (pathStr == null) throw new RuntimeException("Missing system property 'fabric.yarnWithSrg.path'!");
|
||||
Path path = Paths.get(pathStr);
|
||||
|
||||
try (BufferedReader reader = Files.newBufferedReader(path)) {
|
||||
|
||||
@@ -70,6 +70,8 @@ public class LaunchProvider extends DependencyProvider {
|
||||
|
||||
if (getExtension().isForge()) {
|
||||
launchConfig
|
||||
.property("fabric.yarnWithSrg.path", getExtension().getMappingsProvider().tinyMappingsWithSrg.toAbsolutePath().toString())
|
||||
|
||||
.argument("--fml.mcVersion")
|
||||
.argument(getExtension().getMinecraftProvider().getMinecraftVersion())
|
||||
.argument("--fml.forgeVersion")
|
||||
|
||||
@@ -78,7 +78,7 @@ public class MappingsProvider extends DependencyProvider {
|
||||
public File tinyMappings;
|
||||
public File tinyMappingsJar;
|
||||
public File mappingsMixinExport;
|
||||
private Path tinyMappingsWithSrg;
|
||||
public Path tinyMappingsWithSrg;
|
||||
|
||||
public MappingsProvider(Project project) {
|
||||
super(project);
|
||||
|
||||
@@ -290,8 +290,8 @@ public class MinecraftProvider extends DependencyProvider {
|
||||
FileUtils.copyInputStreamToFile(in, injection);
|
||||
}
|
||||
|
||||
copyAll(injection, minecraftClientPatchedSrgJar);
|
||||
copyAll(injection, minecraftServerPatchedSrgJar);
|
||||
walkFileSystems(injection, minecraftClientPatchedSrgJar, it -> !it.getFileName().toString().equals("MANIFEST.MF"), this::copyReplacing);
|
||||
walkFileSystems(injection, minecraftServerPatchedSrgJar, it -> !it.getFileName().toString().equals("MANIFEST.MF"), this::copyReplacing);
|
||||
}
|
||||
|
||||
private void remapPatchedJars(Logger logger) throws IOException {
|
||||
|
||||
Reference in New Issue
Block a user