Class PhysicalReplayHistory<S>
java.lang.Object
com.viaversion.viafabricplus.bedrock.movement.replay.PhysicalReplayHistory<S>
One bounded journal for an actor graph. Current input is executed by the ordinary client tick exactly once.
-
Constructor Summary
ConstructorsConstructorDescriptionPhysicalReplayHistory(int capacity, Supplier<S> capture, UnaryOperator<S> recapture, Consumer<S> restore, BiFunction<S, S, Runnable> changes, Predicate<S> valid, LongConsumer beginReplayFrame, LongConsumer applyFrameCommands) -
Method Summary
Modifier and TypeMethodDescriptionvoidadmitExternal(List<Runnable> commands) before(long frame) voidbegin(long frame) voidclear()voidcomplete(long frame) longbooleanmarkDirty(long frame) booleanlongvoidbooleanreplay()Refresh each later snapshot after external writes and before that frame's authoritative commands.booleanbooleanscheduleMotion(net.raphimc.viabedrock.api.model.MovementCorrectionTiming timing, Predicate<S> applicable, Runnable action) The live velocity is already applied; retain its native tick placement independently.
-
Constructor Details
-
PhysicalReplayHistory
public PhysicalReplayHistory(int capacity, Supplier<S> capture, UnaryOperator<S> recapture, Consumer<S> restore, BiFunction<S, S, Runnable> changes, Predicate<S> valid, LongConsumer beginReplayFrame, LongConsumer applyFrameCommands)
-
-
Method Details
-
begin
public void begin(long frame) -
admitExternal
-
record
-
complete
public void complete(long frame) -
markDirty
public boolean markDirty(long frame) -
oldestFrame
public long oldestFrame() -
completedFrame
public long completedFrame() -
before
-
schedule
-
scheduleMotion
-
needsReplay
public boolean needsReplay() -
replay
public boolean replay()Refresh each later snapshot after external writes and before that frame's authoritative commands. -
clear
public void clear()
-