Class EntityAIWorkCowboy
java.lang.Object
com.minecolonies.core.entity.ai.workers.AbstractAISkeleton<JobCowboy>
com.minecolonies.core.entity.ai.workers.AbstractEntityAIBasic<JobCowboy,BuildingCowboy>
com.minecolonies.core.entity.ai.workers.AbstractEntityAISkill<JobCowboy,BuildingCowboy>
com.minecolonies.core.entity.ai.workers.AbstractEntityAIInteract<JobCowboy,BuildingCowboy>
com.minecolonies.core.entity.ai.workers.production.herders.AbstractEntityAIHerder<JobCowboy,BuildingCowboy>
com.minecolonies.core.entity.ai.workers.production.herders.EntityAIWorkCowboy
- All Implemented Interfaces:
ITickingStateAI
The AI behind the
JobCowboy for Breeding, Killing and Milking Cows.-
Field Summary
FieldsFields inherited from class com.minecolonies.core.entity.ai.workers.production.herders.AbstractEntityAIHerder
BUTCHERING_ATTACK_DAMAGE, current_module, LIMIT_TO_FEED_CHILDREN, XP_PER_ACTIONFields 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
ConstructorsConstructorDescriptionEntityAIWorkCowboy(@NotNull JobCowboy job) Creates the abstract part of the AI. -
Method Summary
Modifier and TypeMethodDescriptionprotected IAIStateBreed some animals together.protected IAIStateButcher some animals (Preferably Adults and not recently fed) that the herder looks after.Decides what job the herder should switch to, breeding or Butchering.doubleGet the attack damage to be used.Can be overridden in implementations to return the exact building type the worker expects.Get the extra items needed for this job.protected voidCan be overridden in implementations.Methods inherited from class com.minecolonies.core.entity.ai.workers.production.herders.AbstractEntityAIHerder
butcherAnimal, butcherSwing, canBreedChildren, chanceToButcher, equipItem, equipTool, feedAnimal, getActionsDoneUntilDumping, getExtraToolsNeeded, getItemSlot, getMaxAnimalMultiplier, getRequestBreedingItems, isBreedAble, isFeedAble, itemsNiceToHave, searchForAnimals, searchForItemsInArea, walkingToAnimalMethods 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, getBuildingToDump, getEffectiveSkillLevel, getExceptionTimer, getFakePlayer, getInventory, getInvertedEffectiveSkillLevel, getModuleForJob, getMostEfficientTool, getPrimarySkillLevel, getSecondarySkillLevel, getStateAfterPickUp, getTotalRequiredAmount, getWorkingPosition, getWorkingPosition, hasNotDelayed, holdEfficientTool, incrementActionsDone, incrementActionsDone, incrementActionsDoneAndDecSaturation, inventoryNeedsDump, isAfterDumpPickupAllowed, 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
-
RENDER_META_BUCKET
Bucket metadata.- See Also:
-
RENDER_META_BOWL
- See Also:
-
-
Constructor Details
-
EntityAIWorkCowboy
Creates the abstract part of the AI. Always use this constructor!- Parameters:
job- the job to fulfill
-
-
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 classAbstractEntityAIBasic<JobCowboy,BuildingCowboy>
-
getExpectedBuildingClass
Description copied from class:AbstractEntityAIBasicCan be overridden in implementations to return the exact building type the worker expects.- Specified by:
getExpectedBuildingClassin classAbstractEntityAIBasic<JobCowboy,BuildingCowboy> - Returns:
- the building type associated with this AI's worker.
-
decideWhatToDo
Description copied from class:AbstractEntityAIHerderDecides what job the herder should switch to, breeding or Butchering.- Overrides:
decideWhatToDoin classAbstractEntityAIHerder<JobCowboy,BuildingCowboy> - Returns:
- The next
IAIStatethe herder should switch to, after executing this method.
-
getExtraItemsNeeded
Description copied from class:AbstractEntityAIHerderGet the extra items needed for this job.- Overrides:
getExtraItemsNeededin classAbstractEntityAIHerder<JobCowboy,BuildingCowboy> - Returns:
- a list of items needed or empty.
-
getButcheringAttackDamage
public double getButcheringAttackDamage()Description copied from class:AbstractEntityAIHerderGet the attack damage to be used.- Overrides:
getButcheringAttackDamagein classAbstractEntityAIHerder<JobCowboy,BuildingCowboy> - Returns:
- the attack damage.
-
breedAnimals
Description copied from class:AbstractEntityAIHerderBreed some animals together.- Overrides:
breedAnimalsin classAbstractEntityAIHerder<JobCowboy,BuildingCowboy> - Returns:
- The next
IAIState.
-
butcherAnimals
Description copied from class:AbstractEntityAIHerderButcher some animals (Preferably Adults and not recently fed) that the herder looks after.- Overrides:
butcherAnimalsin classAbstractEntityAIHerder<JobCowboy,BuildingCowboy> - Returns:
- The next
IAIState.
-