use of com.minecolonies.coremod.colony.buildings.workerbuildings.BuildingSchool in project minecolonies by Minecolonies.
the class EntityAIWorkPupil method decide.
/**
* Decide between recess and studying.
*
* @return next state to go to.
*/
private IAIState decide() {
if (worker.getRandom().nextInt(STUDY_TO_RECESS_RATIO) < 1) {
recessPos = building.getPosition();
return RECESS;
}
final BuildingSchool school = building;
final BlockPos pos = school.getRandomPlaceToSit();
if (pos == null) {
worker.getCitizenData().triggerInteraction(new StandardInteraction(new TranslationTextComponent(PUPIL_NO_CARPET), ChatPriority.BLOCKING));
return DECIDE;
}
studyPos = pos;
return STUDY;
}
use of com.minecolonies.coremod.colony.buildings.workerbuildings.BuildingSchool in project minecolonies by ldtteam.
the class EntityAIWorkPupil method decide.
/**
* Decide between recess and studying.
*
* @return next state to go to.
*/
private IAIState decide() {
if (worker.getRandom().nextInt(STUDY_TO_RECESS_RATIO) < 1) {
recessPos = getOwnBuilding().getPosition();
return RECESS;
}
final BuildingSchool school = getOwnBuilding();
final BlockPos pos = school.getRandomPlaceToSit();
if (pos == null) {
worker.getCitizenData().triggerInteraction(new StandardInteraction(new TranslationTextComponent(PUPIL_NO_CARPET), ChatPriority.BLOCKING));
return DECIDE;
}
studyPos = pos;
return STUDY;
}
Aggregations