Klasse EngineContainerScreen<M extends net.minecraft.world.inventory.AbstractContainerMenu>
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<M>
de.luckymcdev.foundryengine.client.ui.screen.EngineContainerScreen<M>
- Alle implementierten Schnittstellen:
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<M>
public abstract class EngineContainerScreen<M extends net.minecraft.world.inventory.AbstractContainerMenu>
extends net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<M>
Base class for container screens that integrates the Taffy-based widget system.
Extends
AbstractContainerScreen
to provide slot rendering alongside custom widgets (buttons, panels, text, etc.).-
Verschachtelte Klassen - Übersicht
Von Klasse geerbte verschachtelte Klassen/Schnittstellen net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.Screen.NarratableSearchResult -
Feldübersicht
Von Klasse geerbte Felder net.minecraft.client.gui.screens.inventory.AbstractContainerScreen
BACKGROUND_TEXTURE_HEIGHT, BACKGROUND_TEXTURE_WIDTH, DEFAULT_IMAGE_HEIGHT, DEFAULT_IMAGE_WIDTH, hoveredSlot, imageHeight, imageWidth, INVENTORY_LOCATION, inventoryLabelX, inventoryLabelY, isQuickCrafting, leftPos, menu, playerInventoryTitle, quickCraftSlots, titleLabelX, titleLabelY, topPosVon Klasse geerbte Felder net.minecraft.client.gui.screens.Screen
FADE_IN_TIME, font, FOOTER_SEPARATOR, HEADER_SEPARATOR, height, INWORLD_FOOTER_SEPARATOR, INWORLD_HEADER_SEPARATOR, MENU_BACKGROUND, minecraft, narratorButton, renderables, screenExecutor, title, width -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungEngineContainerScreen(M menu, net.minecraft.world.entity.player.Inventory inventory, net.minecraft.network.chat.Component title) EngineContainerScreen(M menu, net.minecraft.world.entity.player.Inventory inventory, net.minecraft.network.chat.Component title, boolean debug) -
Methodenübersicht
Modifikator und TypMethodeBeschreibungvoidaddBackgroundWidget(WidgetBase widget) Adds a background widget (rendered behind slots Ungültige Eingabe: "&" labels).voidaddBackgroundWidgets(WidgetBase... widgets) Adds background widgets.voidaddWidget(WidgetBase widget) Adds a foreground widget (rendered above slots, below carried item / tooltips).voidaddWidgets(WidgetBase... widgets) Adds foreground widgets.booleancharTyped(net.minecraft.client.input.CharacterEvent event) protected final voidvoiddoTick()Override to run per-game-tick logic alongside the widgets.voidextractBackground(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float partialTick) voidextractRenderState(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int mouseX, int mouseY, float partialTick) protected final UIAreaThe pixel rect occupied by the container GUI (slots + labels).protected UIAreaArea the widget trees are laid out within.protected voidinit()protected final booleanWhetherinit()has completed at least once (i.e. the widget trees exist).booleankeyPressed(net.minecraft.client.input.KeyEvent event) booleankeyReleased(net.minecraft.client.input.KeyEvent event) booleanmouseClicked(net.minecraft.client.input.MouseButtonEvent event, boolean doubleClick) booleanmouseDragged(net.minecraft.client.input.MouseButtonEvent event, double dx, double dy) booleanmouseReleased(net.minecraft.client.input.MouseButtonEvent event) booleanmouseScrolled(double mouseX, double mouseY, double scrollX, double scrollY) voidremoveBackgroundWidget(WidgetBase widget) Removes a background widget.voidremoveWidget(WidgetBase widget) Removes a foreground widget.voidresize(int width, int height) protected final booleanGuards one-time widget construction acrossinit()calls.booleanVon Klasse geerbte Methoden net.minecraft.client.gui.screens.inventory.AbstractContainerScreen
addItemSlotMouseAction, checkHotbarKeyPressed, clearDraggingState, extractCarriedItem, extractContents, extractLabels, extractSlot, extractSlots, extractSnapbackItem, extractTooltip, getGuiLeft, getGuiTop, getHoveredSlot, getImageHeight, getImageWidth, getLeftPos, getMenu, getSlotUnderMouse, getTooltipFromContainerItem, getTopPos, getXSize, getYSize, handleSlotStateChanged, hasClickedOutside, isHovering, isInGameUi, isPauseScreen, onClose, removed, renderSlotContents, slotClicked, tickVon Klasse geerbte Methoden net.minecraft.client.gui.screens.Screen
added, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, canInterruptWithAnotherScreen, changeFocus, children, clearFocus, clearWidgets, clickCommandAction, clickUrlAction, defaultHandleClickEvent, defaultHandleGameClickEvent, extractBlurredBackground, extractMenuBackground, extractMenuBackground, extractMenuBackgroundTexture, extractPanorama, extractRenderStateWithTooltipAndSubtitles, extractTransparentBackground, fadeWidgets, fillCrashDetails, findNarratableWidget, getBackgroundMusic, getFont, getMinecraft, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleDelayedNarration, init, insertText, isAllowedInPortal, isMouseOver, isValidCharacterForName, onFilesDrop, panoramaShouldSpin, rebuildWidgets, removeWidget, repositionElements, setInitialFocus, setInitialFocus, shouldCloseOnEsc, shouldNarrateNavigation, showsActiveEffects, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, updateNarratorStatusVon Klasse geerbte Methoden net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocusedVon Klasse geerbte Methoden Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden net.minecraft.client.gui.components.events.ContainerEventHandler
getBorderForArrowNavigation, getChildAt, getCurrentFocusPath, isFocused, nextFocusPath, preeditUpdated, setFocusedVon Schnittstelle geerbte Methoden net.minecraft.client.gui.components.events.GuiEventListener
mouseMoved, shouldTakeFocusAfterInteractionVon Schnittstelle geerbte Methoden net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Konstruktordetails
-
EngineContainerScreen
public EngineContainerScreen(M menu, net.minecraft.world.entity.player.Inventory inventory, net.minecraft.network.chat.Component title, boolean debug) -
EngineContainerScreen
public EngineContainerScreen(M menu, net.minecraft.world.entity.player.Inventory inventory, net.minecraft.network.chat.Component title)
-
-
Methodendetails
-
shouldDebug
public boolean shouldDebug() -
shouldBuildWidgets
protected final boolean shouldBuildWidgets()Guards one-time widget construction acrossinit()calls. Minecraft re-invokesinit()on every resize; returningtrueonly on the first call prevents screens from re-adding their widget tree (which would render duplicates). -
isWidgetsInitialized
protected final boolean isWidgetsInitialized()Whetherinit()has completed at least once (i.e. the widget trees exist). -
getWidgetArea
Area the widget trees are laid out within. Defaults to the full screen. Override and returngetGuiArea()to place widgets relative to the container GUI (so their coordinates ignore where the GUI is on-screen). -
getGuiArea
The pixel rect occupied by the container GUI (slots + labels). Widgets laid out against this rect use(0,0)as the top-left of the container frame. -
init
protected void init()- Setzt außer Kraft:
initin Klassenet.minecraft.client.gui.screens.inventory.AbstractContainerScreen<M extends net.minecraft.world.inventory.AbstractContainerMenu>
-
resize
public void resize(int width, int height) - Setzt außer Kraft:
resizein Klassenet.minecraft.client.gui.screens.Screen
-
addWidget
Adds a foreground widget (rendered above slots, below carried item / tooltips). -
addWidgets
Adds foreground widgets. -
removeWidget
Removes a foreground widget. -
addBackgroundWidget
Adds a background widget (rendered behind slots Ungültige Eingabe: "&" labels). -
addBackgroundWidgets
Adds background widgets. -
removeBackgroundWidget
Removes a background widget. -
doTick
public void doTick()Override to run per-game-tick logic alongside the widgets. -
containerTick
protected final void containerTick()- Setzt außer Kraft:
containerTickin Klassenet.minecraft.client.gui.screens.inventory.AbstractContainerScreen<M extends net.minecraft.world.inventory.AbstractContainerMenu>
-
extractBackground
public void extractBackground(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float partialTick) - Setzt außer Kraft:
extractBackgroundin Klassenet.minecraft.client.gui.screens.Screen
-
extractRenderState
public void extractRenderState(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int mouseX, int mouseY, float partialTick) - Angegeben von:
extractRenderStatein Schnittstellenet.minecraft.client.gui.components.Renderable- Setzt außer Kraft:
extractRenderStatein Klassenet.minecraft.client.gui.screens.inventory.AbstractContainerScreen<M extends net.minecraft.world.inventory.AbstractContainerMenu>
-
mouseClicked
public boolean mouseClicked(net.minecraft.client.input.MouseButtonEvent event, boolean doubleClick) - Angegeben von:
mouseClickedin Schnittstellenet.minecraft.client.gui.components.events.ContainerEventHandler- Angegeben von:
mouseClickedin Schnittstellenet.minecraft.client.gui.components.events.GuiEventListener- Setzt außer Kraft:
mouseClickedin Klassenet.minecraft.client.gui.screens.inventory.AbstractContainerScreen<M extends net.minecraft.world.inventory.AbstractContainerMenu>
-
mouseReleased
public boolean mouseReleased(net.minecraft.client.input.MouseButtonEvent event) - Angegeben von:
mouseReleasedin Schnittstellenet.minecraft.client.gui.components.events.ContainerEventHandler- Angegeben von:
mouseReleasedin Schnittstellenet.minecraft.client.gui.components.events.GuiEventListener- Setzt außer Kraft:
mouseReleasedin Klassenet.minecraft.client.gui.screens.inventory.AbstractContainerScreen<M extends net.minecraft.world.inventory.AbstractContainerMenu>
-
mouseScrolled
public boolean mouseScrolled(double mouseX, double mouseY, double scrollX, double scrollY) - Angegeben von:
mouseScrolledin Schnittstellenet.minecraft.client.gui.components.events.ContainerEventHandler- Angegeben von:
mouseScrolledin Schnittstellenet.minecraft.client.gui.components.events.GuiEventListener- Setzt außer Kraft:
mouseScrolledin Klassenet.minecraft.client.gui.screens.inventory.AbstractContainerScreen<M extends net.minecraft.world.inventory.AbstractContainerMenu>
-
mouseDragged
public boolean mouseDragged(net.minecraft.client.input.MouseButtonEvent event, double dx, double dy) - Angegeben von:
mouseDraggedin Schnittstellenet.minecraft.client.gui.components.events.ContainerEventHandler- Angegeben von:
mouseDraggedin Schnittstellenet.minecraft.client.gui.components.events.GuiEventListener- Setzt außer Kraft:
mouseDraggedin Klassenet.minecraft.client.gui.screens.inventory.AbstractContainerScreen<M extends net.minecraft.world.inventory.AbstractContainerMenu>
-
keyPressed
public boolean keyPressed(net.minecraft.client.input.KeyEvent event) - Angegeben von:
keyPressedin Schnittstellenet.minecraft.client.gui.components.events.ContainerEventHandler- Angegeben von:
keyPressedin Schnittstellenet.minecraft.client.gui.components.events.GuiEventListener- Setzt außer Kraft:
keyPressedin Klassenet.minecraft.client.gui.screens.inventory.AbstractContainerScreen<M extends net.minecraft.world.inventory.AbstractContainerMenu>
-
keyReleased
public boolean keyReleased(net.minecraft.client.input.KeyEvent event) -
charTyped
public boolean charTyped(net.minecraft.client.input.CharacterEvent event)
-