Class EntityAIWorkAlchemist
java.lang.Object
com.minecolonies.core.entity.ai.workers.AbstractAISkeleton<JobAlchemist>
com.minecolonies.core.entity.ai.workers.AbstractEntityAIBasic<JobAlchemist,BuildingAlchemist>
com.minecolonies.core.entity.ai.workers.AbstractEntityAISkill<JobAlchemist,BuildingAlchemist>
com.minecolonies.core.entity.ai.workers.AbstractEntityAIInteract<JobAlchemist,BuildingAlchemist>
com.minecolonies.core.entity.ai.workers.crafting.AbstractEntityAICrafting<JobAlchemist,BuildingAlchemist>
com.minecolonies.core.entity.ai.workers.crafting.EntityAIWorkAlchemist
- All Implemented Interfaces:
ITickingStateAI
Crafts brewing recipes.
-
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, workPosIndexFields inherited from class com.minecolonies.core.entity.ai.workers.AbstractAISkeleton
job, worker, world -
Constructor Summary
ConstructorsConstructorDescriptionEntityAIWorkAlchemist(@NotNull JobAlchemist alchemistJob) Initialize the stone smeltery and add all his tasks. -
Method Summary
Modifier and TypeMethodDescriptionprotected IAIStatecheckForItems(@NotNull IRecipeStorage storage) Check for all items of the required recipe.protected IAIStatecraft()The actual crafting logic.protected IAIStatedecide()Main method to decide on what to do.Can be overridden in implementations to return the exact building type the worker expects.protected intgetExtendedCount(net.minecraft.world.item.ItemStack stack) Get an extended count that can be overriden.protected IAIStateQuery the IRecipeStorage of the first request in the queue.booleanIf the crafter should go in idle mode or not.Methods inherited from class com.minecolonies.core.entity.ai.workers.crafting.AbstractEntityAICrafting
afterDump, executeCraftingAction, finalizeCraftingTask, getActionRewardForCraftingSuccess, getActionsDoneUntilDumping, getCraftingStatName, getLootContext, getLootContext, getNextCraftingState, 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
-
Constructor Details
-
EntityAIWorkAlchemist
Initialize the stone smeltery and add all his tasks.- Parameters:
alchemistJob- the job he has.
-
-
Method Details
-
decide
Description copied from class:AbstractEntityAICraftingMain method to decide on what to do.- Overrides:
decidein classAbstractEntityAICrafting<JobAlchemist,BuildingAlchemist> - Returns:
- the next state to go to.
-
getExpectedBuildingClass
Description copied from class:AbstractEntityAIBasicCan be overridden in implementations to return the exact building type the worker expects.- Specified by:
getExpectedBuildingClassin classAbstractEntityAIBasic<JobAlchemist,BuildingAlchemist> - Returns:
- the building type associated with this AI's worker.
-
getExtendedCount
protected int getExtendedCount(net.minecraft.world.item.ItemStack stack) Description copied from class:AbstractEntityAICraftingGet an extended count that can be overriden.- Overrides:
getExtendedCountin classAbstractEntityAICrafting<JobAlchemist,BuildingAlchemist> - Parameters:
stack- the stack to add.- Returns:
- the additional quantities (for example in a furnace).
-
getRecipe
Description copied from class:AbstractEntityAICraftingQuery the IRecipeStorage of the first request in the queue.- Overrides:
getRecipein classAbstractEntityAICrafting<JobAlchemist,BuildingAlchemist> - Returns:
- the next state to go to.
-
checkForItems
Description copied from class:AbstractEntityAICraftingCheck for all items of the required recipe.- Overrides:
checkForItemsin classAbstractEntityAICrafting<JobAlchemist,BuildingAlchemist> - Parameters:
storage- the recipe storage.- Returns:
- the next state to go to.
-
craft
Description copied from class:AbstractEntityAICraftingThe actual crafting logic.- Overrides:
craftin classAbstractEntityAICrafting<JobAlchemist,BuildingAlchemist> - 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<JobAlchemist,BuildingAlchemist> - Returns:
- true if so.
-