Class OcculusTabRenderer
java.lang.Object
net.minecraft.client.gui.GuiComponent
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.Widget,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.Widget, 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 IOcculusTabprotected final net.minecraft.client.gui.screens.Screenprotected intprotected intprotected intprotected intprotected final intprotected final intprotected intFields inherited from class net.minecraft.client.gui.GuiComponent
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATIONFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedOcculusTabRenderer(IOcculusTab 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(com.mojang.blaze3d.vertex.PoseStack pMatrixStack, int pMouseX, int pMouseY, float pPartialTicks) Don't call this method, userenderBg(PoseStack, int, int, float)andrenderFg(PoseStack, int, int, float)instead.protected abstract voidrenderBg(com.mojang.blaze3d.vertex.PoseStack stack, int mouseX, int mouseY, float partialTicks) Render the background in this method.protected abstract voidrenderFg(com.mojang.blaze3d.vertex.PoseStack stack, 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 net.minecraft.client.gui.GuiComponent
blit, blit, blit, blit, blit, blitOutlineBlack, drawCenteredString, drawCenteredString, drawCenteredString, drawString, drawString, drawString, fill, fillGradient, fillGradient, fillGradient, getBlitOffset, hLine, setBlitOffset, vLineMethods 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
changeFocus, charTyped, getChildAt, keyPressed, keyReleased, magicalSpecialHackyFocus, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, setInitialFocusMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
isMouseOver, mouseMovedMethods inherited from interface net.minecraft.client.gui.narration.NarratableEntry
isActive
-
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
protected OcculusTabRenderer(IOcculusTab occulusTab, net.minecraft.client.gui.screens.Screen parent)
-
-
Method Details
-
render
@Internal public final void render(com.mojang.blaze3d.vertex.PoseStack pMatrixStack, int pMouseX, int pMouseY, float pPartialTicks) Don't call this method, userenderBg(PoseStack, int, int, float)andrenderFg(PoseStack, int, int, float)instead.- Specified by:
renderin interfacenet.minecraft.client.gui.components.Widget
-
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(com.mojang.blaze3d.vertex.PoseStack stack, int mouseX, int mouseY, float partialTicks) Render the background in this method. -
renderFg
protected abstract void renderFg(com.mojang.blaze3d.vertex.PoseStack stack, 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.
-