summaryrefslogtreecommitdiffstats
path: root/nms-patches/EntityPhantom.patch
blob: a6589d3985dd243f8c25f803c9c3d8ee574cbeff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- a/net/minecraft/server/EntityPhantom.java
+++ b/net/minecraft/server/EntityPhantom.java
@@ -186,7 +186,7 @@
             } else {
                 this.b = 60;
                 AxisAlignedBB axisalignedbb = EntityPhantom.this.getBoundingBox().grow(16.0D, 64.0D, 16.0D);
-                List list = EntityPhantom.this.world.a(EntityHuman.class, axisalignedbb);
+                List<EntityHuman> list = EntityPhantom.this.world.a(EntityHuman.class, axisalignedbb); // CraftBukkit - decompile error
 
                 if (!list.isEmpty()) {
                     list.sort((entityhuman, entityhuman1) -> {
@@ -198,7 +198,7 @@
                         EntityHuman entityhuman = (EntityHuman) iterator.next();
 
                         if (PathfinderGoalTarget.a(EntityPhantom.this, entityhuman, false, false)) {
-                            EntityPhantom.this.setGoalTarget(entityhuman);
+                            EntityPhantom.this.setGoalTarget(entityhuman, org.bukkit.event.entity.EntityTargetEvent.TargetReason.CLOSEST_PLAYER, true); // CraftBukkit - reason
                             return true;
                         }
                     }