Skip to content

Commit

Permalink
Update fabric mapping-io to v0.6.1
Browse files Browse the repository at this point in the history
Fixes errors caused by other mods including newer versions of mapping-io which contain breaking changes
  • Loading branch information
booky10 committed Jul 7, 2024
1 parent 4bdee4d commit 3308a11
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import net.fabricmc.mappingio.MappedElementKind;
import net.fabricmc.mappingio.MappingVisitor;
import org.jetbrains.annotations.Nullable;

import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -54,7 +55,7 @@ public boolean visitMethodArg(int argPosition, int lvIndex, String srcName) {
}

@Override
public boolean visitMethodVar(int lvtRowIndex, int lvIndex, int startOpIdx, String srcName) {
public boolean visitMethodVar(int lvtRowIndex, int lvIndex, int startOpIdx, int endOpIdx, @Nullable String srcName) {
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public BuildBasedMappingProvider(VersionData versionData, String name, MavenArti
}

protected MappingFormat getMappingFormat() {
return MappingFormat.TINY_2;
return MappingFormat.TINY_2_FILE;
}

public VerifiableUrl.HashType getMetaHashType() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public CompletableFuture<Void> parseMappings0(Executor executor) {
try (InputStream fileInput = Files.newInputStream(this.path);
GZIPInputStream gzipInput = new GZIPInputStream(fileInput);
Reader reader = new InputStreamReader(gzipInput)) {
MappingReader.read(reader, MappingFormat.TINY_2, mappings);
MappingReader.read(reader, MappingFormat.TINY_2_FILE, mappings);
} catch (IOException exception) {
throw new RuntimeException(exception);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ protected CompletableFuture<Void> parseMappings0(Executor executor) {
try (InputStream fileInput = Files.newInputStream(this.path);
GZIPInputStream gzipInput = new GZIPInputStream(fileInput);
Reader reader = new InputStreamReader(gzipInput)) {
MappingReader.read(reader, MappingFormat.PROGUARD, rawMappings);
MappingReader.read(reader, MappingFormat.PROGUARD_FILE, rawMappings);
}

rawMappings.setSrcNamespace("named");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ protected CompletableFuture<Void> parseMappings0(Executor executor) {
try (InputStream fileInput = Files.newInputStream(this.hashedPath);
GZIPInputStream gzipInput = new GZIPInputStream(fileInput);
Reader reader = new InputStreamReader(gzipInput)) {
MappingReader.read(reader, MappingFormat.TINY_2, mappings);
MappingReader.read(reader, MappingFormat.TINY_2_FILE
, mappings);
} catch (IOException exception) {
throw new RuntimeException(exception);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public VerifiableUrl.HashType getMetaHashType() {
@Override
protected MappingFormat getMappingFormat() {
return getVersionFlags(this.versionData).contains(VersionFlag.NO_V2)
? MappingFormat.TINY : MappingFormat.TINY_2;
? MappingFormat.TINY_FILE : MappingFormat.TINY_2_FILE;
}

private enum VersionFlag {
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ loom = "1.7-SNAPSHOT"
shadow = "8.1.1"

fabric-loader = "0.14.21"
fabric-mappingio = "0.3.0"
fabric-mappingio = "0.6.1"
minecraft = "1.20.1"

# built in minecraft, required for compiling
Expand Down

0 comments on commit 3308a11

Please sign in to comment.