Fix access widener file hashcode calculation breaking caching.

When using transitive access wideners the mc jar would always be re-processed.
dev/0.11
modmuss50 2021-11-17 15:30:23 +00:00
parent dd7882598e
commit 9c2b1e8d6d
1 changed files with 9 additions and 0 deletions

View File

@ -28,6 +28,8 @@ import java.io.IOException;
import java.io.UncheckedIOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.Objects;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
@ -78,4 +80,11 @@ public record AccessWidenerFile(
content
);
}
@Override
public int hashCode() {
int result = Objects.hash(name, modId);
result = 31 * result + Arrays.hashCode(content);
return result;
}
}