Enum Class AIWorkerState

java.lang.Object
java.lang.Enum<AIWorkerState>
com.minecolonies.api.entity.ai.statemachine.states.AIWorkerState
All Implemented Interfaces:
IAIState, IState, Serializable, Comparable<AIWorkerState>, Constable

public enum AIWorkerState extends Enum<AIWorkerState> implements IAIState
Basic state enclosing states all ai's use. Please extend this class with the states your ai needs. And please document each state on what it does.
  • Enum Constant Details

    • IDLE

      public static final AIWorkerState IDLE
      this is the idle state for the ai. From here on it will start working. Use this state in your ai to start your code.
    • INIT

      public static final AIWorkerState INIT
      This state is only used on ai initialization. It checks if any important things are null.
    • INVENTORY_FULL

      public static final AIWorkerState INVENTORY_FULL
      Inventory has to be dumped.
    • PREPARING

      public static final AIWorkerState PREPARING
      Check for all required items.
    • START_WORKING

      public static final AIWorkerState START_WORKING
      Start working by walking to the building.
    • NEEDS_ITEM

      public static final AIWorkerState NEEDS_ITEM
      The ai needs some items it is waiting for.
    • START_BUILDING

      public static final AIWorkerState START_BUILDING
      Start building a StructureIterator.
    • MINE_BLOCK

      public static final AIWorkerState MINE_BLOCK
      Mine a block.
    • LOAD_STRUCTURE

      public static final AIWorkerState LOAD_STRUCTURE
      Load the structure and requirements.
    • BUILDING_STEP

      public static final AIWorkerState BUILDING_STEP
      Creates the solid structure.
    • COMPLETE_BUILD

      public static final AIWorkerState COMPLETE_BUILD
      Completes the building.
    • DECIDE

      public static final AIWorkerState DECIDE
      Decide what AIstate to go to next.
    • PAUSED

      public static final AIWorkerState PAUSED
      Do not work, can be used for freetime activities.
    • FISHERMAN_SEARCHING_WATER

      public static final AIWorkerState FISHERMAN_SEARCHING_WATER
      The fisherman is looking for water.
    • FISHERMAN_WALKING_TO_WATER

      public static final AIWorkerState FISHERMAN_WALKING_TO_WATER
      The fisherman has found water and can start fishing.
    • FISHERMAN_CHECK_WATER

      public static final AIWorkerState FISHERMAN_CHECK_WATER
    • FISHERMAN_START_FISHING

      public static final AIWorkerState FISHERMAN_START_FISHING
    • LUMBERJACK_START_WORKING

      public static final AIWorkerState LUMBERJACK_START_WORKING
      The lumberjack is starting up his/her routine.
    • LUMBERJACK_SEARCHING_TREE

      public static final AIWorkerState LUMBERJACK_SEARCHING_TREE
      The lumberjack is looking for trees.
    • LUMBERJACK_CHOP_TREE

      public static final AIWorkerState LUMBERJACK_CHOP_TREE
      The lumberjack has found trees and can start cutting them.
    • LUMBERJACK_GATHERING

      public static final AIWorkerState LUMBERJACK_GATHERING
      The Lumberjack is gathering saplings.
    • LUMBERJACK_NO_TREES_FOUND

      public static final AIWorkerState LUMBERJACK_NO_TREES_FOUND
      There are no trees in his search range.
    • LUMBERJACK_GATHERING_2

      public static final AIWorkerState LUMBERJACK_GATHERING_2
      The Lumberjack is gathering saplings (second pass).
    • MINER_CHECK_MINESHAFT

      public static final AIWorkerState MINER_CHECK_MINESHAFT
      Check if there is a mineshaft.
    • MINER_WALKING_TO_LADDER

      public static final AIWorkerState MINER_WALKING_TO_LADDER
      The Miner walks to the ladder.
    • MINER_REPAIRING_LADDER

      public static final AIWorkerState MINER_REPAIRING_LADDER
      The Miner repairs its ladder.
    • MINER_MINING_SHAFT

      public static final AIWorkerState MINER_MINING_SHAFT
      The Miner mines his shaft.
    • MINER_BUILDING_SHAFT

      public static final AIWorkerState MINER_BUILDING_SHAFT
      The Miner builds his shaft.
    • MINER_MINING_NODE

      public static final AIWorkerState MINER_MINING_NODE
      The Miner mines one node.
    • PICK_UP

      public static final AIWorkerState PICK_UP
      Pick up all materials he might need.
    • FARMER_HOE

      public static final AIWorkerState FARMER_HOE
      Hoe the field.
    • FARMER_PLANT

      public static final AIWorkerState FARMER_PLANT
      Plant the seeds.
    • FARMER_HARVEST

      public static final AIWorkerState FARMER_HARVEST
      Harvest the crops.
    • EMPTY_GRAVE

      public static final AIWorkerState EMPTY_GRAVE
      Empty The grave
    • DIG_GRAVE

      public static final AIWorkerState DIG_GRAVE
      Dig The grave
    • BURY_CITIZEN

      public static final AIWorkerState BURY_CITIZEN
      Bury the citizen
    • TRY_RESURRECT

      public static final AIWorkerState TRY_RESURRECT
      Attempt Resurrect
    • GUARD_DECIDE

      public static final AIWorkerState GUARD_DECIDE
      Decision state for guards.
    • GUARD_ATTACK_PHYSICAL

      public static final AIWorkerState GUARD_ATTACK_PHYSICAL
      Physically attack the target.
    • GUARD_ATTACK_RANGED

      public static final AIWorkerState GUARD_ATTACK_RANGED
      Use a ranged attack against the target.
    • GUARD_ATTACK_PROTECT

      public static final AIWorkerState GUARD_ATTACK_PROTECT
      Allow the guard to protect himself.
    • GUARD_PATROL

      public static final AIWorkerState GUARD_PATROL
      Patrol through the village.
    • GUARD_SLEEP

      public static final AIWorkerState GUARD_SLEEP
      Sleeping on duty
    • GUARD_WAKE

      public static final AIWorkerState GUARD_WAKE
      Wake up another guard
    • GUARD_FOLLOW

      public static final AIWorkerState GUARD_FOLLOW
      Follow a player.
    • GUARD_GUARD

      public static final AIWorkerState GUARD_GUARD
      Guard a position.
    • GUARD_REGEN

      public static final AIWorkerState GUARD_REGEN
      Regen at the building.
    • GUARD_FLEE

      public static final AIWorkerState GUARD_FLEE
      Flee to work building.
    • HELP_CITIZEN

      public static final AIWorkerState HELP_CITIZEN
      Helping out a citizen in danger
    • PREPARE_DELIVERY

      public static final AIWorkerState PREPARE_DELIVERY
      Get stuff from the warehouse.
    • DELIVERY

      public static final AIWorkerState DELIVERY
      Delivery required items or tools.
    • PICKUP

      public static final AIWorkerState PICKUP
      Pickup unneeded items from buildings.
    • DUMPING

      public static final AIWorkerState DUMPING
      Dump inventory over chests in warehouse.
    • BAKER_KNEADING

      public static final AIWorkerState BAKER_KNEADING
      Knead the dough.
    • BAKER_BAKING

      public static final AIWorkerState BAKER_BAKING
      Bake the dough.
    • BAKER_FINISHING

      public static final AIWorkerState BAKER_FINISHING
      Finish up the product.
    • BAKER_TAKE_OUT_OF_OVEN

      public static final AIWorkerState BAKER_TAKE_OUT_OF_OVEN
      Take the product out of the oven.
    • FILL_UP_FURNACES

      public static final AIWorkerState FILL_UP_FURNACES
      smelter smelts ore until its a bar.
    • GATHERING_REQUIRED_MATERIALS

      public static final AIWorkerState GATHERING_REQUIRED_MATERIALS
      Gathering ore from his building.
    • RETRIEVING_END_PRODUCT_FROM_FURNACE

      public static final AIWorkerState RETRIEVING_END_PRODUCT_FROM_FURNACE
      Retrieve the ore from the furnace.
    • RETRIEVING_UNRELATED_PRODUCT_FROM_FURNACE

      public static final AIWorkerState RETRIEVING_UNRELATED_PRODUCT_FROM_FURNACE
      Retrieve unrelated product from furnace.
    • RETRIEVING_USED_FUEL_FROM_FURNACE

      public static final AIWorkerState RETRIEVING_USED_FUEL_FROM_FURNACE
      Retrieve used fuel from the furnace.
    • ADD_FUEL_TO_FURNACE

      public static final AIWorkerState ADD_FUEL_TO_FURNACE
      Fuel the furnace
    • BREAK_ORES

      public static final AIWorkerState BREAK_ORES
      Break down ores.
    • COOK_SERVE_FOOD_TO_CITIZEN

      public static final AIWorkerState COOK_SERVE_FOOD_TO_CITIZEN
      Serve food to the citizens inside the building.
    • COOK_SERVE_FOOD_TO_PLAYER

      public static final AIWorkerState COOK_SERVE_FOOD_TO_PLAYER
      Serve food to the players inside the building.
    • HERDER_BREED

      public static final AIWorkerState HERDER_BREED
      Breed two animals together.
    • HERDER_BUTCHER

      public static final AIWorkerState HERDER_BUTCHER
      Butcher an animal.
    • HERDER_PICKUP

      public static final AIWorkerState HERDER_PICKUP
      Pickup items within area.
    • HERDER_FEED

      public static final AIWorkerState HERDER_FEED
      Feed animals.
    • HERDER_TRAIN

      public static final AIWorkerState HERDER_TRAIN
      Train mounts!
    • HERDER_READY_FOR_COMBAT

      public static final AIWorkerState HERDER_READY_FOR_COMBAT
      Get mounts ready for combat!
    • HERDER_GATHER_MOUNTS

      public static final AIWorkerState HERDER_GATHER_MOUNTS
      Bring mounts to the stable!
    • COWBOY_MILK

      public static final AIWorkerState COWBOY_MILK
      Milk cows!
    • COWBOY_STEW

      public static final AIWorkerState COWBOY_STEW
      Milk mooshrooms!
    • SHEPHERD_SHEAR

      public static final AIWorkerState SHEPHERD_SHEAR
      Shear a sheep!
    • COMPOSTER_FILL

      public static final AIWorkerState COMPOSTER_FILL
      Fill up the barrels
    • COMPOSTER_HARVEST

      public static final AIWorkerState COMPOSTER_HARVEST
      Take the compost from the barrels
    • GET_MATERIALS

      public static final AIWorkerState GET_MATERIALS
      Gather materials from the building
    • STUDY

      public static final AIWorkerState STUDY
    • TRAINING_WANDER

      public static final AIWorkerState TRAINING_WANDER
    • GO_TO_TARGET

      public static final AIWorkerState GO_TO_TARGET
      Go to the shooting position.
    • COMBAT_TRAINING

      public static final AIWorkerState COMBAT_TRAINING
      Find the position to train from.
    • ARCHER_FIND_SHOOTING_STAND_POSITION

      public static final AIWorkerState ARCHER_FIND_SHOOTING_STAND_POSITION
      Find a good position to shoot from.
    • ARCHER_SELECT_TARGET

      public static final AIWorkerState ARCHER_SELECT_TARGET
      Select a random target.
    • ARCHER_CHECK_SHOT

      public static final AIWorkerState ARCHER_CHECK_SHOT
      Check the shot result.
    • ARCHER_SHOOT

      public static final AIWorkerState ARCHER_SHOOT
      Archer shoot target.
    • KNIGHT_ATTACK_DUMMY

      public static final AIWorkerState KNIGHT_ATTACK_DUMMY
      Guard attack a dummy.
    • FIND_DUMMY_PARTNER

      public static final AIWorkerState FIND_DUMMY_PARTNER
      Find dummy to attack
    • FIND_TRAINING_PARTNER

      public static final AIWorkerState FIND_TRAINING_PARTNER
      Find a training partner
    • KNIGHT_TRAIN_WITH_PARTNER

      public static final AIWorkerState KNIGHT_TRAIN_WITH_PARTNER
      Attack the training partner.
    • KNIGHT_ATTACK_PROTECT

      public static final AIWorkerState KNIGHT_ATTACK_PROTECT
      Attack protect in a certain direction.
    • GET_RECIPE

      public static final AIWorkerState GET_RECIPE
      Get the recipe.
    • QUERY_ITEMS

      public static final AIWorkerState QUERY_ITEMS
      Query the required items for a recipe.
    • CRAFT

      public static final AIWorkerState CRAFT
      Execute the crafting action.
    • CRUSH

      public static final AIWorkerState CRUSH
      Let the crusher crush blocks.
    • SIFT

      public static final AIWorkerState SIFT
      Let the sifter sieve blocks.
    • NETHER_LEAVE

      public static final AIWorkerState NETHER_LEAVE
      Let the nether worker start out on the trip.
    • NETHER_AWAY

      public static final AIWorkerState NETHER_AWAY
      Let the nether worker return from the trip.
    • NETHER_RETURN

      public static final AIWorkerState NETHER_RETURN
      Let the nether worker return from the trip.
    • NETHER_OPENPORTAL

      public static final AIWorkerState NETHER_OPENPORTAL
      Let the nether worker open the portal to the nether
    • NETHER_CLOSEPORTAL

      public static final AIWorkerState NETHER_CLOSEPORTAL
      Let the nether worker close the portal to the nether
    • FLORIST_HARVEST

      public static final AIWorkerState FLORIST_HARVEST
      Let the florist harvest a flower.
    • FLORIST_COMPOST

      public static final AIWorkerState FLORIST_COMPOST
      Let the florist compost the block.
    • ENCHANTER_DRAIN

      public static final AIWorkerState ENCHANTER_DRAIN
      Let the enchanter gather experience.
    • ENCHANT

      public static final AIWorkerState ENCHANT
      Enchant ancient tome.
    • REQUEST_CURE

      public static final AIWorkerState REQUEST_CURE
    • CURE

      public static final AIWorkerState CURE
    • WANDER

      public static final AIWorkerState WANDER
    • FREE_CURE

      public static final AIWorkerState FREE_CURE
    • CURE_PLAYER

      public static final AIWorkerState CURE_PLAYER
    • TEACH

      public static final AIWorkerState TEACH
    • RECESS

      public static final AIWorkerState RECESS
    • PLANTATION_PICK_FIELD

      public static final AIWorkerState PLANTATION_PICK_FIELD
    • PLANTATION_MOVE_TO_FIELD

      public static final AIWorkerState PLANTATION_MOVE_TO_FIELD
    • PLANTATION_DECIDE_FIELD_WORK

      public static final AIWorkerState PLANTATION_DECIDE_FIELD_WORK
    • PLANTATION_WORK_FIELD

      public static final AIWorkerState PLANTATION_WORK_FIELD
    • PLANTATION_RETURN_TO_BUILDING

      public static final AIWorkerState PLANTATION_RETURN_TO_BUILDING
    • BEEKEEPER_HARVEST

      public static final AIWorkerState BEEKEEPER_HARVEST
    • START_USING_BREWINGSTAND

      public static final AIWorkerState START_USING_BREWINGSTAND
      brews potions until.
    • RETRIEVING_END_PRODUCT_FROM_BREWINGSTAMD

      public static final AIWorkerState RETRIEVING_END_PRODUCT_FROM_BREWINGSTAMD
      Retrieve the ore from the brewingStand.
    • RETRIEVING_USED_FUEL_FROM_BREWINGSTAND

      public static final AIWorkerState RETRIEVING_USED_FUEL_FROM_BREWINGSTAND
      Retrieve used fuel from the brewingStand.
    • ADD_FUEL_TO_BREWINGSTAND

      public static final AIWorkerState ADD_FUEL_TO_BREWINGSTAND
      Fuel the brewingStand.
    • HARVEST_MISTLETOE

      public static final AIWorkerState HARVEST_MISTLETOE
      Harvest the mistletoes.
    • HARVEST_NETHERWART

      public static final AIWorkerState HARVEST_NETHERWART
      Harvest the netherwart.
    • CONCRETE_MIXER_PLACING

      public static final AIWorkerState CONCRETE_MIXER_PLACING
      Continues placing blocks until can't place anymore.
    • CONCRETE_MIXER_HARVESTING

      public static final AIWorkerState CONCRETE_MIXER_HARVESTING
      Harvest all blocks placed in the water.
  • Method Details

    • values

      public static AIWorkerState[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AIWorkerState valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • isOkayToEat

      public boolean isOkayToEat()
      Method to check if it is okay.
      Specified by:
      isOkayToEat in interface IAIState
      Returns:
      true if so.