Paper/nms-patches/EntityPhantom.patch
2018-12-13 11:00:00 +11:00

37 lines
1.7 KiB
Diff

--- a/net/minecraft/server/EntityPhantom.java
+++ b/net/minecraft/server/EntityPhantom.java
@@ -28,10 +28,11 @@
}
protected void n() {
- this.goalSelector.a(1, new EntityPhantom.c(null));
- this.goalSelector.a(2, new EntityPhantom.i(null));
- this.goalSelector.a(3, new EntityPhantom.e(null));
- this.targetSelector.a(1, new EntityPhantom.b(null));
+ // CraftBukkit - decompile errors
+ this.goalSelector.a(1, new EntityPhantom.c());
+ this.goalSelector.a(2, new EntityPhantom.i());
+ this.goalSelector.a(3, new EntityPhantom.e());
+ this.targetSelector.a(1, new EntityPhantom.b());
}
protected void initAttributes() {
@@ -186,7 +187,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 +199,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;
}
}