Fix merge conflicts

This commit is contained in:
shedaniel
2023-11-22 15:08:03 +08:00
parent 00254ea567
commit de3c2056da
3 changed files with 13 additions and 13 deletions

View File

@@ -52,10 +52,10 @@ public record ArtifactMetadata(boolean isFabricMod, RemapRequirements remapRequi
private static final String QUILT_INSTALLER_PATH = "quilt_installer.json";
public static ArtifactMetadata create(ArtifactRef artifact, String currentLoomVersion) throws IOException {
return create(artifact, ModPlatform.FABRIC);
return create(artifact, currentLoomVersion, ModPlatform.FABRIC);
}
public static ArtifactMetadata create(ArtifactRef artifact, ModPlatform platform) throws IOException {
public static ArtifactMetadata create(ArtifactRef artifact, String currentLoomVersion, ModPlatform platform) throws IOException {
boolean isFabricMod;
RemapRequirements remapRequirements = RemapRequirements.DEFAULT;
InstallerData installerData = null;

View File

@@ -220,6 +220,13 @@ public abstract class RemapJarTask extends AbstractRemapJarTask {
if (mixinAp) {
setupLegacyMixinRefmapRemapping(params);
}
// Add the mixin refmap remap type to the manifest
// This is used by the mod dependency remapper to determine if it should remap the refmap
// or if the refmap should be remapped by mixin at runtime.
final var refmapRemapType = mixinAp ? ArtifactMetadata.MixinRemapType.MIXIN : ArtifactMetadata.MixinRemapType.STATIC;
params.getManifestAttributes().put(Constants.Manifest.MIXIN_REMAP_TYPE, refmapRemapType.manifestValue());
} else if (extension.isForge()) {
throw new RuntimeException("Forge must have useLegacyMixinAp enabled");
}
@@ -235,13 +242,6 @@ public abstract class RemapJarTask extends AbstractRemapJarTask {
if (!getAtAccessWideners().get().isEmpty()) {
params.getMappingBuildServiceUuid().set(UnsafeWorkQueueHelper.create(MappingsService.createDefault(getProject(), serviceManagerProvider.get().get(), getSourceNamespace().get(), getTargetNamespace().get())));
}
// Add the mixin refmap remap type to the manifest
// This is used by the mod dependency remapper to determine if it should remap the refmap
// or if the refmap should be remapped by mixin at runtime.
final var refmapRemapType = mixinAp ? ArtifactMetadata.MixinRemapType.MIXIN : ArtifactMetadata.MixinRemapType.STATIC;
params.getManifestAttributes().put(Constants.Manifest.MIXIN_REMAP_TYPE, refmapRemapType.manifestValue());
}
});
}

View File

@@ -60,10 +60,10 @@ class FabricAPITest extends Specification implements GradleProjectTestTrait {
""".stripIndent()
}
// Change the plugin used
gradle.buildGradle.text = gradle.buildGradle.text
.replace('id "fabric-loom" version "1.4.1"', 'id "dev.architectury.loom"')
.replace('"fabric-loom"', '"dev.architectury.loom"') + mixinApPatch
// Change the plugin used
gradle.buildGradle.text = gradle.buildGradle.text
.replace('id "fabric-loom" version "1.4.1"', 'id "dev.architectury.loom"')
.replace('"fabric-loom"', '"dev.architectury.loom"') + mixinApPatch
def minecraftVersion = "23w45a"
def server = ServerRunner.create(gradle.projectDir, minecraftVersion)