2015-05-25 18:37:24 +08:00
|
|
|
--- a/net/minecraft/server/EntityIronGolem.java
|
|
|
|
+++ b/net/minecraft/server/EntityIronGolem.java
|
2018-07-15 08:00:00 +08:00
|
|
|
@@ -28,8 +28,12 @@
|
|
|
|
this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this));
|
|
|
|
this.targetSelector.a(1, new PathfinderGoalDefendVillage(this));
|
|
|
|
this.targetSelector.a(2, new PathfinderGoalHurtByTarget(this, false, new Class[0]));
|
|
|
|
- this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget(this, EntityInsentient.class, 10, false, true, (entityinsentient) -> {
|
|
|
|
- return entityinsentient != null && IMonster.e.test(entityinsentient) && !(entityinsentient instanceof EntityCreeper);
|
|
|
|
+ // CraftBukkit start - decompile error
|
|
|
|
+ this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget(this, EntityInsentient.class, 10, false, true, new Predicate<EntityInsentient>() {
|
|
|
|
+ public boolean test(@Nullable EntityInsentient entityinsentient) {
|
|
|
|
+ return entityinsentient != null && IMonster.e.test(entityinsentient) && !(entityinsentient instanceof EntityCreeper);
|
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
|
|
|
}));
|
|
|
|
}
|
|
|
|
|
|
|
|
@@ -67,7 +71,7 @@
|
2014-11-26 05:32:16 +08:00
|
|
|
|
2016-03-01 05:32:46 +08:00
|
|
|
protected void C(Entity entity) {
|
|
|
|
if (entity instanceof IMonster && !(entity instanceof EntityCreeper) && this.getRandom().nextInt(20) == 0) {
|
2014-11-26 05:32:16 +08:00
|
|
|
- this.setGoalTarget((EntityLiving) entity);
|
|
|
|
+ this.setGoalTarget((EntityLiving) entity, org.bukkit.event.entity.EntityTargetLivingEntityEvent.TargetReason.COLLISION, true); // CraftBukkit - set reason
|
|
|
|
}
|
|
|
|
|
2016-03-01 05:32:46 +08:00
|
|
|
super.C(entity);
|