Search in sources :

Example 1 with BuildingCowboy

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;
}
Also used : BuildingCowboy(com.minecolonies.coremod.colony.buildings.workerbuildings.BuildingCowboy) IAIState(com.minecolonies.api.entity.ai.statemachine.states.IAIState)

Aggregations

IAIState (com.minecolonies.api.entity.ai.statemachine.states.IAIState)1 BuildingCowboy (com.minecolonies.coremod.colony.buildings.workerbuildings.BuildingCowboy)1