Class BasicEvent
java.lang.Object
com.minecolonies.api.entity.ai.statemachine.basestatemachine.BasicTransition<IAIState>
com.minecolonies.api.entity.ai.statemachine.basestatemachine.BasicEvent
- All Implemented Interfaces:
IStateMachineEvent<IAIState>,IStateMachineTransition<IAIState>
Basic event for statemachines, consists of a condition and a statesupplier to transition the statemachine into. Events are always executed before any state transitions happen.
-
Constructor Summary
ConstructorsConstructorDescriptionBasicEvent(@NotNull IStateEventType eventType, @NotNull IBooleanConditionSupplier condition, @NotNull IStateSupplier<IAIState> nextState) -
Method Summary
Methods inherited from class com.minecolonies.api.entity.ai.statemachine.basestatemachine.BasicTransition
checkCondition, getMethodName, getName, getNextState, withNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.minecolonies.api.entity.ai.statemachine.transitions.IStateMachineTransition
checkCondition, getName, getNextState, withName
-
Constructor Details
-
BasicEvent
public BasicEvent(@NotNull @NotNull IStateEventType eventType, @NotNull @NotNull IBooleanConditionSupplier condition, @NotNull @NotNull IStateSupplier<IAIState> nextState)
-
-
Method Details
-
getEventType
Get the Eventtype- Specified by:
getEventTypein interfaceIStateMachineEvent<IAIState>- Returns:
- IAIEventType
-
getState
Events do not have a state- Specified by:
getStatein interfaceIStateMachineTransition<IAIState>- Overrides:
getStatein classBasicTransition<IAIState>- Returns:
- IAIState
-