Class EntityAIWorkSifter
java.lang.Object
com.minecolonies.core.entity.ai.workers.AbstractAISkeleton<J>
com.minecolonies.core.entity.ai.workers.AbstractEntityAIBasic<J,B>
com.minecolonies.core.entity.ai.workers.AbstractEntityAISkill<J,B>
com.minecolonies.core.entity.ai.workers.AbstractEntityAIInteract<J,B>
com.minecolonies.core.entity.ai.workers.crafting.AbstractEntityAICrafting<JobSifter,BuildingSifter>
com.minecolonies.core.entity.ai.workers.crafting.EntityAIWorkSifter
- All Implemented Interfaces:
ITickingStateAI
Sifter AI class.
-
Field Summary
FieldsFields inherited from class com.minecolonies.core.entity.ai.workers.crafting.AbstractEntityAICrafting
currentRecipeStorage, currentRequest, HIT_DELAY, idlePos, NO_CHANGE, PROGRESS_MULTIPLIERFields inherited from class com.minecolonies.core.entity.ai.workers.AbstractEntityAIInteract
BLOCK_MINING_DELAY, RANGE_HORIZONTAL_PICKUP, RANGE_VERTICAL_PICKUP, RENDER_META_WORKING, XP_PER_BLOCKFields inherited from class com.minecolonies.core.entity.ai.workers.AbstractEntityAIBasic
building, currentWorkingLocation, needsCurrently, NO_TOOL, REQUEST_DELAY, STANDARD_DELAY, WALK_DELAY, walkTo, workPosIndexFields inherited from class com.minecolonies.core.entity.ai.workers.AbstractAISkeleton
job, worker, world -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected IAIStatedecide()Main method to decide on what to do.protected intCalculates after how many actions the ai should dump it's inventory.Can be overridden in implementations to return the exact building type the worker expects.booleanIf the crafter should go in idle mode or not.protected IAIStatesift()The sifting process.Methods inherited from class com.minecolonies.core.entity.ai.workers.crafting.AbstractEntityAICrafting
afterDump, checkForItems, craft, executeCraftingAction, finalizeCraftingTask, getActionRewardForCraftingSuccess, getCraftingStatName, getExtendedCount, getLootContext, getLootContext, getNextCraftingState, getRecipe, getStateAfterPickUp, hitBlockWithToolInHand, idle, isAfterDumpPickupAllowed, recordCraftingBuildingStats, resetValues, updateRenderMetaDataMethods inherited from class com.minecolonies.core.entity.ai.workers.AbstractEntityAIInteract
fillItemsList, gatherItems, getBlockMiningTime, getBreakSpeedLevel, getItemsForPickUp, increaseBlockDrops, isItemWorthPickingUp, mineBlock, mineBlock, mineBlock, onBlockDropReception, resetGatheringItems, searchForItems, shouldSilkTouchBlock, triggerMinedBlockMethods inherited from class com.minecolonies.core.entity.ai.workers.AbstractEntityAIBasic
afterRequestPickUp, cancelAsynchRequestForArmor, canGoIdle, checkAndTransferFromHut, checkForToolOrWeapon, checkForToolOrWeapon, checkForToolOrWeaponAsync, checkIfNeedsItem, checkIfRequestForItemExistOrCreate, checkIfRequestForItemExistOrCreate, checkIfRequestForItemExistOrCreate, checkIfRequestForItemExistOrCreate, checkIfRequestForItemExistOrCreate, checkIfRequestForItemExistOrCreate, checkIfRequestForItemExistOrCreateAsync, checkIfRequestForItemExistOrCreateAsync, checkIfRequestForItemExistOrCreateAsync, checkIfRequestForItemExistOrCreateAsync, checkIfRequestForItemExistOrCreateAsync, checkIfRequestForTagExistOrCreateAsync, getBuildingToDump, getEffectiveSkillLevel, getExceptionTimer, getFakePlayer, getInventory, getInvertedEffectiveSkillLevel, getModuleForJob, getMostEfficientTool, getPrimarySkillLevel, getSecondarySkillLevel, getTotalRequiredAmount, getWorkingPosition, getWorkingPosition, hasNotDelayed, holdEfficientTool, incrementActionsDone, incrementActionsDone, incrementActionsDoneAndDecSaturation, inventoryNeedsDump, itemsNiceToHave, onException, resetActionsDone, retrieveToolInHut, retrieveToolInTileEntity, setDelay, takeItemStackFromProvider, waitForRequests, walkToBuilding, walkToBuilding, walkToSafePos, walkToTaggedWorkPos, walkToUnSafePos, walkToUnSafePos, walkToWorkPos, walkWithProxy, walkWithProxy, wantInventoryDumpedMethods inherited from class com.minecolonies.core.entity.ai.workers.AbstractAISkeleton
canBeInterrupted, getState, getStateAI, getTickRate, onRemoval, registerGroupTarget, registerTarget, registerTargets, resetAI, setCurrentDelay, tick
-
Field Details
-
progress
protected int progressProgress of hitting the block.
-
-
Constructor Details
-
EntityAIWorkSifter
Constructor for the sifter. Defines the tasks the cook executes.- Parameters:
job- a sifter job to use.
-
-
Method Details
-
getExpectedBuildingClass
Description copied from class:AbstractEntityAIBasicCan be overridden in implementations to return the exact building type the worker expects.- Specified by:
getExpectedBuildingClassin classAbstractEntityAIBasic<JobSifter,BuildingSifter> - Returns:
- the building type associated with this AI's worker.
-
getActionsDoneUntilDumping
protected int getActionsDoneUntilDumping()Description copied from class:AbstractEntityAIBasicCalculates after how many actions the ai should dump it's inventory.Override this to change the value.
- Overrides:
getActionsDoneUntilDumpingin classAbstractEntityAICrafting<JobSifter,BuildingSifter> - Returns:
- the number of actions done before item dump.
-
decide
Description copied from class:AbstractEntityAICraftingMain method to decide on what to do.- Overrides:
decidein classAbstractEntityAICrafting<JobSifter,BuildingSifter> - Returns:
- the next state to go to.
-
hasWorkToDo
public boolean hasWorkToDo()Description copied from class:AbstractEntityAICraftingIf the crafter should go in idle mode or not.- Overrides:
hasWorkToDoin classAbstractEntityAICrafting<JobSifter,BuildingSifter> - Returns:
- true if so.
-
sift
The sifting process.- Returns:
- the next AiState to go to.
-