use of net.minecraft.entity.ai.goal.LookAtWithoutMovingGoal in project minecolonies by Minecolonies.
the class EntityCitizen method initTasks.
/**
* Initiates citizen goalSelector Suppressing Sonar Rule Squid:S881 The rule thinks we should extract ++priority in a proper statement. But in this case the rule does not apply
* because that would remove the readability.
*/
@SuppressWarnings(INCREMENT_AND_DECREMENT_OPERATORS_SHOULD_NOT_BE_USED_IN_A_METHOD_CALL_OR_MIXED_WITH_OTHER_OPERATORS_IN_AN_EXPRESSION)
private void initTasks() {
int priority = 0;
this.goalSelector.addGoal(priority, new SwimGoal(this));
this.goalSelector.addGoal(++priority, new EntityAICitizenAvoidEntity(this, MonsterEntity.class, (float) DISTANCE_OF_ENTITY_AVOID, LATER_RUN_SPEED_AVOID, INITIAL_RUN_SPEED_AVOID));
this.goalSelector.addGoal(++priority, new EntityAIEatTask(this));
this.goalSelector.addGoal(++priority, new EntityAISickTask(this));
this.goalSelector.addGoal(++priority, new EntityAISleep(this));
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 EntityAICitizenWander(this, DEFAULT_SPEED, 1.0D));
this.goalSelector.addGoal(++priority, new LookAtGoal(this, LivingEntity.class, WATCH_CLOSEST));
this.goalSelector.addGoal(++priority, new EntityAIMournCitizen(this, DEFAULT_SPEED));
}
use of net.minecraft.entity.ai.goal.LookAtWithoutMovingGoal in project minecolonies by ldtteam.
the class EntityCitizen method initTasks.
/**
* Initiates citizen goalSelector Suppressing Sonar Rule Squid:S881 The rule thinks we should extract ++priority in a proper statement. But in this case the rule does not apply
* because that would remove the readability.
*/
@SuppressWarnings(INCREMENT_AND_DECREMENT_OPERATORS_SHOULD_NOT_BE_USED_IN_A_METHOD_CALL_OR_MIXED_WITH_OTHER_OPERATORS_IN_AN_EXPRESSION)
private void initTasks() {
int priority = 0;
this.goalSelector.addGoal(priority, new SwimGoal(this));
this.goalSelector.addGoal(++priority, new EntityAICitizenAvoidEntity(this, MonsterEntity.class, (float) DISTANCE_OF_ENTITY_AVOID, LATER_RUN_SPEED_AVOID, INITIAL_RUN_SPEED_AVOID));
this.goalSelector.addGoal(++priority, new EntityAIEatTask(this));
this.goalSelector.addGoal(++priority, new EntityAISickTask(this));
this.goalSelector.addGoal(++priority, new EntityAISleep(this));
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 EntityAICitizenWander(this, DEFAULT_SPEED, 1.0D));
this.goalSelector.addGoal(++priority, new LookAtGoal(this, LivingEntity.class, WATCH_CLOSEST));
this.goalSelector.addGoal(++priority, new EntityAIMournCitizen(this, DEFAULT_SPEED));
}
use of net.minecraft.entity.ai.goal.LookAtWithoutMovingGoal 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));
}
use of net.minecraft.entity.ai.goal.LookAtWithoutMovingGoal 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));
}
Aggregations