Class OcculusTabRenderer

java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
at.minecraftschurli.mods.arsmagicalegacy.api.client.OcculusTabRenderer
All Implemented Interfaces:
net.minecraft.client.gui.components.events.ContainerEventHandler, net.minecraft.client.gui.components.events.GuiEventListener, net.minecraft.client.gui.components.Renderable, net.minecraft.client.gui.components.TabOrderedElement

public abstract class OcculusTabRenderer extends net.minecraft.client.gui.components.events.AbstractContainerEventHandler implements net.minecraft.client.gui.components.Renderable

Represents the rendering portion of an OcculusTab. One renderer may be associated with multiple OcculusTabs. For example, in Ars Magica: Legacy, multiple tabs use the default skill tree renderer.

Register OcculusTabRenderers during RegisterOcculusTabRenderersEvent, using the OcculusTabRenderer.Factory interface.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
    Factory interface used in registering the renderer.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    OcculusTabRenderer(net.minecraft.core.Holder<OcculusTab> occulusTab)
    Constructs a new OcculusTabRenderer.
  • Method Summary

    Modifier and Type
    Method
    Description
    List<? extends net.minecraft.client.gui.components.events.GuiEventListener>
     
    void
    extractRenderState(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float partialTick)
    Note: Coordinates are normalized to the renderer's top left corner, i.e., rendering at 0/0 uses the top left corner of the occulus frame, not the top left corner of the screen.
    boolean
     
    void
    renderTooltip(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float partialTick)
    Render tooltips here.

    Methods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler

    getFocused, isDragging, setDragging, setFocused

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler

    charTyped, getBorderForArrowNavigation, getChildAt, getCurrentFocusPath, isFocused, keyPressed, keyReleased, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, preeditUpdated, setFocused

    Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener

    getRectangle, isMouseOver, mouseMoved, shouldTakeFocusAfterInteraction

    Methods inherited from interface net.minecraft.client.gui.components.TabOrderedElement

    getTabOrderGroup
  • Field Details

  • Constructor Details

    • OcculusTabRenderer

      public OcculusTabRenderer(net.minecraft.core.Holder<OcculusTab> occulusTab)
      Constructs a new OcculusTabRenderer.
      Parameters:
      occulusTab - The Holder of the OcculusTab being rendered.
  • Method Details

    • extractRenderState

      public void extractRenderState(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float partialTick)
      Note: Coordinates are normalized to the renderer's top left corner, i.e., rendering at 0/0 uses the top left corner of the occulus frame, not the top left corner of the screen. Additionally, a scissor is enabled around the occulus frame.
      Specified by:
      extractRenderState in interface net.minecraft.client.gui.components.Renderable
      See Also:
      • for parameter documentation.
    • renderTooltip

      public void renderTooltip(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float partialTick)
      Render tooltips here. This is kept in a separate method to allow drawing outside the scissor space.
      Parameters:
      graphics - The GuiGraphicsExtractor to use.
      mouseX - The mouse X position.
      mouseY - The mouse Y position.
      partialTick - The partial tick value.
    • hasSkillPointPanel

      public boolean hasSkillPointPanel()
      Returns:
      Whether to have the occulus screen draw the skill point panel widget when this renderer is active or not.
    • children

      public List<? extends net.minecraft.client.gui.components.events.GuiEventListener> children()
      Specified by:
      children in interface net.minecraft.client.gui.components.events.ContainerEventHandler