Class AbstractLazuliMenuScreen<T extends AbstractLazuliContainer>
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
top.girlkisser.lazuli.api.client.screen.AbstractLazuliMenuScreen<T>
- Type Parameters:
T- The container that the screen is for.
- 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.screens.inventory.MenuAccess<T>
public abstract class AbstractLazuliMenuScreen<T extends AbstractLazuliContainer>
extends net.minecraft.client.gui.screens.Screen
implements net.minecraft.client.gui.screens.inventory.MenuAccess<T>
Provides a basic
Screen that does not implement ContainerScreen.-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.Screen.NarratableSearchResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intThe screen's height.protected intThe screen's width.protected intThe screen's X position on the window.protected TThe menu.protected intThe screen's Y position on the window.Fields inherited from class net.minecraft.client.gui.screens.Screen
CUBE_MAP, font, FOOTER_SEPARATOR, HEADER_SEPARATOR, height, INWORLD_FOOTER_SEPARATOR, INWORLD_HEADER_SEPARATOR, MENU_BACKGROUND, minecraft, narratorButton, PANORAMA, renderables, screenExecutor, title, widthFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractLazuliMenuScreen(T menu, net.minecraft.network.chat.Component title) Provides a basicScreenthat does not implementContainerScreen. -
Method Summary
Modifier and TypeMethodDescriptionintGet the X position of the screen.intGet the Y position of the screen.getMenu()protected abstract net.minecraft.resources.ResourceLocationgetUI()Gets the texture to use for the screen's background.protected voidinit()voidrenderBackground(net.minecraft.client.gui.GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) protected voidrenderBg(net.minecraft.client.gui.GuiGraphics graphics, float partialTick, int mouseX, int mouseY) Renders the background.Methods inherited from class net.minecraft.client.gui.screens.Screen
added, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, changeFocus, children, clearFocus, clearTooltipForNextRenderPass, clearWidgets, findNarratableWidget, getBackgroundMusic, getMinecraft, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, keyPressed, onClose, onFilesDrop, rebuildWidgets, removed, removeWidget, render, renderBlurredBackground, renderMenuBackground, renderMenuBackground, renderMenuBackgroundTexture, renderPanorama, renderTransparentBackground, renderWithTooltip, repositionElements, resize, setInitialFocus, setInitialFocus, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldCloseOnEsc, shouldNarrateNavigation, tick, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, updateNarratorStatus, wrapScreenErrorMethods 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, keyReleased, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMovedMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Field Details
-
leftPos
protected int leftPosThe screen's X position on the window. -
topPos
protected int topPosThe screen's Y position on the window. -
imageWidth
protected int imageWidthThe screen's width. -
imageHeight
protected int imageHeightThe screen's height.
-
Constructor Details
-
AbstractLazuliMenuScreen
Provides a basicScreenthat does not implementContainerScreen.- Parameters:
menu- The menu.title- The screen's title.
-
-
Method Details
-
getUI
protected abstract net.minecraft.resources.ResourceLocation getUI()Gets the texture to use for the screen's background.- Returns:
- The texture.
-
getMenu
- Specified by:
getMenuin interfacenet.minecraft.client.gui.screens.inventory.MenuAccess<T extends AbstractLazuliContainer>
-
init
protected void init()- Overrides:
initin classnet.minecraft.client.gui.screens.Screen
-
renderBackground
public void renderBackground(net.minecraft.client.gui.GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) - Overrides:
renderBackgroundin classnet.minecraft.client.gui.screens.Screen
-
renderBg
protected void renderBg(net.minecraft.client.gui.GuiGraphics graphics, float partialTick, int mouseX, int mouseY) Renders the background.- Parameters:
graphics-GuiGraphicsto render using.partialTick- The game's partial tick.mouseX- The mouse's X position.mouseY- The mouse's Y position.
-
getGuiLeft
public int getGuiLeft()Get the X position of the screen.- Returns:
- The position.
-
getGuiTop
public int getGuiTop()Get the Y position of the screen.- Returns:
- The position.
-