Class EntityAIWorkNether
java.lang.Object
com.minecolonies.core.entity.ai.workers.AbstractAISkeleton<JobNetherWorker>
com.minecolonies.core.entity.ai.workers.AbstractEntityAIBasic<JobNetherWorker,BuildingNetherWorker>
com.minecolonies.core.entity.ai.workers.AbstractEntityAISkill<JobNetherWorker,BuildingNetherWorker>
com.minecolonies.core.entity.ai.workers.AbstractEntityAIInteract<JobNetherWorker,BuildingNetherWorker>
com.minecolonies.core.entity.ai.workers.crafting.AbstractEntityAICrafting<JobNetherWorker,BuildingNetherWorker>
com.minecolonies.core.entity.ai.workers.production.EntityAIWorkNether
- All Implemented Interfaces:
ITickingStateAI
public class EntityAIWorkNether
extends AbstractEntityAICrafting<JobNetherWorker,BuildingNetherWorker>
-
Field Summary
FieldsModifier and TypeFieldDescriptionList of items that are required by the guard based on building level and guard level.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 voidAttempt to eat to restore some saturationbooleanWhether the AI is allowed to be interruptedprotected voidMake sure we have all the needed adventuring supplies This is very similar to the AbstractEntityAiFight "atBuildingActions" But doesn't handle shields, and doesn't equip or leave equipped armor.protected IAIStateprotected IAIStateClose the nether portal while idle around the buildingprotected IAIStatedecide()Main method to decide on what to do.Can be overridden in implementations to return the exact building type the worker expects.The state to transform to after picking up things.booleanIf the crafter should go in idle mode or not.protected IAIStateLeave for the Nether by walking to the portal and going invisible.protected IAIStateOpen the portal to the nether if it's not openprotected IAIStateReturn from the nether by going visible, walking to building and preparing to close the portalprotected IAIStateStay "in the Nether" and process the queuesprotected voidCan be overridden in implementations.Methods inherited from class com.minecolonies.core.entity.ai.workers.crafting.AbstractEntityAICrafting
afterDump, checkForItems, craft, executeCraftingAction, finalizeCraftingTask, getActionRewardForCraftingSuccess, getActionsDoneUntilDumping, getCraftingStatName, getExtendedCount, getLootContext, getLootContext, getNextCraftingState, getRecipe, hitBlockWithToolInHand, idle, isAfterDumpPickupAllowed, recordCraftingBuildingStats, resetValuesMethods 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
getState, getStateAI, getTickRate, onRemoval, registerGroupTarget, registerTarget, registerTargets, resetAI, setCurrentDelay, tick
-
Field Details
-
itemsNeeded
List of items that are required by the guard based on building level and guard level. This array holds a pointer to the building level and then pointer to GuardGear
-
-
Constructor Details
-
EntityAIWorkNether
-
-
Method Details
-
updateRenderMetaData
protected void updateRenderMetaData()Description copied from class:AbstractEntityAIBasicCan be overridden in implementations.Here the AI can check if the chestBelt has to be re rendered and do it.
- Overrides:
updateRenderMetaDatain classAbstractEntityAICrafting<JobNetherWorker,BuildingNetherWorker>
-
hasWorkToDo
public boolean hasWorkToDo()Description copied from class:AbstractEntityAICraftingIf the crafter should go in idle mode or not.- Overrides:
hasWorkToDoin classAbstractEntityAICrafting<JobNetherWorker,BuildingNetherWorker> - Returns:
- true if so.
-
getExpectedBuildingClass
Description copied from class:AbstractEntityAIBasicCan be overridden in implementations to return the exact building type the worker expects.- Specified by:
getExpectedBuildingClassin classAbstractEntityAIBasic<JobNetherWorker,BuildingNetherWorker> - Returns:
- the building type associated with this AI's worker.
-
getStateAfterPickUp
Description copied from class:AbstractEntityAIBasicThe state to transform to after picking up things.- Overrides:
getStateAfterPickUpin classAbstractEntityAICrafting<JobNetherWorker,BuildingNetherWorker> - Returns:
- the next state to go to.
-
canBeInterrupted
public boolean canBeInterrupted()Description copied from class:AbstractAISkeletonWhether the AI is allowed to be interrupted- Overrides:
canBeInterruptedin classAbstractAISkeleton<JobNetherWorker>- Returns:
- true if can be interrupted
-
decide
Description copied from class:AbstractEntityAICraftingMain method to decide on what to do.- Overrides:
decidein classAbstractEntityAICrafting<JobNetherWorker,BuildingNetherWorker> - Returns:
- the next state to go to.
-
leaveForNether
Leave for the Nether by walking to the portal and going invisible. -
stayInNether
Stay "in the Nether" and process the queues -
returnFromNether
Return from the nether by going visible, walking to building and preparing to close the portal -
openPortal
Open the portal to the nether if it's not open -
closePortal
Close the nether portal while idle around the building -
attemptToEat
protected void attemptToEat()Attempt to eat to restore some saturation -
checkAndRequestArmor
protected void checkAndRequestArmor()Make sure we have all the needed adventuring supplies This is very similar to the AbstractEntityAiFight "atBuildingActions" But doesn't handle shields, and doesn't equip or leave equipped armor. -
checkAndRequestFood
-