mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-30 03:43:51 -07:00
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/PathfinderGoalNearestAttackableTarget.java
|
||||
+++ b/net/minecraft/server/PathfinderGoalNearestAttackableTarget.java
|
||||
@@ -44,11 +44,11 @@
|
||||
@@ -44,18 +44,18 @@
|
||||
return false;
|
||||
} else {
|
||||
Collections.sort(list, this.b);
|
||||
@@ -12,22 +12,17 @@
|
||||
- this.d = this.e.world.a(this.e.locX, this.e.locY + (double) this.e.getHeadHeight(), this.e.locZ, this.i(), this.i(), new Function() {
|
||||
+ this.d = (T) this.e.world.a(this.e.locX, this.e.locY + (double) this.e.getHeadHeight(), this.e.locZ, this.i(), this.i(), new Function<EntityHuman, Double>() { // CraftBukkit - fix decompile error
|
||||
@Nullable
|
||||
public Double a(@Nullable EntityHuman entityhuman) {
|
||||
public Double apply(@Nullable EntityHuman entityhuman) {
|
||||
ItemStack itemstack = entityhuman.getEquipment(EnumItemSlot.HEAD);
|
||||
@@ -57,10 +57,10 @@
|
||||
}
|
||||
|
||||
@Nullable
|
||||
- public Object apply(@Nullable Object object) {
|
||||
+ public Double apply(@Nullable EntityHuman object) { // CraftBukkit - fix decompile error
|
||||
return this.a((EntityHuman) object);
|
||||
return (!(PathfinderGoalNearestAttackableTarget.this.e instanceof EntitySkeleton) || itemstack.getItem() != Items.SKELETON_SKULL) && (!(PathfinderGoalNearestAttackableTarget.this.e instanceof EntityZombie) || itemstack.getItem() != Items.ZOMBIE_HEAD) && (!(PathfinderGoalNearestAttackableTarget.this.e instanceof EntityCreeper) || itemstack.getItem() != Items.CREEPER_HEAD) ? 1.0D : 0.5D;
|
||||
}
|
||||
- }, this.c);
|
||||
+ }, (Predicate<EntityHuman>) this.c); // CraftBukkit - fix decompile error
|
||||
return this.d != null;
|
||||
}
|
||||
}
|
||||
@@ -70,7 +70,7 @@
|
||||
@@ -65,7 +65,7 @@
|
||||
}
|
||||
|
||||
public void c() {
|
||||
@@ -36,12 +31,3 @@
|
||||
super.c();
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
return d0 < d1 ? -1 : (d0 > d1 ? 1 : 0);
|
||||
}
|
||||
|
||||
- public int compare(Object object, Object object1) {
|
||||
+ public int compare(Entity object, Entity object1) { // CraftBukkit - fix decompile error
|
||||
return this.a((Entity) object, (Entity) object1);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user