Paper/Spigot-Server-Patches/0428-Fix-comparator-behavior-for-EntityPhanton-goal.patch
Aikar 586ee2bb11
Remove patch for MC-111480, fixed in 1.14
We were now starting entities at ID 2
2020-04-11 20:39:21 -04:00

23 lines
974 B
Diff

From 53b723ce4574f5bd4cee02a2cceb3a5d83bcc8e8 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
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
@@ -224,7 +224,7 @@ 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();
--
2.25.1