13
0
geforkt von Mirrors/Paper
Paper/nms-patches/EntityPhantom.patch

37 Zeilen
1.7 KiB
Diff

2018-07-15 02:00:00 +02:00
--- a/net/minecraft/server/EntityPhantom.java
+++ b/net/minecraft/server/EntityPhantom.java
2018-12-13 01:00:00 +01:00
@@ -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 @@
2018-07-15 02:00:00 +02:00
} 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) -> {
2018-12-13 01:00:00 +01:00
@@ -198,7 +199,7 @@
2018-07-15 02:00:00 +02:00
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;
}
}