-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix comparator behavior for EntityPhanton goal
- Loading branch information
1 parent
f11d647
commit 8a0b371
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
Spigot-Server-Patches/0431-Fix-comparator-behavior-for-EntityPhanton-goal.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
From df1d49de0853ff664ca2be4c8fae3dac6bd7e707 Mon Sep 17 00:00:00 2001 | ||
From: Shane Freeder <[email protected]> | ||
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.0 | ||
|