Skip to content

Commit

Permalink
Fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
shedaniel committed Dec 26, 2023
1 parent beb04d3 commit cea4b39
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@

package net.fabricmc.loom.api.remapping;

import dev.architectury.tinyremapper.TinyRemapper;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Nullable;

import net.fabricmc.tinyremapper.TinyRemapper;

/**
* A remapper extension, that has direct access to the TinyRemapper APIs.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ private File getNestableJar(final File input, final Metadata metadata) {

File tempFile = new File(tempDir, input.getName());

if (tempFile.exists() && FabricModJsonFactory.isModJar(tempFile)) {
if (tempFile.exists() && FabricModJsonFactory.isModJar(tempFile, LoomGradleExtension.get(project).getPlatform().get())) {
return tempFile;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ public static TinyJarInfo get(Path jar) {
private static boolean doesJarContainV2Mappings(FileSystemUtil.Delegate fs) throws IOException {
try (BufferedReader reader = Files.newBufferedReader(fs.getPath("mappings", "mappings.tiny"))) {
return MappingReader.detectFormat(reader) == MappingFormat.TINY_2_FILE;
}
} catch (NoSuchFileException e) {
return false;
}
}

private static Optional<String> getMinecraftVersionId(FileSystemUtil.Delegate fs) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,6 @@ public Dependency layered(Action<LayeredMappingSpecBuilder> action) {
return new LayeredMappingsDependency(getProject(), new GradleMappingContext(getProject(), builtSpec.getVersion().replace("+", "_").replace(".", "_")), builtSpec, builtSpec.getVersion());
}

protected abstract String getMinecraftVersion();

@Override
public void runs(Action<NamedDomainObjectContainer<RunConfigSettings>> action) {
action.execute(runConfigs);
Expand Down Expand Up @@ -558,11 +556,6 @@ public MixinExtension getMixin() {
throw new RuntimeException("Yeah... something is really wrong");
}

@Override
protected String getMinecraftVersion() {
throw new RuntimeException("Yeah... something is really wrong");
}

@Override
public ForgeExtensionAPI getForge() {
throw new RuntimeException("Yeah... something is really wrong");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,11 +302,6 @@ protected <T extends IntermediateMappingsProvider> void configureIntermediateMap
provider.getDownloader().disallowChanges();
}

@Override
protected String getMinecraftVersion() {
return getMinecraftProvider().minecraftVersion();
}

@Override
public ForgeExtensionAPI getForge() {
ModPlatform.assertPlatform(this, ModPlatform.FORGE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

import javax.inject.Inject;

import dev.architectury.tinyremapper.TinyRemapper;
import dev.architectury.tinyremapper.api.TrClass;
import org.gradle.api.model.ObjectFactory;
import org.gradle.api.provider.Property;
import org.gradle.api.tasks.Input;
Expand All @@ -39,8 +41,6 @@
import net.fabricmc.loom.api.remapping.RemapperExtension;
import net.fabricmc.loom.api.remapping.RemapperParameters;
import net.fabricmc.loom.api.remapping.TinyRemapperExtension;
import net.fabricmc.tinyremapper.TinyRemapper;
import net.fabricmc.tinyremapper.api.TrClass;

public abstract class RemapperExtensionHolder {
// Null when RemapperParameters.None.class
Expand Down

0 comments on commit cea4b39

Please sign in to comment.