use of com.minecolonies.coremod.colony.buildings.workerbuildings.BuildingCowboy in project minecolonies by ldtteam.
the class EntityAIWorkCowboy method decideWhatToDo.
@Override
public IAIState decideWhatToDo() {
final IAIState result = super.decideWhatToDo();
final BuildingCowboy building = getOwnBuilding();
final boolean hasBucket = InventoryUtils.hasItemInItemHandler(worker.getInventoryCitizen(), Items.BUCKET);
if (building != null && getOwnBuilding().getSetting(BuildingCowboy.MILKING).getValue() && result.equals(START_WORKING) && hasBucket) {
return COWBOY_MILK;
}
return result;
}
Aggregations