Initial plumbing for NeoForge support

This commit is contained in:
Juuz
2023-10-30 22:31:12 +02:00
parent 31147018be
commit 8a1d09e69f
39 changed files with 405 additions and 82 deletions

View File

@@ -192,7 +192,7 @@ public abstract class GenerateSourcesTask extends AbstractLoomTask {
}
// Inject Forge's own sources
if (getExtension().isForge()) {
if (getExtension().isForgeLike()) {
try (var serviceManager = new ScopedSharedServiceManager()) {
ForgeSourcesRemapper.addForgeSources(getProject(), serviceManager, getOutputJar().get().getAsFile().toPath());
}
@@ -296,7 +296,7 @@ public abstract class GenerateSourcesTask extends AbstractLoomTask {
params.getClassPath().setFrom(getProject().getConfigurations().getByName(Constants.Configurations.MINECRAFT_COMPILE_LIBRARIES));
// Architectury
params.getForge().set(getExtension().isForge());
params.getForge().set(getExtension().isForgeLike());
});
try {
@@ -470,7 +470,7 @@ public abstract class GenerateSourcesTask extends AbstractLoomTask {
}
private Path getMappings() {
Path inputMappings = getExtension().isForge() ? getExtension().getMappingConfiguration().tinyMappingsWithSrg : getExtension().getMappingConfiguration().tinyMappings;
Path inputMappings = getExtension().getPlatformMappingFile();
MemoryMappingTree mappingTree = new MemoryMappingTree();