Package io.github.ennuil.libzoomer.api
Interface TransitionMode
- All Known Implementing Classes:
InstantTransitionMode,SmoothTransitionMode
public interface TransitionMode
The transition mode is a sub-instance that handles zooming itself.
It handles how the regular FOV will transition to the zoomed FOV and vice-versa.
-
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.
-
Method Details
-
getIdentifier
net.minecraft.util.Identifier getIdentifier()Gets the identifier of the transition mode.- Returns:
- the transition mode's identifier
-
getActive
boolean getActive()Gets the active state of the transition mode.- Returns:
- the transition mode's active state
-
applyZoom
double applyZoom(double fov, float tickDelta) Applies the zoom to the FOV.- Parameters:
fov- the original FOVtickDelta- the current tick delta- Returns:
- the zoomed FOV
-
tick
void tick(boolean active, double divisor) The tick method. Used in order to keep the internal variables accurate.- Parameters:
active- the zoom statedivisor- the zoom divisor
-
getInternalMultiplier
double getInternalMultiplier()Gets the internal multiplier. Used for purposes other than zooming the FOV.- Returns:
- the internal multiplier
-