use of nomble.beebuddy.entity.ai.goal.SitOnHeadGoal 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]));
}
Aggregations