Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 20:40:07 +01:00
e4602b6d48
This patch appears to be no longer relevant, and is seemingly a leading cause of datapack performance being horrific
23 Zeilen
972 B
Diff
23 Zeilen
972 B
Diff
From 2d3b7ee6137519c4b4f5d5360ea8d88b021caf1f 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 82323bf4a..90eeddb1a 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
|
|
|