Class InteractionChain
java.lang.Object
com.hypixel.hytale.server.core.entity.InteractionChain
- All Implemented Interfaces:
ChainSyncStorage
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final record(package private) static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ForkedChainIdprivate InteractionTypeprivate final List<InteractionChain.CallState> private final InteractionChainDataprivate intprivate intprivate InteractionStateprivate booleanprivate final InteractionContextprivate booleanprivate InteractionStateprivate booleanprivate final ForkedChainIdprivate final it.unimi.dsi.fastutil.longs.Long2ObjectMap<InteractionChain> private final it.unimi.dsi.fastutil.longs.Long2LongMapprivate final RootInteractionprivate final List<InteractionEntry> private booleanprivate static final com.hypixel.hytale.logger.HytaleLoggerprivate final List<InteractionChain> private static final longprivate Runnableprivate intprivate intprivate intprivate booleanprivate booleanprivate final booleanprivate RootInteractionprivate booleanprivate InteractionStateprivate intprivate intprivate RootInteraction(package private) booleanprivate final it.unimi.dsi.fastutil.longs.Long2ObjectMap<InteractionChain.TempChain> private final List<InteractionSyncData> private intprivate floatprivate longprivate final InteractionTypeprivate longprivate long -
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) booleanvoidfindForkedChain(ForkedChainId chainId, InteractionChainData data) voidprivate static longforkedIdToIndex(ForkedChainId chainId) intintintgetForkedChain(ForkedChainId chainId) it.unimi.dsi.fastutil.longs.Long2ObjectMap<InteractionChain> getInteraction(int index) intintgetOrCreateInteractionEntry(int index) intintgetTempForkedChain(ForkedChainId chainId) it.unimi.dsi.fastutil.longs.Long2ObjectMap<InteractionChain.TempChain> floatfloatlonggetType()longlongbooleanbooleanbooleanbooleanbooleanisSyncDataOutOfOrder(int index) void(package private) voidonCompletion(CooldownHandler cooldownHandler, boolean isRemote) voidpopRoot()voidpushRoot(RootInteraction nextInteraction, boolean simulate) voidputForkedChain(ForkedChainId chainId, InteractionChain chain) voidputInteractionSyncData(int index, InteractionSyncData data) voidremoveInteractionEntry(InteractionManager interactionManager, int index) removeInteractionSyncData(int index) (package private) InteractionChain.TempChainremoveTempForkedChain(ForkedChainId chainId, InteractionChain forkChain) booleanvoidsetBaseType(InteractionType baseType) voidsetChainId(int chainId) voidsetClientState(InteractionState state) voidsetFinalState(InteractionState finalState) voidsetFirstRun(boolean firstRun) voidsetOnCompletion(Runnable onCompletion) voidsetOperationCounter(int operationCounter) (package private) voidsetPredicted(boolean predicted) 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()(package private) void(package private) voidvoidupdateSyncPosition(int index) boolean
-
Field Details
-
LOGGER
private static final com.hypixel.hytale.logger.HytaleLogger LOGGER -
NULL_FORK_ID
private static final long NULL_FORK_ID -
type
-
baseType
-
chainData
-
chainId
private int chainId -
forkedChainId
-
baseForkedChainId
-
predicted
private boolean predicted -
context
-
forkedChains
-
tempForkedChainData
@Nonnull private final it.unimi.dsi.fastutil.longs.Long2ObjectMap<InteractionChain.TempChain> tempForkedChainData -
forkedChainsMap
@Nonnull private final it.unimi.dsi.fastutil.longs.Long2LongMap forkedChainsMap -
newForks
-
initialRootInteraction
-
rootInteraction
-
operationCounter
private int operationCounter -
callStack
-
simulatedCallStack
private int simulatedCallStack -
requiresClient
private final boolean requiresClient -
simulatedOperationCounter
private int simulatedOperationCounter -
simulatedRootInteraction
-
operationIndex
private int operationIndex -
operationIndexOffset
private int operationIndexOffset -
clientOperationIndex
private int clientOperationIndex -
interactions
-
tempSyncData
-
tempSyncDataOffset
private int tempSyncDataOffset -
timestamp
private long timestamp -
waitingForServerFinished
private long waitingForServerFinished -
waitingForClientFinished
private long waitingForClientFinished -
clientState
-
serverState
-
finalState
-
onCompletion
-
sentInitial
private boolean sentInitial -
desynced
private boolean desynced -
timeShift
private float timeShift -
firstRun
private boolean firstRun -
isFirstRun
private boolean isFirstRun -
completed
private boolean completed -
preTicked
private boolean preTicked -
skipChainOnClick
boolean skipChainOnClick
-
-
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
-
putForkedChain
-
getTempForkedChain
-
removeTempForkedChain
@Nullable InteractionChain.TempChain removeTempForkedChain(@Nonnull ForkedChainId chainId, InteractionChain forkChain) -
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
-
onCompletion
-
updateServerState
void updateServerState() -
updateSimulatedState
void updateSimulatedState() -
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) - Specified by:
clearInteractionSyncDatain interfaceChainSyncStorage
-
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
-
forkedIdToIndex
-
setChainId
public void setChainId(int chainId) -
getBaseType
-
setBaseType
-
getForkedChains
-
getTempForkedChainData
@Nonnull public it.unimi.dsi.fastutil.longs.Long2ObjectMap<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
-
setPredicted
void setPredicted(boolean predicted) -
flagDesync
public void flagDesync() -
isDesynced
public boolean isDesynced() -
getNewForks
-
toString
-