use of net.minecraft.world.entity.ai.goal.PathfinderGoalFloat in project BedWars1058 by andrei1058.
the class IGolem method initPathfinder.
@SuppressWarnings("rawtypes")
@Override
protected void initPathfinder() {
this.bP.a(1, new PathfinderGoalFloat(this));
this.bP.a(2, new PathfinderGoalMeleeAttack(this, 1.5D, false));
this.bQ.a(1, new PathfinderGoalHurtByTarget(this));
this.bP.a(3, new PathfinderGoalRandomStroll(this, 1D));
this.bP.a(4, new PathfinderGoalRandomLookaround(this));
this.bQ.a(2, new PathfinderGoalNearestAttackableTarget(this, EntityHuman.class, 20, true, false, player -> ((EntityHuman) player).isAlive() && !team.wasMember(((EntityHuman) player).getUniqueID()) && !team.getArena().isReSpawning(((EntityHuman) player).getUniqueID()) && !team.getArena().isSpectator(((EntityHuman) player).getUniqueID())));
this.bQ.a(3, new PathfinderGoalNearestAttackableTarget(this, IGolem.class, 20, true, false, golem -> ((IGolem) golem).getTeam() != team));
this.bQ.a(4, new PathfinderGoalNearestAttackableTarget(this, Silverfish.class, 20, true, false, sf -> ((Silverfish) sf).getTeam() != team));
}
use of net.minecraft.world.entity.ai.goal.PathfinderGoalFloat in project BedWars1058 by andrei1058.
the class Silverfish method initPathfinder.
@Override
protected void initPathfinder() {
this.bP.a(1, new PathfinderGoalFloat(this));
this.bP.a(2, new PathfinderGoalMeleeAttack(this, 1.9D, false));
this.bQ.a(1, new PathfinderGoalHurtByTarget(this));
this.bP.a(3, new PathfinderGoalRandomStroll(this, 2D));
this.bQ.a(2, new PathfinderGoalNearestAttackableTarget(this, EntityHuman.class, 20, true, false, player -> {
return ((EntityHuman) player).isAlive() && !team.wasMember(((EntityHuman) player).getUniqueID()) && !team.getArena().isReSpawning(((EntityHuman) player).getUniqueID()) && !team.getArena().isSpectator(((EntityHuman) player).getUniqueID());
}));
this.bQ.a(3, new PathfinderGoalNearestAttackableTarget(this, IGolem.class, 20, true, false, golem -> {
return ((IGolem) golem).getTeam() != team;
}));
this.bQ.a(4, new PathfinderGoalNearestAttackableTarget(this, Silverfish.class, 20, true, false, sf -> {
return ((Silverfish) sf).getTeam() != team;
}));
}
use of net.minecraft.world.entity.ai.goal.PathfinderGoalFloat in project BedWars1058 by andrei1058.
the class IGolem method u.
@SuppressWarnings("rawtypes")
@Override
protected void u() {
this.bR.a(1, new PathfinderGoalFloat(this));
this.bR.a(2, new PathfinderGoalMeleeAttack(this, 1.5D, false));
this.bS.a(3, new PathfinderGoalHurtByTarget(this));
this.bR.a(4, new PathfinderGoalRandomStroll(this, 1D));
this.bR.a(5, new PathfinderGoalRandomLookaround(this));
this.bS.a(6, new PathfinderGoalNearestAttackableTarget(this, EntityHuman.class, 20, true, false, player -> !((EntityHuman) player).getBukkitEntity().isDead() && !team.wasMember(((EntityHuman) player).getBukkitEntity().getUniqueId()) && !team.getArena().isReSpawning(((EntityHuman) player).getBukkitEntity().getUniqueId()) && !team.getArena().isSpectator(((EntityHuman) player).getBukkitEntity().getUniqueId())));
this.bS.a(7, new PathfinderGoalNearestAttackableTarget(this, IGolem.class, 20, true, false, golem -> ((IGolem) golem).getTeam() != team));
this.bS.a(8, new PathfinderGoalNearestAttackableTarget(this, Silverfish.class, 20, true, false, sf -> ((Silverfish) sf).getTeam() != team));
}
use of net.minecraft.world.entity.ai.goal.PathfinderGoalFloat in project BedWars1058 by andrei1058.
the class Silverfish method u.
@Override
protected void u() {
this.bR.a(1, new PathfinderGoalFloat(this));
this.bR.a(2, new PathfinderGoalMeleeAttack(this, 1.9D, false));
this.bS.a(1, new PathfinderGoalHurtByTarget(this));
this.bR.a(3, new PathfinderGoalRandomStroll(this, 2D));
this.bS.a(2, new PathfinderGoalNearestAttackableTarget(this, EntityHuman.class, 20, true, false, player -> {
return (!((EntityHuman) player).getBukkitEntity().isDead()) && (!team.wasMember(((EntityHuman) player).getBukkitEntity().getUniqueId())) && (!team.getArena().isReSpawning(((EntityHuman) player).getBukkitEntity().getUniqueId())) && (!team.getArena().isSpectator(((EntityHuman) player).getBukkitEntity().getUniqueId()));
}));
this.bS.a(3, new PathfinderGoalNearestAttackableTarget(this, IGolem.class, 20, true, false, golem -> {
return ((IGolem) golem).getTeam() != team;
}));
this.bS.a(4, new PathfinderGoalNearestAttackableTarget(this, Silverfish.class, 20, true, false, sf -> {
return ((Silverfish) sf).getTeam() != team;
}));
}
Aggregations