Class AbstractEntityAITraining<J extends AbstractJob<?,J>,B extends AbstractBuilding>

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 Details

    • ONE_HUNDRED_PERCENT

      protected static final int ONE_HUNDRED_PERCENT
      100% chance to compare it with smaller percentages.
      See Also:
    • currentPathingTarget

      protected net.minecraft.core.BlockPos currentPathingTarget
      The current pathing target to walk to.
    • stateAfterPathing

      protected IAIState stateAfterPathing
      State to go to after pathing.
    • currentAttackDelay

      protected int currentAttackDelay
      How many more ticks we have until next attack.
  • Constructor Details

    • AbstractEntityAITraining

      public AbstractEntityAITraining(@NotNull J job)
      Creates the abstract part of the AI.inte Always use this constructor!
      Parameters:
      job - the job to fulfill
  • Method Details

    • decide

      public IAIState 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