Class TickingTransition<S extends IState>

java.lang.Object
com.minecolonies.api.entity.ai.statemachine.basestatemachine.BasicTransition<S>
com.minecolonies.api.entity.ai.statemachine.tickratestatemachine.TickingTransition<S>
All Implemented Interfaces:
ITickingTransition<S>, IStateMachineTransition<S>
Direct Known Subclasses:
AITarget, TickingEvent

public class TickingTransition<S extends IState> extends BasicTransition<S> implements ITickingTransition<S>
Transition with tickrate logic, allows to define an intended tickrate at which this transition will be checked.
  • Constructor Details

    • TickingTransition

      public TickingTransition(@NotNull S state, @NotNull @NotNull IBooleanConditionSupplier condition, @NotNull @NotNull IStateSupplier<S> nextState, int tickRate)
      Create a new Transition with tickrate
      Parameters:
      state - State to apply the transition in
      condition - Condition checked before going to the next state
      nextState - The next state this transition leads into
      tickRate - The expected tickrate at which this transition should be checked.
    • TickingTransition

      public TickingTransition(@NotNull @NotNull IBooleanConditionSupplier condition, @NotNull @NotNull IStateSupplier<S> nextState, int tickRate)
      Create a new Transition with tickrate
      Parameters:
      condition - Condition checked before going to the next state
      nextState - The next state this transition leads into
      tickRate - The expected tickrate at which this transition should be checked.
  • Method Details