Package io.github.ennuil.libzoomer.api
Interface ZoomOverlay
- All Known Implementing Classes:
SpyglassZoomOverlay
public interface ZoomOverlay
The zoom overlay is a sub-instance that handles the rendering of an overlay.
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanDetermines if the zoom overlay should cancel the rendering of anything rendered after that.booleanGets the active state of the zoom overlay.net.minecraft.resources.ResourceLocationgetId()Gets the identifier of the zoom overlay.voidrenderOverlay(net.minecraft.client.gui.GuiGraphics graphics) Renders the overlay itself.voidtick(boolean active, double divisor, double transitionMultiplier) The tick method.default voidThe tick method used right before the overlay is rendered.
-
Method Details
-
getId
net.minecraft.resources.ResourceLocation getId()Gets the identifier of the zoom overlay.- Returns:
- the zoom overlay's identifier
-
getActive
boolean getActive()Gets the active state of the zoom overlay.- Returns:
- the zoom overlay's active state
-
cancelOverlayRendering
default boolean cancelOverlayRendering()Determines if the zoom overlay should cancel the rendering of anything rendered after that. By default, it returnsfalse.- Returns:
- the state that will be used in order to cancel the rendering or not
-
renderOverlay
void renderOverlay(net.minecraft.client.gui.GuiGraphics graphics) Renders the overlay itself. It's injected by LibZoomer itself.- Parameters:
graphics- the in-game HUD's graphics
-
tick
void tick(boolean active, double divisor, double transitionMultiplier) The tick method. Used in order to keep the internal variables accurate and the overlay functional.- Parameters:
active- the zoom statedivisor- the zoom divisortransitionMultiplier- the transition mode's internal multiplier
-
tickBeforeRender
default void tickBeforeRender()The tick method used right before the overlay is rendered.This isn't required to be implemented.
-