Class AbstractEntityAIRequestSmelter<J extends AbstractJobCrafter<?,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.crafting.AbstractEntityAICrafting<J,B>
com.minecolonies.core.entity.ai.workers.crafting.AbstractEntityAIRequestSmelter<J,B>
- All Implemented Interfaces:
ITickingStateAI
- Direct Known Subclasses:
EntityAIWorkBaker,EntityAIWorkChef,EntityAIWorkDyer,EntityAIWorkGlassblower,EntityAIWorkStoneSmeltery
public abstract class AbstractEntityAIRequestSmelter<J extends AbstractJobCrafter<?,J>,B extends AbstractBuilding>
extends AbstractEntityAICrafting<J,B>
Crafts furnace stone related block when needed.
-
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, walkTo, workPosIndexFields inherited from class com.minecolonies.core.entity.ai.workers.AbstractAISkeleton
job, worker, world -
Constructor Summary
ConstructorsConstructorDescriptionAbstractEntityAIRequestSmelter(J smelteryJob) Initialize the stone smeltery and add all his tasks. -
Method Summary
Modifier and TypeMethodDescriptionexecuteCraftingAction(int toolSlot) Execute the actual crafting action.protected intgetExtendedCount(net.minecraft.world.item.ItemStack stack) Get an extended count that can be overriden.protected StringReturns the name of the smelting stat that is used in the building's statistics.protected voidrecordSmeltingBuildingStats(net.minecraft.network.chat.Component hoverName, int count) Records the smelting request in the building's statistics.Methods inherited from class com.minecolonies.core.entity.ai.workers.crafting.AbstractEntityAICrafting
afterDump, checkForItems, craft, decide, finalizeCraftingTask, getActionRewardForCraftingSuccess, getActionsDoneUntilDumping, getCraftingStatName, getLootContext, getLootContext, getNextCraftingState, getRecipe, getStateAfterPickUp, hasWorkToDo, 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, getExpectedBuildingClass, 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
-
AbstractEntityAIRequestSmelter
Initialize the stone smeltery and add all his tasks.- Parameters:
smelteryJob- the job he has.
-
-
Method Details
-
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<J extends AbstractJobCrafter<?,J>, B extends AbstractBuilding> - Parameters:
stack- the stack to add.- Returns:
- the additional quantities (for example in a furnace).
-
executeCraftingAction
Description copied from class:AbstractEntityAICraftingExecute the actual crafting action.- Overrides:
executeCraftingActionin classAbstractEntityAICrafting<J extends AbstractJobCrafter<?,J>, B extends AbstractBuilding> - Parameters:
toolSlot- the tool slot to consider.- Returns:
- the next state to go to.
-
getSmeltingStatName
Returns the name of the smelting stat that is used in the building's statistics. Override this in your subclass to change the description of the smelting stat.- Returns:
- the name of the smelting stat.
-
recordSmeltingBuildingStats
protected void recordSmeltingBuildingStats(net.minecraft.network.chat.Component hoverName, int count) Records the smelting request in the building's statistics. Override this in your subclass to change the description of the smelting stat.- Parameters:
hoverName- the stack name.count- the stack count.
-