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 ClassesModifier and TypeClassDescriptionstatic interfaceFactory interface used in registering the renderer. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionOcculusTabRenderer(net.minecraft.core.Holder<OcculusTab> occulusTab) Constructs a newOcculusTabRenderer. -
Method Summary
Modifier and TypeMethodDescriptionList<? extends net.minecraft.client.gui.components.events.GuiEventListener> children()voidextractRenderState(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.booleanvoidrenderTooltip(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, setFocusedMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
charTyped, getBorderForArrowNavigation, getChildAt, getCurrentFocusPath, isFocused, keyPressed, keyReleased, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, preeditUpdated, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
getRectangle, isMouseOver, mouseMoved, shouldTakeFocusAfterInteractionMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Field Details
-
TAB_SIZE
public static final int TAB_SIZE- See Also:
-
-
Constructor Details
-
OcculusTabRenderer
Constructs a newOcculusTabRenderer.- Parameters:
occulusTab- TheHolderof theOcculusTabbeing 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:
extractRenderStatein interfacenet.minecraft.client.gui.components.Renderable- See Also:
-
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- TheGuiGraphicsExtractorto 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
- Specified by:
childrenin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler
-