Class InstantTransitionMode
java.lang.Object
io.github.ennuil.libzoomer.api.transitions.InstantTransitionMode
- All Implemented Interfaces:
TransitionMode
An implementation of a simple zoom as a transition mode.
-
Constructor Summary
ConstructorsConstructorDescriptionInitializes an instance of the instant transition mode. -
Method Summary
Modifier and TypeMethodDescriptiondoubleapplyZoom(double fov, float tickDelta) Applies the zoom to the FOV.booleanGets the active state of the transition mode.net.minecraft.resources.ResourceLocationgetId()Gets the identifier of the transition mode.doubleGets the internal multiplier.voidtick(boolean active, double divisor) The tick method.
-
Constructor Details
-
InstantTransitionMode
public InstantTransitionMode()Initializes an instance of the instant transition mode.
-
-
Method Details
-
getId
public net.minecraft.resources.ResourceLocation getId()Description copied from interface:TransitionModeGets the identifier of the transition mode.- Specified by:
getIdin interfaceTransitionMode- Returns:
- the transition mode's identifier
-
getActive
public boolean getActive()Description copied from interface:TransitionModeGets the active state of the transition mode.- Specified by:
getActivein interfaceTransitionMode- Returns:
- the transition mode's active state
-
applyZoom
public double applyZoom(double fov, float tickDelta) Description copied from interface:TransitionModeApplies the zoom to the FOV.- Specified by:
applyZoomin interfaceTransitionMode- Parameters:
fov- the original FOVtickDelta- the current tick delta- Returns:
- the zoomed FOV
-
tick
public void tick(boolean active, double divisor) Description copied from interface:TransitionModeThe tick method. Used in order to keep the internal variables accurate.- Specified by:
tickin interfaceTransitionMode- Parameters:
active- the zoom statedivisor- the zoom divisor
-
getInternalMultiplier
public double getInternalMultiplier()Description copied from interface:TransitionModeGets the internal multiplier. Used for purposes other than zooming the FOV.- Specified by:
getInternalMultiplierin interfaceTransitionMode- Returns:
- the internal multiplier
-