Class EntityAIWorkBaker
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<J,B>
com.minecolonies.core.entity.ai.workers.crafting.AbstractEntityAIRequestSmelter<JobBaker,BuildingBaker>
com.minecolonies.core.entity.ai.workers.crafting.EntityAIWorkBaker
- All Implemented Interfaces:
ITickingStateAI
Baker AI class.
-
Field Summary
Fields inherited from class com.minecolonies.core.entity.ai.workers.crafting.AbstractEntityAICrafting
currentRecipeStorage, currentRequest, HIT_DELAY, idlePos, MAX_LEVEL, 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 IAIStatecraft()The actual crafting logic.@Nullable AbstractEntityCitizenReturns the bakery's worker instance.Can be overridden in implementations to return the exact building type the worker expects.protected StringReturns the name of the smelting stat that is used in the building's statistics.booleanChecks whether automatic pickups after dumps are allowed.Methods inherited from class com.minecolonies.core.entity.ai.workers.crafting.AbstractEntityAIRequestSmelter
executeCraftingAction, getExtendedCount, recordSmeltingBuildingStatsMethods inherited from class com.minecolonies.core.entity.ai.workers.crafting.AbstractEntityAICrafting
afterDump, checkForItems, decide, finalizeCraftingTask, getActionRewardForCraftingSuccess, getActionsDoneUntilDumping, getCraftingStatName, getLootContext, getLootContext, getNextCraftingState, getRecipe, getStateAfterPickUp, hasWorkToDo, hitBlockWithToolInHand, idle, 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
-
Constructor Details
-
EntityAIWorkBaker
Constructor for the Baker. Defines the tasks the bakery executes.- Parameters:
job- a bakery 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<JobBaker,BuildingBaker> - Returns:
- the building type associated with this AI's worker.
-
getCitizen
Returns the bakery's worker instance. Called from outside this class.- Returns:
- citizen object.
-
craft
Description copied from class:AbstractEntityAICraftingThe actual crafting logic.- Overrides:
craftin classAbstractEntityAICrafting<JobBaker,BuildingBaker> - Returns:
- the next state to go to.
-
isAfterDumpPickupAllowed
public boolean isAfterDumpPickupAllowed()Description copied from class:AbstractEntityAIBasicChecks whether automatic pickups after dumps are allowed. Usually we want this, but if the worker is currently crafting/building, he will handle deliveries/afterdumps in their resolvers, so we can disable automatic pickups in that time. Note that this is just a efficiency-thing. It doesn't hurt when the dman does a pickup during crafting, it's just a wasted run. Therefore, this flag is only considered for *automatic* pickups after dump. It is *ignored* for player-triggered forcePickups, and when the inventory is full.- Overrides:
isAfterDumpPickupAllowedin classAbstractEntityAICrafting<JobBaker,BuildingBaker> - Returns:
- true if after-dump pickups are allowed currently.
-
getSmeltingStatName
Returns the name of the smelting stat that is used in the building's statistics.- Overrides:
getSmeltingStatNamein classAbstractEntityAIRequestSmelter<JobBaker,BuildingBaker> - Returns:
- the name of the smelting stat.
-