mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-24 21:38:47 +01:00
Fix comparator behavior for EntityPhanton goal
This commit is contained in:
parent
cec72293a2
commit
8167a40ac5
1 changed files with 20 additions and 0 deletions
|
@ -0,0 +1,20 @@
|
|||
From 0000000000000000000000000000000000000000 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
|
||||
@@ -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();
|
||||
|
||||
--
|
Loading…
Add table
Reference in a new issue