Instruction

public class Instruction implements RoleStateChange, IAnnotatedComponentCollection

Class Instruction. Provides instruction functionality for the Hytale server.

java.lang.Object > Instruction

Field Summary

parent

protected IAnnotatedComponent parent

Field parent.

index

protected int index

Field index.

continueAfter

protected boolean continueAfter

Field continueAfter.

parentTreeModeStep

protected Instruction parentTreeModeStep

Field parentTreeModeStep.

tag

final String tag

Field tag.

debugSupport

final DebugSupport debugSupport

Field debugSupport.

traceSensorFails

final boolean traceSensorFails

Field traceSensorFails.

uuidComponent

final UUIDComponent uuidComponent

Field uuidComponent.

sensorInfo

final InfoProvider sensorInfo

Field sensorInfo.

Method Detail

Instruction

public private Instruction (final Instruction[] instructionList, @Nonnull final BuilderSupport support)

Method Instruction.

Parameters:
final Instruction[] instructionList
@Nonnull final BuilderSupport support

getSensor

public Sensor getSensor ()

Method getSensor.

getDebugTag

public String getDebugTag ()

Method getDebugTag.

getWeight

public double getWeight ()

Method getWeight.

isContinueAfter

public boolean isContinueAfter ()

Method isContinueAfter.

getBodyMotion

public BodyMotion getBodyMotion ()

Method getBodyMotion.

getHeadMotion

public HeadMotion getHeadMotion ()

Method getHeadMotion.

registerWithSupport

public void registerWithSupport (final Role role)

Method registerWithSupport.

Parameters:
final Role role

motionControllerChanged

public void motionControllerChanged (@Nullable final Ref ref, @Nonnull final NPCEntity npcComponent, final MotionController motionController, @Nullable final ComponentAccessor componentAccessor)

Method motionControllerChanged.

Parameters:
@Nullable final Ref ref
@Nonnull final NPCEntity npcComponent
final MotionController motionController
@Nullable final ComponentAccessor componentAccessor

loaded

public void loaded (final Role role)

Method loaded.

Parameters:
final Role role

spawned

public void spawned (final Role role)

Method spawned.

Parameters:
final Role role

unloaded

public void unloaded (final Role role)

Method unloaded.

Parameters:
final Role role

removed

public void removed (final Role role)

Method removed.

Parameters:
final Role role

teleported

public void teleported (final Role role, final World from, final World to)

Method teleported.

Parameters:
final Role role
final World from
final World to

componentCount

public int componentCount ()

Method componentCount.

getComponent

public IAnnotatedComponent getComponent (final int index)

Method getComponent.

Parameters:
final int index

getInfo

public void getInfo (final Role role, @Nonnull final ComponentInfo holder)

Method getInfo.

Parameters:
final Role role
@Nonnull final ComponentInfo holder

getParent

public IAnnotatedComponent getParent ()

Method getParent.

getIndex

public int getIndex ()

Method getIndex.

getLabel

public String getLabel ()

Method getLabel.

setContext

public void setContext (final IAnnotatedComponent parent, final int index)

Method setContext.

Parameters:
final IAnnotatedComponent parent
final int index

matches

public boolean matches (@Nonnull final Ref ref, @Nonnull final Role role, final double dt, @Nonnull final Store store)

Method matches.

Parameters:
@Nonnull final Ref ref
@Nonnull final Role role
final double dt
@Nonnull final Store store

executeActions

public void executeActions (@Nonnull final Ref ref, @Nonnull final Role role, final InfoProvider sensorInfo, final double dt, @Nonnull final Store store)

Method executeActions.

Parameters:
@Nonnull final Ref ref
@Nonnull final Role role
final InfoProvider sensorInfo
final double dt
@Nonnull final Store store

execute

public void execute (@Nonnull final Ref ref, @Nonnull final Role role, final double dt, @Nonnull final Store store)

Method execute.

Parameters:
@Nonnull final Ref ref
@Nonnull final Role role
final double dt
@Nonnull final Store store

clearOnce

public void clearOnce ()

Method clearOnce.

onEndMotion

public void onEndMotion ()

Method onEndMotion.

onMatched

public void onMatched (@Nonnull final Role role)

Method onMatched.

Parameters:
@Nonnull final Role role

onCompleted

public void onCompleted (@Nonnull final Role role)

Method onCompleted.

Parameters:
@Nonnull final Role role

notifyChildSensorMatch

public void notifyChildSensorMatch ()

Method notifyChildSensorMatch.

reset

public void reset ()

Method reset.

forEachInstruction

protected void forEachInstruction (@Nonnull final Consumer instructionConsumer)

Method forEachInstruction.

Parameters:
@Nonnull final Consumer instructionConsumer

createRootInstruction

static Instruction createRootInstruction (final Instruction[] instructions, @Nonnull final BuilderSupport support)

Method createRootInstruction.

Parameters:
final Instruction[] instructions
@Nonnull final BuilderSupport support