Class SpyglassZoomOverlay

java.lang.Object
io.github.ennuil.libzoomer.api.overlays.SpyglassZoomOverlay
All Implemented Interfaces:
ZoomOverlay

public class SpyglassZoomOverlay extends Object implements ZoomOverlay
An implementation of the spyglass overlay as a zoom overlay
  • Constructor Summary

    Constructors
    Constructor
    Description
    SpyglassZoomOverlay(net.minecraft.util.Identifier textureId)
    Initializes an instance of the spyglass mouse modifier with the specified texture identifier
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Determines if the zoom overlay should cancel the rendering of anything rendered after that.
    boolean
    Gets the active state of the zoom overlay.
    net.minecraft.util.Identifier
    Gets the identifier of the zoom overlay.
    void
    renderOverlay(net.minecraft.client.util.math.MatrixStack matrices)
    Renders the overlay itself.
    void
    tick(boolean active, double divisor, double transitionMultiplier)
    The tick method.
    void
    The tick method used right before the overlay is rendered.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SpyglassZoomOverlay

      public SpyglassZoomOverlay(net.minecraft.util.Identifier 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

    • getIdentifier

      public net.minecraft.util.Identifier getIdentifier()
      Description copied from interface: ZoomOverlay
      Gets the identifier of the zoom overlay.
      Specified by:
      getIdentifier in interface ZoomOverlay
      Returns:
      the zoom overlay's identifier
    • getActive

      public boolean getActive()
      Description copied from interface: ZoomOverlay
      Gets the active state of the zoom overlay.
      Specified by:
      getActive in interface ZoomOverlay
      Returns:
      the zoom overlay's active state
    • cancelOverlayRendering

      public boolean cancelOverlayRendering()
      Description copied from interface: ZoomOverlay
      Determines if the zoom overlay should cancel the rendering of anything rendered after that. By default, it returns false.
      Specified by:
      cancelOverlayRendering in interface ZoomOverlay
      Returns:
      the state that will be used in order to cancel the rendering or not
    • renderOverlay

      public void renderOverlay(net.minecraft.client.util.math.MatrixStack matrices)
      Description copied from interface: ZoomOverlay
      Renders the overlay itself. It's injected by LibZoomer itself.
      Specified by:
      renderOverlay in interface ZoomOverlay
      Parameters:
      matrices - the in-game HUD's matrices
    • tick

      public void tick(boolean active, double divisor, double transitionMultiplier)
      Description copied from interface: ZoomOverlay
      The tick method. Used in order to keep the internal variables accurate and the overlay functional.
      Specified by:
      tick in interface ZoomOverlay
      Parameters:
      active - the zoom state
      divisor - the zoom divisor
      transitionMultiplier - the transition mode's internal multiplier
    • tickBeforeRender

      public void tickBeforeRender()
      Description copied from interface: ZoomOverlay
      The tick method used right before the overlay is rendered.

      This isn't required to be implemented.

      Specified by:
      tickBeforeRender in interface ZoomOverlay