Class SpyglassZoomOverlay
java.lang.Object
io.github.ennuil.libzoomer.api.overlays.SpyglassZoomOverlay
- All Implemented Interfaces:
ZoomOverlay
An implementation of the spyglass overlay as a zoom overlay
-
Constructor Summary
ConstructorsConstructorDescriptionSpyglassZoomOverlay(net.minecraft.resources.ResourceLocation textureId) Initializes an instance of the spyglass mouse modifier with the specified texture identifier -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermines 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.voidThe tick method used right before the overlay is rendered.
-
Constructor Details
-
SpyglassZoomOverlay
public SpyglassZoomOverlay(net.minecraft.resources.ResourceLocation textureId) Initializes an instance of the spyglass mouse modifier with the specified texture identifier- Parameters:
textureId- the texture identifier for the spyglass overlay
-
-
Method Details
-
getId
public net.minecraft.resources.ResourceLocation getId()Description copied from interface:ZoomOverlayGets the identifier of the zoom overlay.- Specified by:
getIdin interfaceZoomOverlay- Returns:
- the zoom overlay's identifier
-
getActive
public boolean getActive()Description copied from interface:ZoomOverlayGets the active state of the zoom overlay.- Specified by:
getActivein interfaceZoomOverlay- Returns:
- the zoom overlay's active state
-
cancelOverlayRendering
public boolean cancelOverlayRendering()Description copied from interface:ZoomOverlayDetermines if the zoom overlay should cancel the rendering of anything rendered after that. By default, it returnsfalse.- Specified by:
cancelOverlayRenderingin interfaceZoomOverlay- Returns:
- the state that will be used in order to cancel the rendering or not
-
renderOverlay
public void renderOverlay(net.minecraft.client.gui.GuiGraphics graphics) Description copied from interface:ZoomOverlayRenders the overlay itself. It's injected by LibZoomer itself.- Specified by:
renderOverlayin interfaceZoomOverlay- Parameters:
graphics- the in-game HUD's graphics
-
tick
public void tick(boolean active, double divisor, double transitionMultiplier) Description copied from interface:ZoomOverlayThe tick method. Used in order to keep the internal variables accurate and the overlay functional.- Specified by:
tickin interfaceZoomOverlay- Parameters:
active- the zoom statedivisor- the zoom divisortransitionMultiplier- the transition mode's internal multiplier
-
tickBeforeRender
public void tickBeforeRender()Description copied from interface:ZoomOverlayThe tick method used right before the overlay is rendered.This isn't required to be implemented.
- Specified by:
tickBeforeRenderin interfaceZoomOverlay
-