Contents
- Description
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- acquire()
- getStateSupport()
- getMarkedEntitySupport()
- getWorldSupport()
- getEntitySupport()
- getPositionCache()
- getDebugSupport()
- getFlagsComponent()
- getCombatSupport()
- getMotionContextSupport()
- getDisplayNameSupport()
- getPlayerTaskSupport()
- getRoleIndex()
- getName()
- getRole()
- getNpcEntity()
- swapTreeModeSteps(Instruction)
- notifySensorMatch()
- populateFromEntity(Ref, ComponentAccessor)
- populateFromHolder(Holder)
- setRoleIndex(int)
- setName(String)
- getIndexedInstructions()
- setIndexedInstructions(IndexedInstructions)
- clearForReuse()
Class ExecutionSupport
java.lang.Object
com.hypixel.hytale.server.npc.instructions.ExecutionSupport
Per-execution scratch struct that bundles ECS support component references plus tree-mode runtime
state for a single instruction-tree tick.
Get an instance via acquire(), populateFromEntity(Ref, ComponentAccessor) /
populateFromHolder(Holder), do the work, then call clearForReuse() in a finally
block.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ExecutionSupportacquire()Acquire anExecutionSupportfrom the per-thread pool, or allocate a new one if the pool is empty.voidClear all populated state and return to the pool.getName()getRole()intvoidvoidpopulateFromEntity(Ref<EntityStore> ref, ComponentAccessor<EntityStore> accessor) Lazy populate for the per-tick entity path: stashes the ref/accessor and clears support references so each support is fetched on first access via its getter.voidpopulateFromHolder(Holder<EntityStore> holder) voidsetIndexedInstructions(IndexedInstructions indexedInstructions) voidvoidsetRoleIndex(int roleIndex) swapTreeModeSteps(Instruction newStep)
-
Constructor Details
-
ExecutionSupport
public ExecutionSupport()
-
-
Method Details
-
acquire
Acquire anExecutionSupportfrom the per-thread pool, or allocate a new one if the pool is empty. Always pair withtry { ... } finally { es.clearForReuse(); }so the instance returns to the pool. -
getStateSupport
-
getMarkedEntitySupport
-
getWorldSupport
-
getEntitySupport
-
getPositionCache
-
getDebugSupport
-
getFlagsComponent
-
getCombatSupport
-
getMotionContextSupport
-
getDisplayNameSupport
-
getPlayerTaskSupport
-
getRoleIndex
public int getRoleIndex() -
getName
-
getRole
-
getNpcEntity
-
swapTreeModeSteps
-
notifySensorMatch
public void notifySensorMatch() -
populateFromEntity
public void populateFromEntity(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> accessor) Lazy populate for the per-tick entity path: stashes the ref/accessor and clears support references so each support is fetched on first access via its getter. -
populateFromHolder
-
setRoleIndex
public void setRoleIndex(int roleIndex) -
setName
-
getIndexedInstructions
-
setIndexedInstructions
-
clearForReuse
public void clearForReuse()Clear all populated state and return to the pool.
-