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.util.IdentifierGets 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
-
getIdentifier
public net.minecraft.util.Identifier getIdentifier()Description copied from interface:TransitionModeGets the identifier of the transition mode.- Specified by:
getIdentifierin 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
-