Enum Class AIWorkerState
- All Implemented Interfaces:
IAIState,IState,Serializable,Comparable<AIWorkerState>,Constable
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionFuel the brewingStand.Fuel the furnaceCheck the shot result.Find a good position to shoot from.Select a random target.Archer shoot target.Bake the dough.Finish up the product.Knead the dough.Take the product out of the oven.Break down ores.Creates the solid structure.Bury the citizenFind the position to train from.Completes the building.Fill up the barrelsTake the compost from the barrelsHarvest all blocks placed in the water.Continues placing blocks until can't place anymore.Serve food to the citizens inside the building.Serve food to the players inside the building.Milk cows!Milk mooshrooms!Execute the crafting action.Let the crusher crush blocks.Decide what AIstate to go to next.Delivery required items or tools.Dig The graveDump inventory over chests in warehouse.Empty The graveEnchant ancient tome.Let the enchanter gather experience.Harvest the crops.Hoe the field.Plant the seeds.smelter smelts ore until its a bar.Find dummy to attackFind a training partnerThe fisherman is looking for water.The fisherman has found water and can start fishing.Let the florist compost the block.Let the florist harvest a flower.Gathering ore from his building.Gather materials from the buildingGet the recipe.Go to the shooting position.Physically attack the target.Allow the guard to protect himself.Use a ranged attack against the target.Decision state for guards.Flee to work building.Follow a player.Guard a position.Patrol through the village.Regen at the building.Sleeping on dutyWake up another guardHarvest the mistletoes.Harvest the netherwart.Helping out a citizen in dangerBreed two animals together.Butcher an animal.Feed animals.Bring mounts to the stable!Pickup items within area.Get mounts ready for combat!Train mounts!this is the idle state for the ai.This state is only used on ai initialization.Inventory has to be dumped.Guard attack a dummy.Attack protect in a certain direction.Attack the training partner.Load the structure and requirements.The lumberjack has found trees and can start cutting them.The Lumberjack is gathering saplings.The Lumberjack is gathering saplings (second pass).There are no trees in his search range.The lumberjack is looking for trees.The lumberjack is starting up his/her routine.Mine a block.The Miner builds his shaft.Check if there is a mineshaft.The Miner mines one node.The Miner mines his shaft.The Miner repairs its ladder.The Miner walks to the ladder.The ai needs some items it is waiting for.Let the nether worker return from the trip.Let the nether worker close the portal to the netherLet the nether worker start out on the trip.Let the nether worker open the portal to the netherLet the nether worker return from the trip.Do not work, can be used for freetime activities.Pick up all materials he might need.Pickup unneeded items from buildings.Get stuff from the warehouse.Check for all required items.Query the required items for a recipe.Retrieve the ore from the brewingStand.Retrieve the ore from the furnace.Retrieve unrelated product from furnace.Retrieve used fuel from the brewingStand.Retrieve used fuel from the furnace.Shear a sheep!Let the sifter sieve blocks.Start building a StructureIterator.brews potions until.Start working by walking to the building.Attempt Resurrect -
Method Summary
Modifier and TypeMethodDescriptionbooleanMethod to check if it is okay.static AIWorkerStateReturns the enum constant of this class with the specified name.static AIWorkerState[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
This state is only used on ai initialization. It checks if any important things are null. -
INVENTORY_FULL
Inventory has to be dumped. -
PREPARING
Check for all required items. -
START_WORKING
Start working by walking to the building. -
NEEDS_ITEM
The ai needs some items it is waiting for. -
START_BUILDING
Start building a StructureIterator. -
MINE_BLOCK
Mine a block. -
LOAD_STRUCTURE
Load the structure and requirements. -
BUILDING_STEP
Creates the solid structure. -
COMPLETE_BUILD
Completes the building. -
DECIDE
Decide what AIstate to go to next. -
PAUSED
Do not work, can be used for freetime activities. -
FISHERMAN_SEARCHING_WATER
The fisherman is looking for water. -
FISHERMAN_WALKING_TO_WATER
The fisherman has found water and can start fishing. -
FISHERMAN_CHECK_WATER
-
FISHERMAN_START_FISHING
-
LUMBERJACK_START_WORKING
The lumberjack is starting up his/her routine. -
LUMBERJACK_SEARCHING_TREE
The lumberjack is looking for trees. -
LUMBERJACK_CHOP_TREE
The lumberjack has found trees and can start cutting them. -
LUMBERJACK_GATHERING
The Lumberjack is gathering saplings. -
LUMBERJACK_NO_TREES_FOUND
There are no trees in his search range. -
LUMBERJACK_GATHERING_2
The Lumberjack is gathering saplings (second pass). -
MINER_CHECK_MINESHAFT
Check if there is a mineshaft. -
MINER_WALKING_TO_LADDER
The Miner walks to the ladder. -
MINER_REPAIRING_LADDER
The Miner repairs its ladder. -
MINER_MINING_SHAFT
The Miner mines his shaft. -
MINER_BUILDING_SHAFT
The Miner builds his shaft. -
MINER_MINING_NODE
The Miner mines one node. -
PICK_UP
Pick up all materials he might need. -
FARMER_HOE
Hoe the field. -
FARMER_PLANT
Plant the seeds. -
FARMER_HARVEST
Harvest the crops. -
EMPTY_GRAVE
Empty The grave -
DIG_GRAVE
Dig The grave -
BURY_CITIZEN
Bury the citizen -
TRY_RESURRECT
Attempt Resurrect -
GUARD_DECIDE
Decision state for guards. -
GUARD_ATTACK_PHYSICAL
Physically attack the target. -
GUARD_ATTACK_RANGED
Use a ranged attack against the target. -
GUARD_ATTACK_PROTECT
Allow the guard to protect himself. -
GUARD_PATROL
Patrol through the village. -
GUARD_SLEEP
Sleeping on duty -
GUARD_WAKE
Wake up another guard -
GUARD_FOLLOW
Follow a player. -
GUARD_GUARD
Guard a position. -
GUARD_REGEN
Regen at the building. -
GUARD_FLEE
Flee to work building. -
HELP_CITIZEN
Helping out a citizen in danger -
PREPARE_DELIVERY
Get stuff from the warehouse. -
DELIVERY
Delivery required items or tools. -
PICKUP
Pickup unneeded items from buildings. -
DUMPING
Dump inventory over chests in warehouse. -
BAKER_KNEADING
Knead the dough. -
BAKER_BAKING
Bake the dough. -
BAKER_FINISHING
Finish up the product. -
BAKER_TAKE_OUT_OF_OVEN
Take the product out of the oven. -
FILL_UP_FURNACES
smelter smelts ore until its a bar. -
GATHERING_REQUIRED_MATERIALS
Gathering ore from his building. -
RETRIEVING_END_PRODUCT_FROM_FURNACE
Retrieve the ore from the furnace. -
RETRIEVING_UNRELATED_PRODUCT_FROM_FURNACE
Retrieve unrelated product from furnace. -
RETRIEVING_USED_FUEL_FROM_FURNACE
Retrieve used fuel from the furnace. -
ADD_FUEL_TO_FURNACE
Fuel the furnace -
BREAK_ORES
Break down ores. -
COOK_SERVE_FOOD_TO_CITIZEN
Serve food to the citizens inside the building. -
COOK_SERVE_FOOD_TO_PLAYER
Serve food to the players inside the building. -
HERDER_BREED
Breed two animals together. -
HERDER_BUTCHER
Butcher an animal. -
HERDER_PICKUP
Pickup items within area. -
HERDER_FEED
Feed animals. -
HERDER_TRAIN
Train mounts! -
HERDER_READY_FOR_COMBAT
Get mounts ready for combat! -
HERDER_GATHER_MOUNTS
Bring mounts to the stable! -
COWBOY_MILK
Milk cows! -
COWBOY_STEW
Milk mooshrooms! -
SHEPHERD_SHEAR
Shear a sheep! -
COMPOSTER_FILL
Fill up the barrels -
COMPOSTER_HARVEST
Take the compost from the barrels -
GET_MATERIALS
Gather materials from the building -
STUDY
-
TRAINING_WANDER
-
GO_TO_TARGET
Go to the shooting position. -
COMBAT_TRAINING
Find the position to train from. -
ARCHER_FIND_SHOOTING_STAND_POSITION
Find a good position to shoot from. -
ARCHER_SELECT_TARGET
Select a random target. -
ARCHER_CHECK_SHOT
Check the shot result. -
ARCHER_SHOOT
Archer shoot target. -
KNIGHT_ATTACK_DUMMY
Guard attack a dummy. -
FIND_DUMMY_PARTNER
Find dummy to attack -
FIND_TRAINING_PARTNER
Find a training partner -
KNIGHT_TRAIN_WITH_PARTNER
Attack the training partner. -
KNIGHT_ATTACK_PROTECT
Attack protect in a certain direction. -
GET_RECIPE
Get the recipe. -
QUERY_ITEMS
Query the required items for a recipe. -
CRAFT
Execute the crafting action. -
CRUSH
Let the crusher crush blocks. -
SIFT
Let the sifter sieve blocks. -
NETHER_LEAVE
Let the nether worker start out on the trip. -
NETHER_AWAY
Let the nether worker return from the trip. -
NETHER_RETURN
Let the nether worker return from the trip. -
NETHER_OPENPORTAL
Let the nether worker open the portal to the nether -
NETHER_CLOSEPORTAL
Let the nether worker close the portal to the nether -
FLORIST_HARVEST
Let the florist harvest a flower. -
FLORIST_COMPOST
Let the florist compost the block. -
ENCHANTER_DRAIN
Let the enchanter gather experience. -
ENCHANT
Enchant ancient tome. -
REQUEST_CURE
-
CURE
-
WANDER
-
FREE_CURE
-
CURE_PLAYER
-
TEACH
-
RECESS
-
PLANTATION_PICK_FIELD
-
PLANTATION_MOVE_TO_FIELD
-
PLANTATION_DECIDE_FIELD_WORK
-
PLANTATION_WORK_FIELD
-
PLANTATION_RETURN_TO_BUILDING
-
BEEKEEPER_HARVEST
-
START_USING_BREWINGSTAND
brews potions until. -
RETRIEVING_END_PRODUCT_FROM_BREWINGSTAMD
Retrieve the ore from the brewingStand. -
RETRIEVING_USED_FUEL_FROM_BREWINGSTAND
Retrieve used fuel from the brewingStand. -
ADD_FUEL_TO_BREWINGSTAND
Fuel the brewingStand. -
HARVEST_MISTLETOE
Harvest the mistletoes. -
HARVEST_NETHERWART
Harvest the netherwart. -
CONCRETE_MIXER_PLACING
Continues placing blocks until can't place anymore. -
CONCRETE_MIXER_HARVESTING
Harvest all blocks placed in the water.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
isOkayToEat
public boolean isOkayToEat()Method to check if it is okay.- Specified by:
isOkayToEatin interfaceIAIState- Returns:
- true if so.
-