From 8167a40ac5d0f35b659e069311c2dfa387aaadc1 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Wed, 22 Jan 2020 21:01:28 +0000 Subject: [PATCH] Fix comparator behavior for EntityPhanton goal --- ...ator-behavior-for-EntityPhanton-goal.patch | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Spigot-Server-Patches/Fix-comparator-behavior-for-EntityPhanton-goal.patch diff --git a/Spigot-Server-Patches/Fix-comparator-behavior-for-EntityPhanton-goal.patch b/Spigot-Server-Patches/Fix-comparator-behavior-for-EntityPhanton-goal.patch new file mode 100644 index 000000000..e0347ef02 --- /dev/null +++ b/Spigot-Server-Patches/Fix-comparator-behavior-for-EntityPhanton-goal.patch @@ -0,0 +1,20 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Shane Freeder +Date: Wed, 22 Jan 2020 21:00:21 +0000 +Subject: [PATCH] Fix comparator behavior for EntityPhanton goal + + +diff --git a/src/main/java/net/minecraft/server/EntityPhantom.java b/src/main/java/net/minecraft/server/EntityPhantom.java +index 82323bf4ac..90eeddb1af 100644 +--- a/src/main/java/net/minecraft/server/EntityPhantom.java ++++ b/src/main/java/net/minecraft/server/EntityPhantom.java +@@ -0,0 +0,0 @@ public class EntityPhantom extends EntityFlying implements IMonster { + + if (!list.isEmpty()) { + list.sort((entityhuman, entityhuman1) -> { +- return entityhuman.locY() > entityhuman1.locY() ? -1 : 1; ++ return Double.compare(entityhuman1.locY(), entityhuman.locY()); // Paper + }); + Iterator iterator = list.iterator(); + +-- \ No newline at end of file