From 10dc013c9cc5e791944b3fcff977c1513c77b5c2 Mon Sep 17 00:00:00 2001 From: Emanuel Ferraz Date: Tue, 7 Nov 2023 14:31:00 +0000 Subject: [PATCH] fix?: Change Entity List Wrapper's comparison to be based on entity id. Addresses #789 Might be reverted if causes issues. --- .../java/vazkii/psi/api/spell/wrapper/EntityListWrapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/vazkii/psi/api/spell/wrapper/EntityListWrapper.java b/src/main/java/vazkii/psi/api/spell/wrapper/EntityListWrapper.java index 66da59b7..134e93b0 100644 --- a/src/main/java/vazkii/psi/api/spell/wrapper/EntityListWrapper.java +++ b/src/main/java/vazkii/psi/api/spell/wrapper/EntityListWrapper.java @@ -107,7 +107,7 @@ public static EntityListWrapper withRemoved(@Nonnull EntityListWrapper base, @No * A Comparator for Entities that's deterministic, to keep order with the Entity Lists. */ public static int compareEntities(Entity l, Entity r) { - return l.getUUID().compareTo(r.getUUID()); + return Integer.compare(l.getId(), r.getId()); } /**