Search in sources :

Example 6 with RandomLookAroundGoal

use of net.minecraft.world.entity.ai.goal.RandomLookAroundGoal in project Tropicraft by Tropicraft.

the class IguanaEntity method registerGoals.

@Override
protected void registerGoals() {
    goalSelector.addGoal(0, new FloatGoal(this));
    goalSelector.addGoal(2, new MeleeAttackGoal(this, 1.0D, false));
    goalSelector.addGoal(5, new MoveTowardsRestrictionGoal(this, 1.0D));
    goalSelector.addGoal(7, new WaterAvoidingRandomStrollGoal(this, 1.0D));
    goalSelector.addGoal(8, new LookAtPlayerGoal(this, Player.class, 8.0F));
    goalSelector.addGoal(8, new RandomLookAroundGoal(this));
    targetSelector.addGoal(1, new HurtByAggressorGoal(this));
    targetSelector.addGoal(2, new TargetAggressorGoal(this));
}
Also used : RandomLookAroundGoal(net.minecraft.world.entity.ai.goal.RandomLookAroundGoal) Player(net.minecraft.world.entity.player.Player) WaterAvoidingRandomStrollGoal(net.minecraft.world.entity.ai.goal.WaterAvoidingRandomStrollGoal) MoveTowardsRestrictionGoal(net.minecraft.world.entity.ai.goal.MoveTowardsRestrictionGoal) LookAtPlayerGoal(net.minecraft.world.entity.ai.goal.LookAtPlayerGoal) MeleeAttackGoal(net.minecraft.world.entity.ai.goal.MeleeAttackGoal) FloatGoal(net.minecraft.world.entity.ai.goal.FloatGoal)

Example 7 with RandomLookAroundGoal

use of net.minecraft.world.entity.ai.goal.RandomLookAroundGoal in project Tropicraft by Tropicraft.

the class BasiliskLizardEntity method registerGoals.

@Override
protected void registerGoals() {
    this.goalSelector.addGoal(0, new PanicGoal(this, 1.25));
    this.goalSelector.addGoal(1, new RandomStrollGoal(this, 1.0));
    this.goalSelector.addGoal(2, new LookAtPlayerGoal(this, Player.class, 8.0F));
    this.goalSelector.addGoal(3, new RandomLookAroundGoal(this));
}
Also used : RandomLookAroundGoal(net.minecraft.world.entity.ai.goal.RandomLookAroundGoal) Player(net.minecraft.world.entity.player.Player) LookAtPlayerGoal(net.minecraft.world.entity.ai.goal.LookAtPlayerGoal) RandomStrollGoal(net.minecraft.world.entity.ai.goal.RandomStrollGoal) PanicGoal(net.minecraft.world.entity.ai.goal.PanicGoal)

Example 8 with RandomLookAroundGoal

use of net.minecraft.world.entity.ai.goal.RandomLookAroundGoal in project Tropicraft by Tropicraft.

the class SpiderMonkeyEntity method registerGoals.

@Override
protected void registerGoals() {
    this.goalSelector.addGoal(0, new FloatGoal(this));
    this.goalSelector.addGoal(1, new PanicGoal(this, 2.0));
    this.goalSelector.addGoal(2, new BreedGoal(this, 1.0));
    this.goalSelector.addGoal(3, new TemptGoal(this, 1.25, BREEDING_ITEMS.get(), false));
    this.goalSelector.addGoal(4, new FollowParentGoal(this, 1.25));
    this.goalSelector.addGoal(5, new WaterAvoidingRandomStrollGoal(this, 1.0));
    this.goalSelector.addGoal(6, new LookAtPlayerGoal(this, Player.class, 6.0F));
    this.goalSelector.addGoal(7, new RandomLookAroundGoal(this));
}
Also used : RandomLookAroundGoal(net.minecraft.world.entity.ai.goal.RandomLookAroundGoal) Player(net.minecraft.world.entity.player.Player) WaterAvoidingRandomStrollGoal(net.minecraft.world.entity.ai.goal.WaterAvoidingRandomStrollGoal) LookAtPlayerGoal(net.minecraft.world.entity.ai.goal.LookAtPlayerGoal) TemptGoal(net.minecraft.world.entity.ai.goal.TemptGoal) FollowParentGoal(net.minecraft.world.entity.ai.goal.FollowParentGoal) BreedGoal(net.minecraft.world.entity.ai.goal.BreedGoal) FloatGoal(net.minecraft.world.entity.ai.goal.FloatGoal) PanicGoal(net.minecraft.world.entity.ai.goal.PanicGoal)

Example 9 with RandomLookAroundGoal

use of net.minecraft.world.entity.ai.goal.RandomLookAroundGoal in project Tropicraft by Tropicraft.

the class TropiSkellyEntity method registerGoals.

@Override
protected void registerGoals() {
    goalSelector.addGoal(0, new FloatGoal(this));
    goalSelector.addGoal(2, new MeleeAttackGoal(this, 1.0D, false));
    goalSelector.addGoal(5, new MoveTowardsRestrictionGoal(this, 1.0D));
    goalSelector.addGoal(7, new WaterAvoidingRandomStrollGoal(this, 1.0D));
    goalSelector.addGoal(8, new LookAtPlayerGoal(this, Player.class, 8.0F));
    goalSelector.addGoal(8, new RandomLookAroundGoal(this));
    targetSelector.addGoal(1, new HurtByTargetGoal(this));
    targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, true));
    // TODO targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, EntityAshen.class, false));
    targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, EntityKoaBase.class, false));
}
Also used : RandomLookAroundGoal(net.minecraft.world.entity.ai.goal.RandomLookAroundGoal) EntityKoaBase(net.tropicraft.core.common.entity.passive.EntityKoaBase) Player(net.minecraft.world.entity.player.Player) WaterAvoidingRandomStrollGoal(net.minecraft.world.entity.ai.goal.WaterAvoidingRandomStrollGoal) MoveTowardsRestrictionGoal(net.minecraft.world.entity.ai.goal.MoveTowardsRestrictionGoal) LookAtPlayerGoal(net.minecraft.world.entity.ai.goal.LookAtPlayerGoal) MeleeAttackGoal(net.minecraft.world.entity.ai.goal.MeleeAttackGoal) HurtByTargetGoal(net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal) FloatGoal(net.minecraft.world.entity.ai.goal.FloatGoal)

Example 10 with RandomLookAroundGoal

use of net.minecraft.world.entity.ai.goal.RandomLookAroundGoal in project Tropicraft by Tropicraft.

the class FiddlerCrabEntity method registerGoals.

@Override
protected void registerGoals() {
    this.goalSelector.addGoal(0, new PanicGoal(this, 1.25));
    this.goalSelector.addGoal(1, new AvoidEntityGoal<>(this, Player.class, 6.0F, 1.0, 1.2));
    this.goalSelector.addGoal(2, new RandomStrollGoal(this, 1.0));
    this.goalSelector.addGoal(3, new LookAtPlayerGoal(this, Player.class, 8.0F));
    this.goalSelector.addGoal(4, new RandomLookAroundGoal(this));
}
Also used : RandomLookAroundGoal(net.minecraft.world.entity.ai.goal.RandomLookAroundGoal) Player(net.minecraft.world.entity.player.Player) LookAtPlayerGoal(net.minecraft.world.entity.ai.goal.LookAtPlayerGoal) RandomStrollGoal(net.minecraft.world.entity.ai.goal.RandomStrollGoal) PanicGoal(net.minecraft.world.entity.ai.goal.PanicGoal)

Aggregations

LookAtPlayerGoal (net.minecraft.world.entity.ai.goal.LookAtPlayerGoal)11 RandomLookAroundGoal (net.minecraft.world.entity.ai.goal.RandomLookAroundGoal)11 Player (net.minecraft.world.entity.player.Player)11 FloatGoal (net.minecraft.world.entity.ai.goal.FloatGoal)9 WaterAvoidingRandomStrollGoal (net.minecraft.world.entity.ai.goal.WaterAvoidingRandomStrollGoal)6 MeleeAttackGoal (net.minecraft.world.entity.ai.goal.MeleeAttackGoal)5 PanicGoal (net.minecraft.world.entity.ai.goal.PanicGoal)5 RandomStrollGoal (net.minecraft.world.entity.ai.goal.RandomStrollGoal)4 HurtByTargetGoal (net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal)4 BreedGoal (net.minecraft.world.entity.ai.goal.BreedGoal)3 FollowParentGoal (net.minecraft.world.entity.ai.goal.FollowParentGoal)3 TemptGoal (net.minecraft.world.entity.ai.goal.TemptGoal)3 MoveTowardsRestrictionGoal (net.minecraft.world.entity.ai.goal.MoveTowardsRestrictionGoal)2 EntityKoaBase (net.tropicraft.core.common.entity.passive.EntityKoaBase)2 FollowOwnerGoal (net.minecraft.world.entity.ai.goal.FollowOwnerGoal)1 LeapAtTargetGoal (net.minecraft.world.entity.ai.goal.LeapAtTargetGoal)1 SitWhenOrderedToGoal (net.minecraft.world.entity.ai.goal.SitWhenOrderedToGoal)1 OwnerHurtByTargetGoal (net.minecraft.world.entity.ai.goal.target.OwnerHurtByTargetGoal)1 OwnerHurtTargetGoal (net.minecraft.world.entity.ai.goal.target.OwnerHurtTargetGoal)1 Cat (net.minecraft.world.entity.animal.Cat)1