Class AbstractEntityAITraining<J extends AbstractJob<?,J>,B extends AbstractBuilding>
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.guard.training.AbstractEntityAITraining<J,B>
- All Implemented Interfaces:
ITickingStateAI
- Direct Known Subclasses:
EntityAIArcherTraining,EntityAICombatTraining
public abstract class AbstractEntityAITraining<J extends AbstractJob<?,J>,B extends AbstractBuilding>
extends AbstractEntityAIInteract<J,B>
Abstract class for all training AIs.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intHow many more ticks we have until next attack.protected net.minecraft.core.BlockPosThe current pathing target to walk to.protected static final int100% chance to compare it with smaller percentages.protected IAIStateState to go to after pathing.Fields 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
ConstructorsConstructorDescriptionCreates the abstract part of the AI.inte Always use this constructor! -
Method Summary
Methods 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
afterDump, afterRequestPickUp, cancelAsynchRequestForArmor, canGoIdle, checkAndTransferFromHut, checkForToolOrWeapon, checkForToolOrWeapon, checkForToolOrWeaponAsync, checkIfNeedsItem, checkIfRequestForItemExistOrCreate, checkIfRequestForItemExistOrCreate, checkIfRequestForItemExistOrCreate, checkIfRequestForItemExistOrCreate, checkIfRequestForItemExistOrCreate, checkIfRequestForItemExistOrCreate, checkIfRequestForItemExistOrCreateAsync, checkIfRequestForItemExistOrCreateAsync, checkIfRequestForItemExistOrCreateAsync, checkIfRequestForItemExistOrCreateAsync, checkIfRequestForItemExistOrCreateAsync, checkIfRequestForTagExistOrCreateAsync, getActionsDoneUntilDumping, getBuildingToDump, getEffectiveSkillLevel, getExceptionTimer, getExpectedBuildingClass, getFakePlayer, getInventory, getInvertedEffectiveSkillLevel, getModuleForJob, getMostEfficientTool, getPrimarySkillLevel, getSecondarySkillLevel, getStateAfterPickUp, getTotalRequiredAmount, getWorkingPosition, getWorkingPosition, hasNotDelayed, holdEfficientTool, incrementActionsDone, incrementActionsDone, incrementActionsDoneAndDecSaturation, inventoryNeedsDump, isAfterDumpPickupAllowed, itemsNiceToHave, onException, resetActionsDone, retrieveToolInHut, retrieveToolInTileEntity, setDelay, takeItemStackFromProvider, updateRenderMetaData, 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
-
ONE_HUNDRED_PERCENT
protected static final int ONE_HUNDRED_PERCENT100% chance to compare it with smaller percentages.- See Also:
-
currentPathingTarget
protected net.minecraft.core.BlockPos currentPathingTargetThe current pathing target to walk to. -
stateAfterPathing
State to go to after pathing. -
currentAttackDelay
protected int currentAttackDelayHow many more ticks we have until next attack.
-
-
Constructor Details
-
AbstractEntityAITraining
Creates the abstract part of the AI.inte Always use this constructor!- Parameters:
job- the job to fulfill
-
-
Method Details
-
decide
Decide on which state to go to.- Returns:
- the next state to go to.
-
isSetup
protected abstract boolean isSetup()Method to check if the worker is ready to start.- Returns:
- true if so.
-
reduceAttackDelay
protected void reduceAttackDelay()Reduces the attack delay by the given Tickrate
-