Class PlaybackImpl
java.lang.Object
net.ixdarklord.coolcatcanvas.internal.client.cutscene.PlaybackImpl
- All Implemented Interfaces:
CutscenePlayback
-
Method Summary
Modifier and TypeMethodDescriptioncutscene()@Nullable net.minecraft.resources.Identifierid()The id it was started by, or null for one played straight from aCutscene.booleanisActive()Whether it is still the cutscene on screen: false once it has ended, for any reason.booleanisPaused()onEnd(Consumer<CutsceneEndReason> listener) Runs once it has ended, with the reason.voidpause()Holds it on its current frame, the camera staying where it is.pose()The camera this frame, in the world: where the cutscene has it, or would have it while it is paused.voidresume()voidseek(float time) Jumps to a time, in ticks.voidsetCameraEnabled(boolean enabled) Whether the editor's preview looks through the cutscene's camera, or leaves the player their own eyes.voidsetCutscene(Cutscene cutscene, net.minecraft.world.phys.Vec3 origin, float originYaw) A preview's cutscene, swapped as the editor changes it; the clock stays where it is.voidsetSpeed(float speed) How fast it runs: 1 is its own pace, 0.5 slow motion, 2 double time.voidskip()Ends it at once as if the player had skipped it, whether or not it is skippable.floatspeed()voidstop()Ends it at once, asCutsceneEndReason.STOPPED.floattime()How far in it is, in ticks.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CutscenePlayback
progress
-
Method Details
-
setCameraEnabled
public void setCameraEnabled(boolean enabled) Whether the editor's preview looks through the cutscene's camera, or leaves the player their own eyes. -
setCutscene
A preview's cutscene, swapped as the editor changes it; the clock stays where it is. -
cutscene
- Specified by:
cutscenein interfaceCutscenePlayback
-
id
public @Nullable net.minecraft.resources.Identifier id()Description copied from interface:CutscenePlaybackThe id it was started by, or null for one played straight from aCutscene.- Specified by:
idin interfaceCutscenePlayback
-
time
public float time()Description copied from interface:CutscenePlaybackHow far in it is, in ticks.- Specified by:
timein interfaceCutscenePlayback
-
isActive
public boolean isActive()Description copied from interface:CutscenePlaybackWhether it is still the cutscene on screen: false once it has ended, for any reason.- Specified by:
isActivein interfaceCutscenePlayback
-
isPaused
public boolean isPaused()- Specified by:
isPausedin interfaceCutscenePlayback
-
pause
public void pause()Description copied from interface:CutscenePlaybackHolds it on its current frame, the camera staying where it is.- Specified by:
pausein interfaceCutscenePlayback
-
resume
public void resume()- Specified by:
resumein interfaceCutscenePlayback
-
seek
public void seek(float time) Description copied from interface:CutscenePlaybackJumps to a time, in ticks. Markers jumped over don't fire.- Specified by:
seekin interfaceCutscenePlayback
-
speed
public float speed()- Specified by:
speedin interfaceCutscenePlayback
-
setSpeed
public void setSpeed(float speed) Description copied from interface:CutscenePlaybackHow fast it runs: 1 is its own pace, 0.5 slow motion, 2 double time.- Specified by:
setSpeedin interfaceCutscenePlayback
-
stop
public void stop()Description copied from interface:CutscenePlaybackEnds it at once, asCutsceneEndReason.STOPPED.- Specified by:
stopin interfaceCutscenePlayback
-
skip
public void skip()Description copied from interface:CutscenePlaybackEnds it at once as if the player had skipped it, whether or not it is skippable.- Specified by:
skipin interfaceCutscenePlayback
-
onEnd
Description copied from interface:CutscenePlaybackRuns once it has ended, with the reason. Called at once if it already has.- Specified by:
onEndin interfaceCutscenePlayback
-
pose
Description copied from interface:CutscenePlaybackThe camera this frame, in the world: where the cutscene has it, or would have it while it is paused.- Specified by:
posein interfaceCutscenePlayback
-