Search in sources :

Example 16 with LookAroundGoal

use of net.minecraft.entity.ai.goal.LookAroundGoal in project MCDoom by AzureDoom.

the class ChaingunnerEntity method initGoals.

@Override
protected void initGoals() {
    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 RangedAttack(this).setProjectileOriginOffset(0.8, 0.4, 0.8).setDamage(rangedconfig.chaingun_bullet_damage).setSound(ModSoundEvents.CHAINGUN_SHOOT, 1.0F, 1.0F), 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));
}
Also used : AbstractRangedAttack(mod.azure.doom.entity.attack.AbstractRangedAttack) RevengeGoal(net.minecraft.entity.ai.goal.RevengeGoal) WanderAroundFarGoal(net.minecraft.entity.ai.goal.WanderAroundFarGoal) MerchantEntity(net.minecraft.entity.passive.MerchantEntity) LookAroundGoal(net.minecraft.entity.ai.goal.LookAroundGoal) LookAtEntityGoal(net.minecraft.entity.ai.goal.LookAtEntityGoal) RangedAttackGoal(mod.azure.doom.entity.ai.goal.RangedAttackGoal) PlayerEntity(net.minecraft.entity.player.PlayerEntity)

Example 17 with LookAroundGoal

use of net.minecraft.entity.ai.goal.LookAroundGoal in project friends-and-foes by Faboslav.

the class CopperGolemEntity method initGoals.

@Override
protected void initGoals() {
    this.goalSelector.add(1, new CopperGolemFleeEntityGoal(this, PlayerEntity.class, 16.0F, this.getMovementSpeed(), this.getMovementSpeed(), (entity) -> {
        return NOTICEABLE_PLAYER_FILTER.test((PlayerEntity) entity) && this.isWaxed();
    }));
    this.pressButtonGoal = new CopperGolemPressButtonGoal(this);
    this.goalSelector.add(2, this.pressButtonGoal);
    this.goalSelector.add(3, new CopperGolemTemptGoal(this, Ingredient.ofItems(Items.HONEYCOMB)));
    this.goalSelector.add(4, new CopperGolemSpinHeadGoal(this));
    this.goalSelector.add(6, new CopperGolemWanderAroundGoal(this));
    this.goalSelector.add(7, new CopperGolemLookAtEntityGoal(this, CopperGolemEntity.class, 6.0F));
    this.goalSelector.add(7, new CopperGolemLookAtEntityGoal(this, IronGolemEntity.class, 6.0F));
    this.goalSelector.add(8, new CopperGolemLookAtEntityGoal(this, PlayerEntity.class, 6.0F));
    this.goalSelector.add(10, new LookAroundGoal(this));
}
Also used : GolemEntity(net.minecraft.entity.passive.GolemEntity) Item(net.minecraft.item.Item) ServerWorld(net.minecraft.server.world.ServerWorld) StatusEffects(net.minecraft.entity.effect.StatusEffects) RandomGenerator(com.faboslav.friendsandfoes.util.RandomGenerator) TrackedDataHandlerRegistry(net.minecraft.entity.data.TrackedDataHandlerRegistry) IronGolemEntity(net.minecraft.entity.passive.IronGolemEntity) DamageSource(net.minecraft.entity.damage.DamageSource) EntityAttributes(net.minecraft.entity.attribute.EntityAttributes) DefaultAttributeContainer(net.minecraft.entity.attribute.DefaultAttributeContainer) MobEntity(net.minecraft.entity.mob.MobEntity) ItemStack(net.minecraft.item.ItemStack) LookAroundGoal(net.minecraft.entity.ai.goal.LookAroundGoal) DefaultParticleType(net.minecraft.particle.DefaultParticleType) SoundEvents(net.minecraft.sound.SoundEvents) Vec3d(net.minecraft.util.math.Vec3d) ParticleTypes(net.minecraft.particle.ParticleTypes) net.minecraft.entity(net.minecraft.entity) EntityPredicates(net.minecraft.predicate.entity.EntityPredicates) Hand(net.minecraft.util.Hand) BlockState(net.minecraft.block.BlockState) SoundCategory(net.minecraft.sound.SoundCategory) AxeItem(net.minecraft.item.AxeItem) GameEvent(net.minecraft.world.event.GameEvent) PlayerEntity(net.minecraft.entity.player.PlayerEntity) World(net.minecraft.world.World) Predicate(java.util.function.Predicate) BlockPos(net.minecraft.util.math.BlockPos) Items(net.minecraft.item.Items) Oxidizable(net.minecraft.block.Oxidizable) EntityNavigationAccessor(com.faboslav.friendsandfoes.mixin.EntityNavigationAccessor) DataTracker(net.minecraft.entity.data.DataTracker) TrackedData(net.minecraft.entity.data.TrackedData) ActionResult(net.minecraft.util.ActionResult) com.faboslav.friendsandfoes.entity.passive.ai.goal(com.faboslav.friendsandfoes.entity.passive.ai.goal) NbtCompound(net.minecraft.nbt.NbtCompound) Ingredient(net.minecraft.recipe.Ingredient) ModelAnimationHelper(com.faboslav.friendsandfoes.util.ModelAnimationHelper) SoundEvent(net.minecraft.sound.SoundEvent) PrioritizedGoal(net.minecraft.entity.ai.goal.PrioritizedGoal) ModSounds(com.faboslav.friendsandfoes.init.ModSounds) IronGolemEntity(net.minecraft.entity.passive.IronGolemEntity) LookAroundGoal(net.minecraft.entity.ai.goal.LookAroundGoal) PlayerEntity(net.minecraft.entity.player.PlayerEntity)

Example 18 with LookAroundGoal

use of net.minecraft.entity.ai.goal.LookAroundGoal 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));
}
Also used : LookAroundGoal(net.minecraft.entity.ai.goal.LookAroundGoal) LookAtEntityGoal(net.minecraft.entity.ai.goal.LookAtEntityGoal) SwimGoal(net.minecraft.entity.ai.goal.SwimGoal) PlayerEntity(net.minecraft.entity.player.PlayerEntity)

Example 19 with LookAroundGoal

use of net.minecraft.entity.ai.goal.LookAroundGoal in project SinoCate by EverlastSino.

the class EscapeLandGoal method initGoals.

protected void initGoals() {
    this.goalSelector.add(0, new EscapeLandGoal(this, 0.1D));
    this.goalSelector.add(0, new EscapeDangerGoal(this, 0.1D));
    this.goalSelector.add(1, new LookAroundGoal(this));
    this.goalSelector.add(1, new WanderAroundGoal(this, 0.1D));
}
Also used : EscapeDangerGoal(net.minecraft.entity.ai.goal.EscapeDangerGoal) LookAroundGoal(net.minecraft.entity.ai.goal.LookAroundGoal) WanderAroundGoal(net.minecraft.entity.ai.goal.WanderAroundGoal)

Example 20 with LookAroundGoal

use of net.minecraft.entity.ai.goal.LookAroundGoal 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));
}
Also used : RevengeGoal(net.minecraft.entity.ai.goal.RevengeGoal) WanderAroundFarGoal(net.minecraft.entity.ai.goal.WanderAroundFarGoal) MerchantEntity(net.minecraft.entity.passive.MerchantEntity) LookAroundGoal(net.minecraft.entity.ai.goal.LookAroundGoal) LookAtEntityGoal(net.minecraft.entity.ai.goal.LookAtEntityGoal) RangedAttackGoal(mod.azure.doom.entity.ai.goal.RangedAttackGoal) PlayerEntity(net.minecraft.entity.player.PlayerEntity)

Aggregations

LookAroundGoal (net.minecraft.entity.ai.goal.LookAroundGoal)39 PlayerEntity (net.minecraft.entity.player.PlayerEntity)38 LookAtEntityGoal (net.minecraft.entity.ai.goal.LookAtEntityGoal)37 MerchantEntity (net.minecraft.entity.passive.MerchantEntity)36 RevengeGoal (net.minecraft.entity.ai.goal.RevengeGoal)34 WanderAroundFarGoal (net.minecraft.entity.ai.goal.WanderAroundFarGoal)32 RangedAttackGoal (mod.azure.doom.entity.ai.goal.RangedAttackGoal)12 DemonAttackGoal (mod.azure.doom.entity.ai.goal.DemonAttackGoal)9 RangedStrafeAttackGoal (mod.azure.doom.entity.ai.goal.RangedStrafeAttackGoal)8 FireballAttack (mod.azure.doom.entity.attack.FireballAttack)6 RandomFlyConvergeOnTargetGoal (mod.azure.doom.entity.ai.goal.RandomFlyConvergeOnTargetGoal)5 AbstractRangedAttack (mod.azure.doom.entity.attack.AbstractRangedAttack)4 ActiveTargetGoal (net.minecraft.entity.ai.goal.ActiveTargetGoal)4 ServerPlayerEntity (net.minecraft.server.network.ServerPlayerEntity)4 IronGolemEntity (net.minecraft.entity.passive.IronGolemEntity)3 SwimGoal (net.minecraft.entity.ai.goal.SwimGoal)2 com.faboslav.friendsandfoes.entity.passive.ai.goal (com.faboslav.friendsandfoes.entity.passive.ai.goal)1 ModSounds (com.faboslav.friendsandfoes.init.ModSounds)1 EntityNavigationAccessor (com.faboslav.friendsandfoes.mixin.EntityNavigationAccessor)1 ModelAnimationHelper (com.faboslav.friendsandfoes.util.ModelAnimationHelper)1