Class NoopTransition
java.lang.Object
net.thewinnt.cutscenes.transition.NoopTransition
- All Implemented Interfaces:
Transition
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.thewinnt.cutscenes.transition.Transition
Transition.TransitionSerializer<T extends Transition> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic NoopTransitionfromJSON(com.google.gson.JsonObject json) static NoopTransitionfromNetwork(net.minecraft.network.FriendlyByteBuf buf) intintReturns the time that will be added to the total cutscene time as a result of this transition running.intReturns the time of this transition that will be taken from the cutscene's time.net.minecraft.world.phys.Vec3getPos(double progress, net.minecraft.world.level.Level level, net.minecraft.world.phys.Vec3 startPos, net.minecraft.world.phys.Vec3 pathRot, net.minecraft.world.phys.Vec3 initCamPos, CutsceneType cutscene) Returns the camera position at the specified momentnet.minecraft.world.phys.Vec3getRot(double progress, net.minecraft.world.level.Level level, net.minecraft.world.phys.Vec3 startPos, net.minecraft.world.phys.Vec3 startRot, net.minecraft.world.phys.Vec3 initCamRot, CutsceneType cutscene) Returns the camera rotation at the specified momentvoidtoNetwork(net.minecraft.network.FriendlyByteBuf buf) Saves this transition for network transfer, so that it can be fully recreated on the receiving end.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.thewinnt.cutscenes.transition.Transition
onEnd, onFrame, onStart
-
Constructor Details
-
NoopTransition
public NoopTransition()
-
-
Method Details
-
getLength
public int getLength()- Specified by:
getLengthin interfaceTransition- Returns:
- the total length of this transition.
-
getPos
public net.minecraft.world.phys.Vec3 getPos(double progress, net.minecraft.world.level.Level level, net.minecraft.world.phys.Vec3 startPos, net.minecraft.world.phys.Vec3 pathRot, net.minecraft.world.phys.Vec3 initCamPos, CutsceneType cutscene) Description copied from interface:TransitionReturns the camera position at the specified moment- Specified by:
getPosin interfaceTransition- Parameters:
progress- the progress of the transition [0-1]level- the level the transition is executed instartPos- the cutscene start position (specified in the command, defaults to [0, 100, 0])pathRot- the rotation of the pathinitCamPos- the camera position right before the cutscene startedcutscene- the cutscene the transition is associated with
-
getRot
public net.minecraft.world.phys.Vec3 getRot(double progress, net.minecraft.world.level.Level level, net.minecraft.world.phys.Vec3 startPos, net.minecraft.world.phys.Vec3 startRot, net.minecraft.world.phys.Vec3 initCamRot, CutsceneType cutscene) Description copied from interface:TransitionReturns the camera rotation at the specified moment- Specified by:
getRotin interfaceTransition- Parameters:
progress- the progress of the transition [0-1]level- the level the transition is executed instartPos- the cutscene start position (world coordinates)startRot- the start rotation (specified in the command defaults to [0, 0, 0])initCamRot- the camera rotation right before the cutscene startedcutscene- the cutscene the transition is associated with
-
toNetwork
public void toNetwork(net.minecraft.network.FriendlyByteBuf buf) Description copied from interface:TransitionSaves this transition for network transfer, so that it can be fully recreated on the receiving end.- Specified by:
toNetworkin interfaceTransition- Parameters:
buf- the buffer to write to
-
getSerializer
- Specified by:
getSerializerin interfaceTransition- Returns:
- a serializer that creates transitions of this type
-
getOffCutsceneTime
public int getOffCutsceneTime()Description copied from interface:TransitionReturns the time that will be added to the total cutscene time as a result of this transition running. Should not change during a cutscene.- Specified by:
getOffCutsceneTimein interfaceTransition- Returns:
- the time spent outside the cutscene's length
-
getOnCutsceneTime
public int getOnCutsceneTime()Description copied from interface:TransitionReturns the time of this transition that will be taken from the cutscene's time. This means that the cutscene itself will be running, so a path will be shown.- Specified by:
getOnCutsceneTimein interfaceTransition- Returns:
- the time spent inside the cutscene's length
-
fromNetwork
-
fromJSON
-