From e55bd1c67626081feb6a48fe7f00ba5f88a3b1e2 Mon Sep 17 00:00:00 2001 From: Minecon724 Date: Mon, 2 Dec 2024 19:38:08 +0100 Subject: [PATCH] Fix updater after adding new field --- .../tweaks/updater/cache/ResourceVersion.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/m724/tweaks/updater/cache/ResourceVersion.java b/src/main/java/eu/m724/tweaks/updater/cache/ResourceVersion.java index efd1e48..d5d0fd3 100644 --- a/src/main/java/eu/m724/tweaks/updater/cache/ResourceVersion.java +++ b/src/main/java/eu/m724/tweaks/updater/cache/ResourceVersion.java @@ -6,10 +6,24 @@ package eu.m724.tweaks.updater.cache; +import java.util.Objects; + public record ResourceVersion( int resourceId, int page, int updateId, String label, UpdateDescription description -) { } +) { + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof ResourceVersion that)) return false; + return updateId == that.updateId && resourceId == that.resourceId; + } + + @Override + public int hashCode() { + return Objects.hash(resourceId, updateId); + } +}