Search in sources :

Example 1 with LeapAtTargetGoal

use of net.minecraft.world.entity.ai.goal.LeapAtTargetGoal 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 2 with LeapAtTargetGoal

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

the class JaguarEntity method registerGoals.

@Override
protected void registerGoals() {
    this.goalSelector.addGoal(1, new FloatGoal(this));
    this.goalSelector.addGoal(2, new LeapAtTargetGoal(this, 0.5F));
    this.goalSelector.addGoal(3, new OcelotAttackGoal(this));
    this.goalSelector.addGoal(4, new TemptGoal(this, 1.25, BREEDING_ITEMS.get(), false));
    this.goalSelector.addGoal(5, new BreedGoal(this, 0.8));
    this.goalSelector.addGoal(6, new FollowParentGoal(this, 1.25));
    this.goalSelector.addGoal(7, new WaterAvoidingRandomStrollGoal(this, 0.8, 1e-5f));
    this.goalSelector.addGoal(8, new LookAtPlayerGoal(this, Player.class, 10.0F));
    this.targetSelector.addGoal(1, new NearestAttackableTargetGoal<>(this, WhiteLippedPeccaryEntity.class, 20, true, true, null));
}
Also used : Player(net.minecraft.world.entity.player.Player) WaterAvoidingRandomStrollGoal(net.minecraft.world.entity.ai.goal.WaterAvoidingRandomStrollGoal) OcelotAttackGoal(net.minecraft.world.entity.ai.goal.OcelotAttackGoal) LookAtPlayerGoal(net.minecraft.world.entity.ai.goal.LookAtPlayerGoal) TemptGoal(net.minecraft.world.entity.ai.goal.TemptGoal) FollowParentGoal(net.minecraft.world.entity.ai.goal.FollowParentGoal) WhiteLippedPeccaryEntity(net.tropicraft.core.common.entity.passive.WhiteLippedPeccaryEntity) LeapAtTargetGoal(net.minecraft.world.entity.ai.goal.LeapAtTargetGoal) BreedGoal(net.minecraft.world.entity.ai.goal.BreedGoal) FloatGoal(net.minecraft.world.entity.ai.goal.FloatGoal)

Aggregations

FloatGoal (net.minecraft.world.entity.ai.goal.FloatGoal)2 LeapAtTargetGoal (net.minecraft.world.entity.ai.goal.LeapAtTargetGoal)2 LookAtPlayerGoal (net.minecraft.world.entity.ai.goal.LookAtPlayerGoal)2 Player (net.minecraft.world.entity.player.Player)2 BreedGoal (net.minecraft.world.entity.ai.goal.BreedGoal)1 FollowOwnerGoal (net.minecraft.world.entity.ai.goal.FollowOwnerGoal)1 FollowParentGoal (net.minecraft.world.entity.ai.goal.FollowParentGoal)1 MeleeAttackGoal (net.minecraft.world.entity.ai.goal.MeleeAttackGoal)1 OcelotAttackGoal (net.minecraft.world.entity.ai.goal.OcelotAttackGoal)1 RandomLookAroundGoal (net.minecraft.world.entity.ai.goal.RandomLookAroundGoal)1 RandomStrollGoal (net.minecraft.world.entity.ai.goal.RandomStrollGoal)1 SitWhenOrderedToGoal (net.minecraft.world.entity.ai.goal.SitWhenOrderedToGoal)1 TemptGoal (net.minecraft.world.entity.ai.goal.TemptGoal)1 WaterAvoidingRandomStrollGoal (net.minecraft.world.entity.ai.goal.WaterAvoidingRandomStrollGoal)1 HurtByTargetGoal (net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal)1 OwnerHurtByTargetGoal (net.minecraft.world.entity.ai.goal.target.OwnerHurtByTargetGoal)1 OwnerHurtTargetGoal (net.minecraft.world.entity.ai.goal.target.OwnerHurtTargetGoal)1 MonkeyAngryThrowGoal (net.tropicraft.core.common.entity.ai.vmonkey.MonkeyAngryThrowGoal)1 MonkeyFollowNearestPinaColadaHolderGoal (net.tropicraft.core.common.entity.ai.vmonkey.MonkeyFollowNearestPinaColadaHolderGoal)1 MonkeyPickUpPinaColadaGoal (net.tropicraft.core.common.entity.ai.vmonkey.MonkeyPickUpPinaColadaGoal)1