From 193582112d26ce8eb9b46d1c54896f1f2303ad0a Mon Sep 17 00:00:00 2001 From: BONNe Date: Fri, 3 Nov 2023 16:47:15 +0200 Subject: [PATCH] Fixes inscription sorting that were broken on code cleanup. --- .../vaulthunters/jewelsorting/utils/SortingHelper.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/lv/id/bonne/vaulthunters/jewelsorting/utils/SortingHelper.java b/src/main/java/lv/id/bonne/vaulthunters/jewelsorting/utils/SortingHelper.java index 95a7bf0..638160e 100644 --- a/src/main/java/lv/id/bonne/vaulthunters/jewelsorting/utils/SortingHelper.java +++ b/src/main/java/lv/id/bonne/vaulthunters/jewelsorting/utils/SortingHelper.java @@ -675,7 +675,7 @@ private static int compareModel(VaultGearData leftData, VaultGearData rightData) */ private static int compareInstability(CompoundTag leftData, CompoundTag rightData) { - return leftData.hasUUID("instability") && rightData.hasUUID("instability") ? + return leftData.contains("instability") && rightData.contains("instability") ? Integer.compare(leftData.getInt("instability"), rightData.getInt("instability")) : 0; } @@ -689,7 +689,7 @@ private static int compareInstability(CompoundTag leftData, CompoundTag rightDat */ private static int compareCompletion(CompoundTag leftData, CompoundTag rightData) { - return leftData.hasUUID("completion") && rightData.hasUUID("completion") ? + return leftData.contains("completion") && rightData.contains("completion") ? Float.compare(leftData.getFloat("completion"), rightData.getFloat("completion")) : 0; } @@ -703,7 +703,7 @@ private static int compareCompletion(CompoundTag leftData, CompoundTag rightData */ private static int compareTime(CompoundTag leftData, CompoundTag rightData) { - return leftData.hasUUID("time") && rightData.hasUUID("time") ? + return leftData.contains("time") && rightData.contains("time") ? Integer.compare(leftData.getInt("time"), rightData.getInt("time")) : 0; }