Search in sources :

Example 1 with ToolType

use of com.minecolonies.api.util.constant.ToolType in project minecolonies by Minecolonies.

the class AbstractEntityAIHerder method prepareForHerding.

/**
 * Prepares the herder for herding
 *
 * @return The next {@link AIState}.
 */
private AIState prepareForHerding() {
    toolsNeeded.add(ToolType.AXE);
    itemsNeeded.add(getBreedingItems());
    for (final ToolType tool : toolsNeeded) {
        if (checkForToolOrWeapon(tool)) {
            return getState();
        }
    }
    for (final ItemStack item : itemsNeeded) {
        checkIfRequestForItemExistOrCreateAsynch(item);
    }
    setDelay(DECIDING_DELAY);
    return HERDER_DECIDE;
}
Also used : ToolType(com.minecolonies.api.util.constant.ToolType) ItemStack(net.minecraft.item.ItemStack)

Aggregations

ToolType (com.minecolonies.api.util.constant.ToolType)1 ItemStack (net.minecraft.item.ItemStack)1