use of net.minecraft.entity.ai.goal.RevengeGoal in project beebuddy by queenofthebees.
the class BeeEntityMixin method beebuddy$initTamedGoals.
@Unique
private void beebuddy$initTamedGoals() {
BeeEntity us = (BeeEntity) (Object) this;
this.goalSelector.add(0, new BeeSitGoal(us));
this.goalSelector.add(1, StingGoalInvoker.beebuddy$make(us, us, 1.399999976158142D, true));
this.goalSelector.add(2, new FollowParentGoal(us, 1.25D));
this.goalSelector.add(3, new FollowFriendGoal(us));
this.goalSelector.add(4, new AnimalMateGoal(us, 1.0D));
if (pollinateGoal == null) {
// we can be called before initGoals's body
pollinateGoal = PollinateGoalInvoker.beebuddy$make(us);
}
this.goalSelector.add(5, pollinateGoal);
if (moveToFlowerGoal == null) {
moveToFlowerGoal = MoveToFlowerGoalInvoker.beebuddy$make(us);
}
this.goalSelector.add(6, moveToFlowerGoal);
this.goalSelector.add(7, new SitOnHeadGoal(us));
this.goalSelector.add(7, BeeWanderAroundGoalInvoker.beebuddy$make(us));
this.goalSelector.add(8, new LookAtEntityGoal(us, PlayerEntity.class, 4.0F));
this.goalSelector.add(8, new SwimGoal(us));
BeeEntityMixin mix = this;
this.targetSelector.add(1, (new RevengeGoal(this) {
@Override
public boolean canStart() {
if (!super.canStart()) {
return false;
}
if (us.getAttacker() != null) {
UUID u = us.getAttacker().getUuid();
return !u.equals(mix.beebuddy$getFriend());
} else {
return true;
}
}
@Override
public boolean shouldContinue() {
return us.hasAngerTime() && super.shouldContinue();
}
}).setGroupRevenge(new Class[0]));
}
use of net.minecraft.entity.ai.goal.RevengeGoal in project Biome-Makeover by Lemonszz.
the class StoneGolemEntity method initGoals.
@Override
protected void initGoals() {
super.initGoals();
this.goalSelector.add(1, new BetterCrossbowAttackGoal<>(this, 1.0D, 24.0F));
this.goalSelector.add(2, new LookAtEntityGoal(this, PlayerEntity.class, 5.0F, 1.0F));
this.goalSelector.add(3, new LookAtEntityGoal(this, MobEntity.class, 5.0F));
this.goalSelector.add(4, new LookAtEntityGoal(this, StoneGolemEntity.class, 10.0F));
this.goalSelector.add(5, new LookAtEntityGoal(this, GolemEntity.class, 5.0F));
this.targetSelector.add(1, new RevengeGoal(this));
this.targetSelector.add(2, new FollowTargetGoal<>(this, MerchantEntity.class, false));
this.targetSelector.add(3, new FollowTargetGoal<>(this, StoneGolemEntity.class, false));
this.targetSelector.add(4, new FollowTargetGoal<>(this, IronGolemEntity.class, false));
this.targetSelector.add(5, new FollowTargetGoal<>(this, PlayerEntity.class, 10, true, false, this::shouldAngerAt));
this.targetSelector.add(6, new FollowTargetGoal<>(this, MobEntity.class, 5, false, false, (livingEntity) -> {
return livingEntity instanceof Monster && !(livingEntity instanceof CreeperEntity);
}));
this.targetSelector.add(4, new UniversalAngerGoal<>(this, false));
}
use of net.minecraft.entity.ai.goal.RevengeGoal in project Paradise-Lost by devs-immortal.
the class AechorPlantEntity method initGoals.
@Override
protected void initGoals() {
super.initGoals();
this.goalSelector.add(4, new ProjectileAttackGoal(this, 0.0D, 30, 1.0F));
this.targetSelector.add(1, new RevengeGoal(this));
this.targetSelector.add(2, new FollowTargetGoal<>(this, LivingEntity.class, true));
}
use of net.minecraft.entity.ai.goal.RevengeGoal in project Neutrino by FrostWizard4.
the class RatEntity method initGoals.
@Override
protected void initGoals() {
this.goalSelector.add(4, new RatEntity.AttackGoal(this));
this.targetSelector.add(1, new RevengeGoal(this));
this.goalSelector.add(1, new SwimGoal(this));
this.targetSelector.add(2, new RatEntity.TargetGoal<>(this, PlayerEntity.class));
super.initGoals();
}
use of net.minecraft.entity.ai.goal.RevengeGoal in project MCDoom by AzureDoom.
the class FireBaronEntity method initGoals.
@Override
protected void initGoals() {
this.goalSelector.add(5, new WanderAroundFarGoal(this, 1.0D));
this.goalSelector.add(6, new LookAtEntityGoal(this, PlayerEntity.class, 8.0F));
this.goalSelector.add(6, new LookAroundGoal(this));
this.goalSelector.add(5, new WanderAroundFarGoal(this, 0.8D));
this.goalSelector.add(4, new RangedAttackGoal(this, new FireBaronEntity.FireballAttack(this).setProjectileOriginOffset(0.8, 0.4, 0.8).setDamage(config.baron_ranged_damage), 1.1D));
this.targetSelector.add(1, new RevengeGoal(this, new Class[0]).setGroupRevenge());
this.targetSelector.add(2, new ActiveTargetGoal<>(this, PlayerEntity.class, true));
this.targetSelector.add(2, new ActiveTargetGoal<>(this, MerchantEntity.class, true));
}
Aggregations