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.resources.ResourceLocationgetId()Gets the identifier of the transition mode.doubleGets the internal multiplier.voidtick(boolean active, double divisor) The tick method.
-
Method Details
-
getId
net.minecraft.resources.ResourceLocation getId()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
-