Search in sources :

Example 1 with FloatGoal

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

the class AshenEntity method registerGoals.

@Override
protected void registerGoals() {
    goalSelector.addGoal(1, new FloatGoal(this));
    goalSelector.addGoal(2, new AIAshenChaseAndPickupLostMask(this, 1.0D));
    goalSelector.addGoal(3, new AIAshenShootDart(this));
    goalSelector.addGoal(4, new RandomStrollGoal(this, 1.0D));
    goalSelector.addGoal(5, new EntityAIMeleeAndRangedAttack(this, 1.0D, 20 * 2, 20 * 10, 5F));
    goalSelector.addGoal(6, new LookAtPlayerGoal(this, Player.class, 8.0F));
    goalSelector.addGoal(7, new RandomLookAroundGoal(this));
    targetSelector.addGoal(1, new HurtByTargetGoal(this));
    // TODO: Change predicate in last parameter below?
    targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, true));
    targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, EntityKoaBase.class, true));
}
Also used : RandomLookAroundGoal(net.minecraft.world.entity.ai.goal.RandomLookAroundGoal) EntityKoaBase(net.tropicraft.core.common.entity.passive.EntityKoaBase) AIAshenShootDart(net.tropicraft.core.common.entity.ai.ashen.AIAshenShootDart) Player(net.minecraft.world.entity.player.Player) LookAtPlayerGoal(net.minecraft.world.entity.ai.goal.LookAtPlayerGoal) HurtByTargetGoal(net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal) FloatGoal(net.minecraft.world.entity.ai.goal.FloatGoal) EntityAIMeleeAndRangedAttack(net.tropicraft.core.common.entity.ai.ashen.EntityAIMeleeAndRangedAttack) AIAshenChaseAndPickupLostMask(net.tropicraft.core.common.entity.ai.ashen.AIAshenChaseAndPickupLostMask) RandomStrollGoal(net.minecraft.world.entity.ai.goal.RandomStrollGoal)

Example 2 with FloatGoal

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

the class TropiSpiderEntity method registerGoals.

@Override
protected void registerGoals() {
    goalSelector.addGoal(0, new FloatGoal(this));
    goalSelector.addGoal(2, new MeleeAttackGoal(this, 0.8D, false));
    goalSelector.addGoal(7, new EntityAIWanderNotLazy(this, 0.8D, 40));
    goalSelector.addGoal(8, new LookAtPlayerGoal(this, Player.class, 8.0F));
    goalSelector.addGoal(8, 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) MeleeAttackGoal(net.minecraft.world.entity.ai.goal.MeleeAttackGoal) EntityAIWanderNotLazy(net.tropicraft.core.common.entity.ai.EntityAIWanderNotLazy) FloatGoal(net.minecraft.world.entity.ai.goal.FloatGoal)

Example 3 with FloatGoal

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

the class VMonkeyEntity method registerGoals.

@Override
protected void registerGoals() {
    super.registerGoals();
    goalSelector.addGoal(1, new FloatGoal(this));
    goalSelector.addGoal(3, new MonkeyFollowNearestPinaColadaHolderGoal(this, 1.0D, 2.0F, 10.0F));
    goalSelector.addGoal(3, new LeapAtTargetGoal(this, 0.4F));
    goalSelector.addGoal(3, new MonkeyPickUpPinaColadaGoal(this));
    goalSelector.addGoal(2, new MonkeyStealDrinkGoal(this));
    goalSelector.addGoal(2, new MonkeySitAndDrinkGoal(this));
    goalSelector.addGoal(2, new MonkeyAngryThrowGoal(this));
    goalSelector.addGoal(4, new MonkeySitInChairGoal(this));
    goalSelector.addGoal(4, new SitWhenOrderedToGoal(this));
    goalSelector.addGoal(6, new MeleeAttackGoal(this, 1.0D, true));
    goalSelector.addGoal(7, new FollowOwnerGoal(this, 1.0D, 10.0F, 2.0F, false));
    goalSelector.addGoal(8, new RandomStrollGoal(this, 1.0D));
    goalSelector.addGoal(9, new LookAtPlayerGoal(this, Player.class, 8.0F));
    goalSelector.addGoal(9, new RandomLookAroundGoal(this));
    targetSelector.addGoal(1, new OwnerHurtByTargetGoal(this));
    targetSelector.addGoal(2, new OwnerHurtTargetGoal(this));
    targetSelector.addGoal(3, new HurtByTargetGoal(this));
}
Also used : Player(net.minecraft.world.entity.player.Player) MonkeySitAndDrinkGoal(net.tropicraft.core.common.entity.ai.vmonkey.MonkeySitAndDrinkGoal) OwnerHurtByTargetGoal(net.minecraft.world.entity.ai.goal.target.OwnerHurtByTargetGoal) HurtByTargetGoal(net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal) OwnerHurtByTargetGoal(net.minecraft.world.entity.ai.goal.target.OwnerHurtByTargetGoal) OwnerHurtTargetGoal(net.minecraft.world.entity.ai.goal.target.OwnerHurtTargetGoal) MonkeyFollowNearestPinaColadaHolderGoal(net.tropicraft.core.common.entity.ai.vmonkey.MonkeyFollowNearestPinaColadaHolderGoal) RandomLookAroundGoal(net.minecraft.world.entity.ai.goal.RandomLookAroundGoal) MonkeyStealDrinkGoal(net.tropicraft.core.common.entity.ai.vmonkey.MonkeyStealDrinkGoal) MonkeyPickUpPinaColadaGoal(net.tropicraft.core.common.entity.ai.vmonkey.MonkeyPickUpPinaColadaGoal) LookAtPlayerGoal(net.minecraft.world.entity.ai.goal.LookAtPlayerGoal) MonkeySitInChairGoal(net.tropicraft.core.common.entity.ai.vmonkey.MonkeySitInChairGoal) MeleeAttackGoal(net.minecraft.world.entity.ai.goal.MeleeAttackGoal) MonkeyAngryThrowGoal(net.tropicraft.core.common.entity.ai.vmonkey.MonkeyAngryThrowGoal) LeapAtTargetGoal(net.minecraft.world.entity.ai.goal.LeapAtTargetGoal) FloatGoal(net.minecraft.world.entity.ai.goal.FloatGoal) FollowOwnerGoal(net.minecraft.world.entity.ai.goal.FollowOwnerGoal) RandomStrollGoal(net.minecraft.world.entity.ai.goal.RandomStrollGoal) SitWhenOrderedToGoal(net.minecraft.world.entity.ai.goal.SitWhenOrderedToGoal)

Example 4 with FloatGoal

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

the class TapirEntity 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 5 with FloatGoal

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

the class WhiteLippedPeccaryEntity 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)

Aggregations

FloatGoal (net.minecraft.world.entity.ai.goal.FloatGoal)14 LookAtPlayerGoal (net.minecraft.world.entity.ai.goal.LookAtPlayerGoal)13 Player (net.minecraft.world.entity.player.Player)13 RandomLookAroundGoal (net.minecraft.world.entity.ai.goal.RandomLookAroundGoal)9 WaterAvoidingRandomStrollGoal (net.minecraft.world.entity.ai.goal.WaterAvoidingRandomStrollGoal)9 MeleeAttackGoal (net.minecraft.world.entity.ai.goal.MeleeAttackGoal)6 TemptGoal (net.minecraft.world.entity.ai.goal.TemptGoal)5 HurtByTargetGoal (net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal)5 BreedGoal (net.minecraft.world.entity.ai.goal.BreedGoal)4 FollowParentGoal (net.minecraft.world.entity.ai.goal.FollowParentGoal)4 MoveTowardsRestrictionGoal (net.minecraft.world.entity.ai.goal.MoveTowardsRestrictionGoal)3 PanicGoal (net.minecraft.world.entity.ai.goal.PanicGoal)3 Mob (net.minecraft.world.entity.Mob)2 LeapAtTargetGoal (net.minecraft.world.entity.ai.goal.LeapAtTargetGoal)2 RandomStrollGoal (net.minecraft.world.entity.ai.goal.RandomStrollGoal)2 EntityAIWanderNotLazy (net.tropicraft.core.common.entity.ai.EntityAIWanderNotLazy)2 EntityKoaBase (net.tropicraft.core.common.entity.passive.EntityKoaBase)2 ServerPlayer (net.minecraft.server.level.ServerPlayer)1 AgeableMob (net.minecraft.world.entity.AgeableMob)1 LivingEntity (net.minecraft.world.entity.LivingEntity)1