use of net.minecraft.entity.ai.goal.LookAtEntityGoal 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.LookAtEntityGoal 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.LookAtEntityGoal in project friends-and-foes by Faboslav.
the class GlareEntity method initGoals.
protected void initGoals() {
this.goalSelector.add(1, new GlareSitGoal(this));
this.goalSelector.add(2, new GlareFollowOwnerGoal(this, 8.0F, 2.0F, false));
this.goalSelector.add(3, new GlareAvoidMonsterGoal(this, HostileEntity.class, 16.0F));
this.eatGlowBerriesGoal = new GlareEatGlowBerriesGoal(this);
this.goalSelector.add(4, this.eatGlowBerriesGoal);
this.goalSelector.add(4, new GlareShakeOffGlowBerriesGoal(this));
this.flyToDarkSpotGoal = new GlareFlyToDarkSpotGoal(this);
this.goalSelector.add(5, this.flyToDarkSpotGoal);
this.goalSelector.add(6, new GlareWanderAroundGoal(this));
this.goalSelector.add(7, new LookAtEntityGoal(this, PlayerEntity.class, 8.0F));
this.goalSelector.add(8, new SwimGoal(this));
}
use of net.minecraft.entity.ai.goal.LookAtEntityGoal in project LittleMaidModelLoader-Fabric by SistrScarlet.
the class MultiModelEntity method initGoals.
@Override
protected void initGoals() {
this.goalSelector.add(0, new SwimGoal(this));
this.goalSelector.add(7, new LookAtEntityGoal(this, PlayerEntity.class, 6.0F));
this.goalSelector.add(8, new LookAroundGoal(this));
}
use of net.minecraft.entity.ai.goal.LookAtEntityGoal in project wildmod by Osmiooo.
the class AllayEntity method initGoals.
protected void initGoals() {
this.goalSelector.add(1, new LookAtEntityGoal(this, PlayerEntity.class, 8.0F));
this.goalSelector.add(3, new FlyRandomlyGoal(this));
this.setCanPickUpLoot(true);
List<ItemEntity> list = AllayEntity.this.world.getEntitiesByClass(ItemEntity.class, AllayEntity.this.getBoundingBox().expand(8.0D, 8.0D, 8.0D), AllayEntity.CAN_TAKE);
}
Aggregations