Skip to content

Commit

Permalink
Fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
shedaniel committed Nov 22, 2023
1 parent 00254ea commit de3c205
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/net/fabricmc/loom/task/RemapJarTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,13 @@ public void run() {

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");
}
Expand All @@ -235,13 +242,6 @@ public void run() {

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());
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit de3c205

Please sign in to comment.