Contents
- Description
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- getType()
- getChainId()
- getForkedChainId()
- getBaseForkedChainId()
- getInitialRootInteraction()
- isPredicted()
- getContext()
- getChainData()
- getServerState()
- requiresClient()
- getRootInteraction()
- getSimulatedRootInteraction()
- getOperationCounter()
- setOperationCounter(int)
- getSimulatedOperationCounter()
- setSimulatedOperationCounter(int)
- wasPreTicked()
- setPreTicked(boolean)
- getOperationIndex()
- nextOperationIndex()
- getClientOperationIndex()
- findForkedChain(ForkedChainId, InteractionChainData)
- getForkedChain(ForkedChainId)
- putForkedChain(ForkedChainId, InteractionChain)
- getTempForkedChain(ForkedChainId)
- hasSentInitial()
- setSentInitial(boolean)
- getTimeShift()
- setTimeShift(float)
- consumeFirstRun()
- isFirstRun()
- setFirstRun(boolean)
- getCallDepth()
- getSimulatedCallDepth()
- pushRoot(RootInteraction, boolean)
- popRoot()
- getTimeInSeconds()
- setOnCompletion(Runnable)
- getClientState()
- setClientState(InteractionState)
- getOrCreateInteractionEntry(int)
- getInteraction(int)
- removeInteractionEntry(InteractionManager, int)
- putInteractionSyncData(int, InteractionSyncData)
- clearInteractionSyncData(int)
- removeInteractionSyncData(int)
- updateSyncPosition(int)
- isSyncDataOutOfOrder(int)
- syncFork(Ref, InteractionManager, SyncInteractionChain)
- copyTempFrom(InteractionChain.TempChain)
- setChainId(int)
- getBaseType()
- setBaseType(InteractionType)
- getForkedChains()
- getTempForkedChainData()
- getTimestamp()
- setTimestamp(long)
- getWaitingForServerFinished()
- setWaitingForServerFinished(long)
- getWaitingForClientFinished()
- setWaitingForClientFinished(long)
- setServerState(InteractionState)
- getFinalState()
- setFinalState(InteractionState)
- flagDesync()
- isDesynced()
- getNewForks()
- toString()
Class InteractionChain
java.lang.Object
com.hypixel.hytale.server.core.entity.InteractionChain
- All Implemented Interfaces:
ChainSyncStorage
Represents a chain of interactions for an instigating entity.
-
Constructor Summary
ConstructorsConstructorDescriptionInteractionChain(ForkedChainId forkedChainId, ForkedChainId baseForkedChainId, InteractionType type, InteractionContext context, InteractionChainData chainData, RootInteraction rootInteraction, Runnable onCompletion, boolean requiresClient) InteractionChain(InteractionType type, InteractionContext context, InteractionChainData chainData, RootInteraction rootInteraction, Runnable onCompletion, boolean requiresClient) -
Method Summary
Modifier and TypeMethodDescriptionvoidclearInteractionSyncData(int operationIndex) Removes all invalid sync data from the chain and any active interactionsbooleanvoidcopyTempFrom(com.hypixel.hytale.server.core.entity.InteractionChain.TempChain temp) findForkedChain(ForkedChainId chainId, InteractionChainData data) voidintintintgetForkedChain(ForkedChainId chainId) Returns the interaction chain for the given fork id.it.unimi.dsi.fastutil.longs.Long2ObjectMap<InteractionChain> getInteraction(int index) intintgetOrCreateInteractionEntry(int index) intintcom.hypixel.hytale.server.core.entity.InteractionChain.TempChaingetTempForkedChain(ForkedChainId chainId) it.unimi.dsi.fastutil.longs.Long2ObjectMap<com.hypixel.hytale.server.core.entity.InteractionChain.TempChain> floatfloatlonggetType()longlongbooleanbooleanbooleanbooleanbooleanisSyncDataOutOfOrder(int index) voidvoidpopRoot()voidpushRoot(RootInteraction nextInteraction, boolean simulate) voidputForkedChain(ForkedChainId chainId, InteractionChain chain) voidputInteractionSyncData(int index, InteractionSyncData data) voidremoveInteractionEntry(InteractionManager interactionManager, int index) removeInteractionSyncData(int index) booleanvoidsetBaseType(InteractionType baseType) voidsetChainId(int chainId) voidsetClientState(InteractionState state) voidsetFinalState(InteractionState finalState) voidsetFirstRun(boolean firstRun) voidsetOnCompletion(Runnable onCompletion) voidsetOperationCounter(int operationCounter) voidsetPreTicked(boolean preTicked) voidsetSentInitial(boolean sentInitial) voidsetServerState(InteractionState serverState) voidsetSimulatedOperationCounter(int simulatedOperationCounter) voidsetTimeShift(float timeShift) voidsetTimestamp(long timestamp) voidsetWaitingForClientFinished(long waitingForClientFinished) voidsetWaitingForServerFinished(long waitingForServerFinished) voidsyncFork(Ref<EntityStore> ref, InteractionManager manager, SyncInteractionChain packet) toString()voidupdateSyncPosition(int index) boolean
-
Constructor Details
-
InteractionChain
public InteractionChain(InteractionType type, InteractionContext context, InteractionChainData chainData, @Nonnull RootInteraction rootInteraction, @Nullable Runnable onCompletion, boolean requiresClient) -
InteractionChain
public InteractionChain(ForkedChainId forkedChainId, ForkedChainId baseForkedChainId, InteractionType type, InteractionContext context, InteractionChainData chainData, @Nonnull RootInteraction rootInteraction, @Nullable Runnable onCompletion, boolean requiresClient)
-
-
Method Details
-
getType
-
getChainId
public int getChainId() -
getForkedChainId
-
getBaseForkedChainId
-
getInitialRootInteraction
-
isPredicted
public boolean isPredicted() -
getContext
-
getChainData
-
getServerState
-
requiresClient
public boolean requiresClient() -
getRootInteraction
-
getSimulatedRootInteraction
-
getOperationCounter
public int getOperationCounter() -
setOperationCounter
public void setOperationCounter(int operationCounter) -
getSimulatedOperationCounter
public int getSimulatedOperationCounter() -
setSimulatedOperationCounter
public void setSimulatedOperationCounter(int simulatedOperationCounter) -
wasPreTicked
public boolean wasPreTicked() -
setPreTicked
public void setPreTicked(boolean preTicked) -
getOperationIndex
public int getOperationIndex() -
nextOperationIndex
public void nextOperationIndex() -
getClientOperationIndex
public int getClientOperationIndex() -
findForkedChain
@Nullable public InteractionChain findForkedChain(@Nonnull ForkedChainId chainId, @Nullable InteractionChainData data) -
getForkedChain
Returns the interaction chain for the given fork id.- Parameters:
chainId- The ID of the forked chain.- Returns:
- the interaction chain, or
nullif it doesn't exist.
-
putForkedChain
-
getTempForkedChain
@Nullable public com.hypixel.hytale.server.core.entity.InteractionChain.TempChain getTempForkedChain(@Nonnull ForkedChainId chainId) -
hasSentInitial
public boolean hasSentInitial() -
setSentInitial
public void setSentInitial(boolean sentInitial) -
getTimeShift
public float getTimeShift() -
setTimeShift
public void setTimeShift(float timeShift) -
consumeFirstRun
public boolean consumeFirstRun() -
isFirstRun
public boolean isFirstRun() -
setFirstRun
public void setFirstRun(boolean firstRun) -
getCallDepth
public int getCallDepth() -
getSimulatedCallDepth
public int getSimulatedCallDepth() -
pushRoot
-
popRoot
public void popRoot() -
getTimeInSeconds
public float getTimeInSeconds() -
setOnCompletion
-
getClientState
- Specified by:
getClientStatein interfaceChainSyncStorage
-
setClientState
- Specified by:
setClientStatein interfaceChainSyncStorage
-
getOrCreateInteractionEntry
-
getInteraction
- Specified by:
getInteractionin interfaceChainSyncStorage
-
removeInteractionEntry
-
putInteractionSyncData
- Specified by:
putInteractionSyncDatain interfaceChainSyncStorage
-
clearInteractionSyncData
public void clearInteractionSyncData(int operationIndex) Removes all invalid sync data from the chain and any active interactions- Specified by:
clearInteractionSyncDatain interfaceChainSyncStorage- Parameters:
operationIndex-
-
removeInteractionSyncData
-
updateSyncPosition
public void updateSyncPosition(int index) - Specified by:
updateSyncPositionin interfaceChainSyncStorage
-
isSyncDataOutOfOrder
public boolean isSyncDataOutOfOrder(int index) - Specified by:
isSyncDataOutOfOrderin interfaceChainSyncStorage
-
syncFork
public void syncFork(@Nonnull Ref<EntityStore> ref, @Nonnull InteractionManager manager, @Nonnull SyncInteractionChain packet) - Specified by:
syncForkin interfaceChainSyncStorage
-
copyTempFrom
public void copyTempFrom(@Nonnull com.hypixel.hytale.server.core.entity.InteractionChain.TempChain temp) -
setChainId
public void setChainId(int chainId) -
getBaseType
-
setBaseType
-
getForkedChains
-
getTempForkedChainData
@Nonnull public it.unimi.dsi.fastutil.longs.Long2ObjectMap<com.hypixel.hytale.server.core.entity.InteractionChain.TempChain> getTempForkedChainData() -
getTimestamp
public long getTimestamp() -
setTimestamp
public void setTimestamp(long timestamp) -
getWaitingForServerFinished
public long getWaitingForServerFinished() -
setWaitingForServerFinished
public void setWaitingForServerFinished(long waitingForServerFinished) -
getWaitingForClientFinished
public long getWaitingForClientFinished() -
setWaitingForClientFinished
public void setWaitingForClientFinished(long waitingForClientFinished) -
setServerState
-
getFinalState
-
setFinalState
-
flagDesync
public void flagDesync() -
isDesynced
public boolean isDesynced() -
getNewForks
-
toString
-