2020-04-22 00:06:30 +02:00
|
|
|
From c569fed0197bce36d4de945e5e4a3b6f257dd520 Mon Sep 17 00:00:00 2001
|
2020-01-22 22:01:28 +01:00
|
|
|
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
|
2020-04-22 00:06:30 +02:00
|
|
|
index 82323bf4..90eeddb1 100644
|
2020-01-22 22:01:28 +01:00
|
|
|
--- 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();
|
|
|
|
|
|
|
|
--
|
2020-04-22 00:06:30 +02:00
|
|
|
2.25.1.windows.1
|
2020-01-22 22:01:28 +01:00
|
|
|
|