Search in sources :

Example 1 with OpenDoorGoal

use of net.minecraft.entity.ai.goal.OpenDoorGoal in project minecolonies by ldtteam.

the class VisitorCitizen method initTasks.

private void initTasks() {
    int priority = 0;
    this.goalSelector.addGoal(priority, new SwimGoal(this));
    this.goalSelector.addGoal(++priority, new OpenDoorGoal(this, true));
    this.goalSelector.addGoal(priority, new EntityAIInteractToggleAble(this, FENCE_TOGGLE, TRAP_TOGGLE, DOOR_TOGGLE));
    this.goalSelector.addGoal(++priority, new LookAtWithoutMovingGoal(this, PlayerEntity.class, WATCH_CLOSEST2, 1.0F));
    this.goalSelector.addGoal(++priority, new LookAtWithoutMovingGoal(this, EntityCitizen.class, WATCH_CLOSEST2_FAR, WATCH_CLOSEST2_FAR_CHANCE));
    this.goalSelector.addGoal(++priority, new LookAtGoal(this, LivingEntity.class, WATCH_CLOSEST));
    this.goalSelector.addGoal(++priority, new EntityAIVisitor(this));
}
Also used : LookAtGoal(net.minecraft.entity.ai.goal.LookAtGoal) EntityAIInteractToggleAble(com.minecolonies.coremod.entity.ai.minimal.EntityAIInteractToggleAble) EntityAIVisitor(com.minecolonies.coremod.entity.ai.minimal.EntityAIVisitor) LookAtWithoutMovingGoal(net.minecraft.entity.ai.goal.LookAtWithoutMovingGoal) OpenDoorGoal(net.minecraft.entity.ai.goal.OpenDoorGoal) AbstractEntityCitizen(com.minecolonies.api.entity.citizen.AbstractEntityCitizen) SwimGoal(net.minecraft.entity.ai.goal.SwimGoal) PlayerEntity(net.minecraft.entity.player.PlayerEntity) ServerPlayerEntity(net.minecraft.entity.player.ServerPlayerEntity)

Example 2 with OpenDoorGoal

use of net.minecraft.entity.ai.goal.OpenDoorGoal in project minecolonies by Minecolonies.

the class VisitorCitizen method initTasks.

private void initTasks() {
    int priority = 0;
    this.goalSelector.addGoal(priority, new SwimGoal(this));
    this.goalSelector.addGoal(++priority, new OpenDoorGoal(this, true));
    this.goalSelector.addGoal(priority, new EntityAIInteractToggleAble(this, FENCE_TOGGLE, TRAP_TOGGLE, DOOR_TOGGLE));
    this.goalSelector.addGoal(++priority, new LookAtWithoutMovingGoal(this, PlayerEntity.class, WATCH_CLOSEST2, 1.0F));
    this.goalSelector.addGoal(++priority, new LookAtWithoutMovingGoal(this, EntityCitizen.class, WATCH_CLOSEST2_FAR, WATCH_CLOSEST2_FAR_CHANCE));
    this.goalSelector.addGoal(++priority, new LookAtGoal(this, LivingEntity.class, WATCH_CLOSEST));
    this.goalSelector.addGoal(++priority, new EntityAIVisitor(this));
}
Also used : LookAtGoal(net.minecraft.entity.ai.goal.LookAtGoal) EntityAIInteractToggleAble(com.minecolonies.coremod.entity.ai.minimal.EntityAIInteractToggleAble) EntityAIVisitor(com.minecolonies.coremod.entity.ai.minimal.EntityAIVisitor) LookAtWithoutMovingGoal(net.minecraft.entity.ai.goal.LookAtWithoutMovingGoal) OpenDoorGoal(net.minecraft.entity.ai.goal.OpenDoorGoal) AbstractEntityCitizen(com.minecolonies.api.entity.citizen.AbstractEntityCitizen) SwimGoal(net.minecraft.entity.ai.goal.SwimGoal) PlayerEntity(net.minecraft.entity.player.PlayerEntity) ServerPlayerEntity(net.minecraft.entity.player.ServerPlayerEntity)

Aggregations

AbstractEntityCitizen (com.minecolonies.api.entity.citizen.AbstractEntityCitizen)2 EntityAIInteractToggleAble (com.minecolonies.coremod.entity.ai.minimal.EntityAIInteractToggleAble)2 EntityAIVisitor (com.minecolonies.coremod.entity.ai.minimal.EntityAIVisitor)2 LookAtGoal (net.minecraft.entity.ai.goal.LookAtGoal)2 LookAtWithoutMovingGoal (net.minecraft.entity.ai.goal.LookAtWithoutMovingGoal)2 OpenDoorGoal (net.minecraft.entity.ai.goal.OpenDoorGoal)2 SwimGoal (net.minecraft.entity.ai.goal.SwimGoal)2 PlayerEntity (net.minecraft.entity.player.PlayerEntity)2 ServerPlayerEntity (net.minecraft.entity.player.ServerPlayerEntity)2