Skip to content

Commit

Permalink
Bump class cache version
Browse files Browse the repository at this point in the history
Covers old installs where `field_40571` won't have been remapped
  • Loading branch information
Chocohead committed Jan 11, 2024
1 parent e55a4af commit 77dabe6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ fabric_version=0.42.0+1.16
tiny_remapper_version=0.8.11
fabric_asm_version=v2.3

mod_version = 1.14.0
mod_version = 1.14.1
maven_group = me.modmuss50
archives_base_name = optifabric
4 changes: 2 additions & 2 deletions src/main/java/me/modmuss50/optifabric/patcher/ClassCache.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private long calculateCRC() {
public static ClassCache read(File input) throws IOException {
try (DataInputStream dis = new DataInputStream(new GZIPInputStream(new FileInputStream(input)))) {
char formatRevision = dis.readChar(); //Check the format of the file
if (formatRevision != 'D') return new ClassCache(null);
if (formatRevision != 'E') return new ClassCache(null);

long expectedCRC = dis.readLong();

Expand Down Expand Up @@ -98,7 +98,7 @@ public void save(File output) throws IOException {
}

try (DataOutputStream dos = new DataOutputStream(new GZIPOutputStream(new FileOutputStream(output)))) {
dos.writeChar('D'); //Format version
dos.writeChar('E'); //Format version
dos.writeLong(calculateCRC()); //Expected CRC to get from fully reading

//Write the hash
Expand Down

0 comments on commit 77dabe6

Please sign in to comment.