Class OcculusTabRenderer
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
com.github.minecraftschurlimods.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,net.minecraft.client.gui.narration.NarratableEntry,net.minecraft.client.gui.narration.NarrationSupplier
public abstract class OcculusTabRenderer
extends net.minecraft.client.gui.components.events.AbstractContainerEventHandler
implements net.minecraft.client.gui.components.Renderable, net.minecraft.client.gui.narration.NarratableEntry
Base class for all occulus tab renderers.
To register a tab renderer, call
ArsMagicaAPI.get().registerOcculusTabRenderer(<registered occulus tab>, (occulusTab, player) -> <create your tab renderer>);-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry
net.minecraft.client.gui.narration.NarratableEntry.NarrationPriority -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected final OcculusTabprotected final net.minecraft.client.gui.screens.Screenprotected intprotected intprotected intprotected intprotected final intprotected final intprotected intFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedOcculusTabRenderer(OcculusTab occulusTab, net.minecraft.client.gui.screens.Screen parent) -
Method Summary
Modifier and TypeMethodDescriptionList<? extends net.minecraft.client.gui.components.events.GuiEventListener>children()protected net.minecraft.client.gui.FontgetFont()protected net.minecraft.client.renderer.entity.ItemRendererprotected net.minecraft.client.Minecraftprotected @Nullable net.minecraft.world.entity.player.Playerprotected voidinit()Called while initialization.final voidinit(int width, int height, int screenWidth, int screenHeight, int posX, int posY) Don't call this method, it is used to initialize the values from the parent gui.net.minecraft.client.gui.narration.NarratableEntry.NarrationPriorityfinal voidrender(net.minecraft.client.gui.GuiGraphics graphics, int pMouseX, int pMouseY, float pPartialTicks) Don't call this method, userenderBg(GuiGraphics, int, int, float)andrenderFg(GuiGraphics, int, int, float)instead.protected abstract voidrenderBg(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float partialTicks) Render the background in this method.protected abstract voidrenderFg(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float partialTicks) Render the foreground in this method.voidupdateNarration(net.minecraft.client.gui.narration.NarrationElementOutput pNarrationElementOutput) Methods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocusedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
charTyped, getChildAt, getCurrentFocusPath, isFocused, keyPressed, keyReleased, magicalSpecialHackyFocus, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
getRectangle, isMouseOver, mouseMovedMethods inherited from interface net.minecraft.client.gui.narration.NarratableEntry
isActiveMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Field Details
-
textureHeight
protected final int textureHeight -
textureWidth
protected final int textureWidth -
occulusTab
-
parent
protected final net.minecraft.client.gui.screens.Screen parent -
screenWidth
protected int screenWidth -
screenHeight
protected int screenHeight -
width
protected int width -
height
protected int height -
posX
protected int posX -
posY
protected int posY
-
-
Constructor Details
-
OcculusTabRenderer
-
-
Method Details
-
render
@Internal public final void render(net.minecraft.client.gui.GuiGraphics graphics, int pMouseX, int pMouseY, float pPartialTicks) Don't call this method, userenderBg(GuiGraphics, int, int, float)andrenderFg(GuiGraphics, int, int, float)instead.- Specified by:
renderin interfacenet.minecraft.client.gui.components.Renderable
-
init
@Internal public final void init(int width, int height, int screenWidth, int screenHeight, int posX, int posY) Don't call this method, it is used to initialize the values from the parent gui. -
renderBg
protected abstract void renderBg(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float partialTicks) Render the background in this method. -
renderFg
protected abstract void renderFg(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float partialTicks) Render the foreground in this method. -
children
- Specified by:
childrenin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler
-
narrationPriority
public net.minecraft.client.gui.narration.NarratableEntry.NarrationPriority narrationPriority()- Specified by:
narrationPriorityin interfacenet.minecraft.client.gui.narration.NarratableEntry
-
updateNarration
public void updateNarration(net.minecraft.client.gui.narration.NarrationElementOutput pNarrationElementOutput) - Specified by:
updateNarrationin interfacenet.minecraft.client.gui.narration.NarrationSupplier
-
getPlayer
@Nullable protected @Nullable net.minecraft.world.entity.player.Player getPlayer()- Returns:
- The current player.
-
getFont
protected net.minecraft.client.gui.Font getFont()- Returns:
- The current font.
-
getItemRenderer
protected net.minecraft.client.renderer.entity.ItemRenderer getItemRenderer()- Returns:
- The current item renderer.
-
getMinecraft
protected net.minecraft.client.Minecraft getMinecraft()- Returns:
- The current minecraft instance.
-
init
protected void init()Called while initialization.
-