Class EntityAIWorkSmelter
java.lang.Object
com.minecolonies.core.entity.ai.workers.AbstractAISkeleton<JobSmelter>
com.minecolonies.core.entity.ai.workers.AbstractEntityAIBasic<JobSmelter,BuildingSmeltery>
com.minecolonies.core.entity.ai.workers.AbstractEntityAISkill<JobSmelter,BuildingSmeltery>
com.minecolonies.core.entity.ai.workers.AbstractEntityAIUsesFurnace<JobSmelter,BuildingSmeltery>
com.minecolonies.core.entity.ai.workers.crafting.EntityAIWorkSmelter
- All Implemented Interfaces:
ITickingStateAI
Smelter AI class.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringValue to identify the list of filterable ores.Fields 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 IAIStateCheck for important jobs to execute before the traditional furnace user jobs are handled.protected voidextractFromFurnace(net.minecraft.world.level.block.entity.FurnaceBlockEntity furnace) Gather bars from the furnace and double or triple them by chance.Can be overridden in implementations to return the exact building type the worker expects.protected IRequestableSmeltabel the worker requires.protected booleanisSmeltable(net.minecraft.world.item.ItemStack stack) Check if a stack is a smeltable ore.voidRequest the smeltable item to the building.Methods inherited from class com.minecolonies.core.entity.ai.workers.AbstractEntityAIUsesFurnace
checkForAdditionalJobs, getActionsDoneUntilDumping, getPositionOfOvenToRetrieveFrom, getPositionOfOvenToRetrieveFuelFrom, reachedMaxToKeep, startWorkingMethods 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, 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
-
ORE_LIST
Value to identify the list of filterable ores.- See Also:
-
-
Constructor Details
-
EntityAIWorkSmelter
Constructor for the Smelter. Defines the tasks the cook executes.- Parameters:
job- a cook 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<JobSmelter,BuildingSmeltery> - Returns:
- the building type associated with this AI's worker.
-
extractFromFurnace
protected void extractFromFurnace(net.minecraft.world.level.block.entity.FurnaceBlockEntity furnace) Gather bars from the furnace and double or triple them by chance.- Specified by:
extractFromFurnacein classAbstractEntityAIUsesFurnace<JobSmelter,BuildingSmeltery> - Parameters:
furnace- the furnace to retrieve from.
-
getSmeltAbleClass
Description copied from class:AbstractEntityAIUsesFurnaceSmeltabel the worker requires. Each worker has to override this.- Specified by:
getSmeltAbleClassin classAbstractEntityAIUsesFurnace<JobSmelter,BuildingSmeltery> - Returns:
- the type of it.
-
checkForImportantJobs
Description copied from class:AbstractEntityAIUsesFurnaceCheck for important jobs to execute before the traditional furnace user jobs are handled.- Overrides:
checkForImportantJobsin classAbstractEntityAIUsesFurnace<JobSmelter,BuildingSmeltery> - Returns:
- the next IAIState to go to.
-
isSmeltable
protected boolean isSmeltable(net.minecraft.world.item.ItemStack stack) Check if a stack is a smeltable ore.- Specified by:
isSmeltablein classAbstractEntityAIUsesFurnace<JobSmelter,BuildingSmeltery> - Parameters:
stack- the stack to test.- Returns:
- true if so.
-
requestSmeltable
public void requestSmeltable()Description copied from class:AbstractEntityAIUsesFurnaceRequest the smeltable item to the building. Specific worker has to override this.- Specified by:
requestSmeltablein classAbstractEntityAIUsesFurnace<JobSmelter,BuildingSmeltery>
-