Search in sources :

Example 1 with OwnerHurtByTargetGoal

use of net.minecraft.entity.ai.goal.OwnerHurtByTargetGoal in project VariousOddities by Lyinginbedmon.

the class EntityGhastling method registerGoals.

public void registerGoals() {
    this.goalSelector.addGoal(2, new SitGoal(this));
    this.goalSelector.addGoal(5, new EntityAIGhastlingFireball(this));
    this.goalSelector.addGoal(7, new LandOnOwnersShoulderGoal(this));
    this.goalSelector.addGoal(8, new EntityAIGhastlingWander(this, 0.1F));
    this.goalSelector.addGoal(10, new LookAtGoal(this, PlayerEntity.class, 8.0F));
    this.goalSelector.addGoal(10, new LookRandomlyGoal(this));
    if (ConfigVO.MOBS.aiSettings.isOddityAIEnabled(VOEntities.GHASTLING)) {
        this.targetSelector.addGoal(1, new OwnerHurtByTargetGoal(this));
        this.targetSelector.addGoal(2, new OwnerHurtTargetGoal(this));
        this.targetSelector.addGoal(3, new HurtByTargetGoal(this));
    }
}
Also used : LookAtGoal(net.minecraft.entity.ai.goal.LookAtGoal) LookRandomlyGoal(net.minecraft.entity.ai.goal.LookRandomlyGoal) EntityAIGhastlingWander(com.lying.variousoddities.entity.ai.passive.EntityAIGhastlingWander) SitGoal(net.minecraft.entity.ai.goal.SitGoal) OwnerHurtByTargetGoal(net.minecraft.entity.ai.goal.OwnerHurtByTargetGoal) HurtByTargetGoal(net.minecraft.entity.ai.goal.HurtByTargetGoal) OwnerHurtByTargetGoal(net.minecraft.entity.ai.goal.OwnerHurtByTargetGoal) OwnerHurtTargetGoal(net.minecraft.entity.ai.goal.OwnerHurtTargetGoal) LandOnOwnersShoulderGoal(net.minecraft.entity.ai.goal.LandOnOwnersShoulderGoal) EntityAIGhastlingFireball(com.lying.variousoddities.entity.ai.passive.EntityAIGhastlingFireball) PlayerEntity(net.minecraft.entity.player.PlayerEntity)

Example 2 with OwnerHurtByTargetGoal

use of net.minecraft.entity.ai.goal.OwnerHurtByTargetGoal in project VariousOddities by Lyinginbedmon.

the class AbstractGoblinWolf method registerGoals.

public void registerGoals() {
    super.registerGoals();
    this.goalSelector.addGoal(1, new SwimGoal(this));
    this.goalSelector.addGoal(2, new SitGoal(this));
    this.goalSelector.addGoal(5, new MeleeAttackGoal(this, 1.0D, true));
    this.goalSelector.addGoal(5, new EntityAIWorgFollowGoblin(this));
    this.goalSelector.addGoal(6, new FollowOwnerGoal(this, 1.0D, 10.0F, 2.0F, false));
    this.goalSelector.addGoal(8, new EntityAIWargWander(this, 1.0D));
    this.goalSelector.addGoal(9, new EntityAIGoblinWolfBeg(this, 8F));
    this.goalSelector.addGoal(10, new LookAtGoal(this, PlayerEntity.class, 8.0F));
    this.goalSelector.addGoal(10, new LookRandomlyGoal(this));
    if (ConfigVO.MOBS.aiSettings.isOddityAIEnabled(getType())) {
        this.goalSelector.addGoal(5, new MeleeAttackGoal(this, 1.0D, true));
        this.targetSelector.addGoal(1, new OwnerHurtByTargetGoal(this));
        this.targetSelector.addGoal(2, new OwnerHurtTargetGoal(this));
        this.targetSelector.addGoal(3, (new HurtByTargetGoal(this, AbstractGoblinWolf.class)).setCallsForHelp());
    }
    applyGeneticAI();
}
Also used : LookAtGoal(net.minecraft.entity.ai.goal.LookAtGoal) EntityAIWargWander(com.lying.variousoddities.entity.ai.EntityAIWargWander) SitGoal(net.minecraft.entity.ai.goal.SitGoal) OwnerHurtByTargetGoal(net.minecraft.entity.ai.goal.OwnerHurtByTargetGoal) HurtByTargetGoal(net.minecraft.entity.ai.goal.HurtByTargetGoal) OwnerHurtByTargetGoal(net.minecraft.entity.ai.goal.OwnerHurtByTargetGoal) OwnerHurtTargetGoal(net.minecraft.entity.ai.goal.OwnerHurtTargetGoal) EntityAIWorgFollowGoblin(com.lying.variousoddities.entity.ai.hostile.EntityAIWorgFollowGoblin) SwimGoal(net.minecraft.entity.ai.goal.SwimGoal) PlayerEntity(net.minecraft.entity.player.PlayerEntity) LookRandomlyGoal(net.minecraft.entity.ai.goal.LookRandomlyGoal) MeleeAttackGoal(net.minecraft.entity.ai.goal.MeleeAttackGoal) FollowOwnerGoal(net.minecraft.entity.ai.goal.FollowOwnerGoal) EntityAIGoblinWolfBeg(com.lying.variousoddities.entity.ai.passive.EntityAIGoblinWolfBeg)

Aggregations

HurtByTargetGoal (net.minecraft.entity.ai.goal.HurtByTargetGoal)2 LookAtGoal (net.minecraft.entity.ai.goal.LookAtGoal)2 LookRandomlyGoal (net.minecraft.entity.ai.goal.LookRandomlyGoal)2 OwnerHurtByTargetGoal (net.minecraft.entity.ai.goal.OwnerHurtByTargetGoal)2 OwnerHurtTargetGoal (net.minecraft.entity.ai.goal.OwnerHurtTargetGoal)2 SitGoal (net.minecraft.entity.ai.goal.SitGoal)2 PlayerEntity (net.minecraft.entity.player.PlayerEntity)2 EntityAIWargWander (com.lying.variousoddities.entity.ai.EntityAIWargWander)1 EntityAIWorgFollowGoblin (com.lying.variousoddities.entity.ai.hostile.EntityAIWorgFollowGoblin)1 EntityAIGhastlingFireball (com.lying.variousoddities.entity.ai.passive.EntityAIGhastlingFireball)1 EntityAIGhastlingWander (com.lying.variousoddities.entity.ai.passive.EntityAIGhastlingWander)1 EntityAIGoblinWolfBeg (com.lying.variousoddities.entity.ai.passive.EntityAIGoblinWolfBeg)1 FollowOwnerGoal (net.minecraft.entity.ai.goal.FollowOwnerGoal)1 LandOnOwnersShoulderGoal (net.minecraft.entity.ai.goal.LandOnOwnersShoulderGoal)1 MeleeAttackGoal (net.minecraft.entity.ai.goal.MeleeAttackGoal)1 SwimGoal (net.minecraft.entity.ai.goal.SwimGoal)1