use of net.minecraft.entity.ai.goal.FollowParentGoal 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.FollowParentGoal in project endergetic by team-abnormals.
the class PuffBugEntity method registerGoals.
@Override
protected void registerGoals() {
this.goalSelector.addGoal(0, new PuffBugPullOutGoal(this));
this.goalSelector.addGoal(0, new PuffBugRestOnHiveGoal(this));
this.goalSelector.addGoal(1, new PuffBugAttachToHiveGoal(this));
this.goalSelector.addGoal(1, new PuffBugRotateToFireGoal(this));
this.goalSelector.addGoal(2, new PuffBugCreateItemGoal(this));
this.goalSelector.addGoal(2, new PuffBugAttackGoal(this));
this.goalSelector.addGoal(3, new PuffBugTeleportToRestGoal(this));
this.goalSelector.addGoal(4, new PuffBugPollinateGoal(this));
this.goalSelector.addGoal(5, new PuffBugDescentGoal(this));
this.goalSelector.addGoal(6, new PuffBugTeleportToBudGoal(this));
this.goalSelector.addGoal(7, new BreedGoal(this, 1.0F));
this.goalSelector.addGoal(8, new FollowParentGoal(this, 1.5F));
this.goalSelector.addGoal(9, new PuffBugBoostGoal(this));
this.targetSelector.addGoal(2, new PuffBugTargetAggressorGoal(this));
}
Aggregations