Class AbstractEntityAIRequestSmelter<J extends AbstractJobCrafter<?,J>,B extends AbstractBuilding>

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.
  • Constructor Details

    • AbstractEntityAIRequestSmelter

      public AbstractEntityAIRequestSmelter(@NotNull J smelteryJob)
      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: AbstractEntityAICrafting
      Get an extended count that can be overriden.
      Overrides:
      getExtendedCount in class AbstractEntityAICrafting<J extends AbstractJobCrafter<?,J>,B extends AbstractBuilding>
      Parameters:
      stack - the stack to add.
      Returns:
      the additional quantities (for example in a furnace).
    • executeCraftingAction

      public IAIState executeCraftingAction(int toolSlot)
      Description copied from class: AbstractEntityAICrafting
      Execute the actual crafting action.
      Overrides:
      executeCraftingAction in class AbstractEntityAICrafting<J extends AbstractJobCrafter<?,J>,B extends AbstractBuilding>
      Parameters:
      toolSlot - the tool slot to consider.
      Returns:
      the next state to go to.
    • getSmeltingStatName

      protected String 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.