Record Class StateTransitionController.PrioritisedActionList
java.lang.Object
java.lang.Record
com.hypixel.hytale.server.npc.statetransition.StateTransitionController.PrioritisedActionList
- All Implemented Interfaces:
RoleStateChange,StateTransitionController.IActionListHolder
- Enclosing class:
StateTransitionController
private static record StateTransitionController.PrioritisedActionList(int priority, ActionList actionList)
extends Record
implements StateTransitionController.IActionListHolder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ActionListThe field for theactionListrecord component.private final intThe field for thepriorityrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivatePrioritisedActionList(int priority, ActionList actionList) Creates an instance of aPrioritisedActionListrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theactionListrecord component.booleancanExecute(Ref<EntityStore> ref, Role role, InfoProvider sensorInfo, double dt, Store<EntityStore> store) voidfinal booleanIndicates whether some other object is "equal to" this one.booleanexecute(Ref<EntityStore> ref, Role role, InfoProvider sensorInfo, double dt, Store<EntityStore> store) booleanfinal inthashCode()Returns a hash code value for this object.voidvoidmotionControllerChanged(Ref<EntityStore> ref, NPCEntity npcComponent, com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, ComponentAccessor<EntityStore> componentAccessor) intpriority()Returns the value of thepriorityrecord component.voidregisterWithSupport(Role role) voidvoidvoidteleported(Role role, World from, World to) final StringtoString()Returns a string representation of this record class.void
-
Field Details
-
priority
private final int priorityThe field for thepriorityrecord component. -
actionList
The field for theactionListrecord component.
-
-
Constructor Details
-
PrioritisedActionList
Creates an instance of aPrioritisedActionListrecord class.- Parameters:
priority- the value for thepriorityrecord componentactionList- the value for theactionListrecord component
-
-
Method Details
-
canExecute
public boolean canExecute(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, InfoProvider sensorInfo, double dt, @Nonnull Store<EntityStore> store) - Specified by:
canExecutein interfaceStateTransitionController.IActionListHolder
-
execute
public boolean execute(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, InfoProvider sensorInfo, double dt, @Nonnull Store<EntityStore> store) - Specified by:
executein interfaceStateTransitionController.IActionListHolder
-
hasCompletedRun
public boolean hasCompletedRun()- Specified by:
hasCompletedRunin interfaceStateTransitionController.IActionListHolder
-
registerWithSupport
- Specified by:
registerWithSupportin interfaceRoleStateChange
-
motionControllerChanged
public void motionControllerChanged(@Nullable Ref<EntityStore> ref, @Nonnull NPCEntity npcComponent, com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, @Nullable ComponentAccessor<EntityStore> componentAccessor) - Specified by:
motionControllerChangedin interfaceRoleStateChange
-
loaded
- Specified by:
loadedin interfaceRoleStateChange
-
spawned
- Specified by:
spawnedin interfaceRoleStateChange
-
unloaded
- Specified by:
unloadedin interfaceRoleStateChange
-
removed
- Specified by:
removedin interfaceRoleStateChange
-
teleported
- Specified by:
teleportedin interfaceRoleStateChange
-
clearOnce
public void clearOnce()- Specified by:
clearOncein interfaceStateTransitionController.IActionListHolder
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
priority
public int priority()Returns the value of thepriorityrecord component.- Returns:
- the value of the
priorityrecord component
-
actionList
Returns the value of theactionListrecord component.- Returns:
- the value of the
actionListrecord component
-