Class ContainerScreenTerminalStorage<L,C extends ContainerTerminalStorageBase<L>>
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<T>
org.cyclops.cyclopscore.client.gui.container.ContainerScreenExtended<C>
org.cyclops.integratedterminals.client.gui.container.ContainerScreenTerminalStorage<L,C>
- 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<C>,org.cyclops.cyclopscore.inventory.IValueNotifiable
public class ContainerScreenTerminalStorage<L,C extends ContainerTerminalStorageBase<L>>
extends org.cyclops.cyclopscore.client.gui.container.ContainerScreenExtended<C>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe layer to draw on.Nested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.Screen.NarratableSearchResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanprotected final Set<net.minecraft.world.inventory.Slot>Fields inherited from class org.cyclops.cyclopscore.client.gui.container.ContainerScreenExtended
container, offsetX, offsetY, textureFields inherited from class net.minecraft.client.gui.screens.inventory.AbstractContainerScreen
hoveredSlot, imageHeight, imageWidth, INVENTORY_LOCATION, inventoryLabelX, inventoryLabelY, isQuickCrafting, leftPos, menu, playerInventoryTitle, quickCraftSlots, SLOT_ITEM_BLIT_OFFSET, slotColor, titleLabelX, titleLabelY, topPosFields inherited from class net.minecraft.client.gui.screens.Screen
BACKGROUND_LOCATION, font, height, minecraft, renderables, screenExecutor, title, widthFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS -
Constructor Summary
ConstructorsConstructorDescriptionContainerScreenTerminalStorage(C container, net.minecraft.world.entity.player.Inventory inventory, net.minecraft.network.chat.Component title) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidstatic voidblitRescalable(net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.resources.ResourceLocation texture, int p_93145_, int p_93146_, int p_93147_, float p_93148_, float p_93149_, int p_93150_, int p_93151_, int p_93152_, int p_93153_, int realWidth, int realHeight) booleancharTyped(char keyCode, int scanCode) protected voidclearCraftingGrid(boolean toStorage) protected net.minecraft.resources.ResourceLocationvoidprotected voiddrawCurrentScreen(net.minecraft.client.gui.GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks) protected voiddrawTabContents(net.minecraft.client.gui.GuiGraphics guiGraphics, String tabId, int channel, ContainerScreenTerminalStorage.DrawLayer layer, float partialTick, int x, int y, int mouseX, int mouseY) protected voiddrawTabsBackground(net.minecraft.client.gui.GuiGraphics guiGraphics) protected voiddrawTabsForeground(net.minecraft.client.gui.GuiGraphics guiGraphics, int mouseX, int mouseY) intintprotected Optional<ITerminalStorageTabClient<?>>getClientTab(String tab) protected Optional<ITerminalStorageTabCommon>getCommonTab(String tab) org.cyclops.cyclopscore.client.gui.component.input.WidgetTextFieldExtendedintintgetMenu()protected intprotected intintintprotected intprotected intprotected intprotected intprotected intnet.minecraft.world.inventory.Slotprotected intintgetStorageSlotIndexAtPosition(double mouseX, double mouseY) net.minecraft.client.renderer.Rect2igetStorageSlotRect(int slotIndex) Returns the rectangle that a storage slot occupies even if the slot is not visible.protected Optional<ITerminalStorageTabClient<?>>getTabByIndex(int tabIndex) protected booleanhandleKeyCodeFirst(int keyCode, int scanCode) protected booleanhandleKeyCodeLast(int keyCode, int scanCode) voidinit()booleankeyPressed(int keyCode, int scanCode, int modifiers) booleanmouseClicked(double mouseX, double mouseY, int mouseButton) booleanmouseDragged(double mouseX, double mouseY, int mouseButton, double mouseXPrev, double mouseYPrev) booleanmouseReleased(double mouseX, double mouseY, int mouseButton) booleanmouseScrolled(double mouseX, double mouseY, double delta) protected voidprotected voidrenderBg(net.minecraft.client.gui.GuiGraphics guiGraphics, float f, int mouseX, int mouseY) protected voidrenderBgPlayerInventory(net.minecraft.client.gui.GuiGraphics guiGraphics, float f, int mouseX, int mouseY) protected voidrenderBgTab(net.minecraft.client.gui.GuiGraphics guiGraphics, float f, int mouseX, int mouseY) protected voidrenderLabels(net.minecraft.client.gui.GuiGraphics guiGraphics, int mouseX, int mouseY) voidprotected voidsetTabByIndex(int tabIndex) Methods inherited from class org.cyclops.cyclopscore.client.gui.container.ContainerScreenExtended
createServerPressable, drawTooltip, getGuiLeftTotal, getGuiTexture, getGuiTopTotal, getValueNotifiableType, isHovering, isHovering, isPointInRegion, onUpdate, refreshValues, renderMethods inherited from class net.minecraft.client.gui.screens.inventory.AbstractContainerScreen
checkHotbarKeyPressed, clearDraggingState, getGuiLeft, getGuiTop, getSlotColor, getTooltipFromContainerItem, getXSize, getYSize, hasClickedOutside, isPauseScreen, onClose, removed, renderSlotHighlight, renderSlotHighlight, renderTooltip, slotClicked, tickMethods inherited from class net.minecraft.client.gui.screens.Screen
added, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, changeFocus, children, clearWidgets, findNarratableWidget, getBackgroundMusic, getMinecraft, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, hideWidgets, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, narrationEnabled, onFilesDrop, rebuildWidgets, removeWidget, renderBackground, renderDirtBackground, renderWithTooltip, repositionElements, resize, setInitialFocus, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldCloseOnEsc, shouldNarrateNavigation, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, 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
getChildAt, getCurrentFocusPath, isFocused, keyReleased, magicalSpecialHackyFocus, 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
-
terminalDragSplittingSlots
-
terminalDragSplitting
protected boolean terminalDragSplitting -
swallowNextCharacter
protected boolean swallowNextCharacter
-
-
Constructor Details
-
ContainerScreenTerminalStorage
public ContainerScreenTerminalStorage(C container, net.minecraft.world.entity.player.Inventory inventory, net.minecraft.network.chat.Component title)
-
-
Method Details
-
init
public void init()- Overrides:
initin classorg.cyclops.cyclopscore.client.gui.container.ContainerScreenExtended<C extends ContainerTerminalStorageBase<L>>
-
repositionInventorySlots
public void repositionInventorySlots() -
containerTick
public void containerTick()- Overrides:
containerTickin classnet.minecraft.client.gui.screens.inventory.AbstractContainerScreen<C extends ContainerTerminalStorageBase<L>>
-
constructGuiTexture
protected net.minecraft.resources.ResourceLocation constructGuiTexture()- Specified by:
constructGuiTexturein classorg.cyclops.cyclopscore.client.gui.container.ContainerScreenExtended<C extends ContainerTerminalStorageBase<L>>
-
getGridXSize
public int getGridXSize() -
getGridYSize
public int getGridYSize() -
getScrollHeight
public int getScrollHeight() -
getSearchWidth
public int getSearchWidth() -
getBaseXSize
public int getBaseXSize()- Overrides:
getBaseXSizein classorg.cyclops.cyclopscore.client.gui.container.ContainerScreenExtended<C extends ContainerTerminalStorageBase<L>>
-
getBaseYSize
public int getBaseYSize()- Overrides:
getBaseYSizein classorg.cyclops.cyclopscore.client.gui.container.ContainerScreenExtended<C extends ContainerTerminalStorageBase<L>>
-
getPlayerInventoryOffsetX
protected int getPlayerInventoryOffsetX() -
getPlayerInventoryOffsetY
protected int getPlayerInventoryOffsetY() -
renderBg
protected void renderBg(net.minecraft.client.gui.GuiGraphics guiGraphics, float f, int mouseX, int mouseY) - Overrides:
renderBgin classorg.cyclops.cyclopscore.client.gui.container.ContainerScreenExtended<C extends ContainerTerminalStorageBase<L>>
-
renderBgTab
protected void renderBgTab(net.minecraft.client.gui.GuiGraphics guiGraphics, float f, int mouseX, int mouseY) -
blitRescalable
public static void blitRescalable(net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.resources.ResourceLocation texture, int p_93145_, int p_93146_, int p_93147_, float p_93148_, float p_93149_, int p_93150_, int p_93151_, int p_93152_, int p_93153_, int realWidth, int realHeight) -
renderBgPlayerInventory
protected void renderBgPlayerInventory(net.minecraft.client.gui.GuiGraphics guiGraphics, float f, int mouseX, int mouseY) -
renderLabels
protected void renderLabels(net.minecraft.client.gui.GuiGraphics guiGraphics, int mouseX, int mouseY) - Overrides:
renderLabelsin classnet.minecraft.client.gui.screens.inventory.AbstractContainerScreen<C extends ContainerTerminalStorageBase<L>>
-
drawCurrentScreen
protected void drawCurrentScreen(net.minecraft.client.gui.GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks) - Overrides:
drawCurrentScreenin classorg.cyclops.cyclopscore.client.gui.container.ContainerScreenExtended<C extends ContainerTerminalStorageBase<L>>
-
getMenu
- Specified by:
getMenuin interfacenet.minecraft.client.gui.screens.inventory.MenuAccess<L>- Overrides:
getMenuin classnet.minecraft.client.gui.screens.inventory.AbstractContainerScreen<C extends ContainerTerminalStorageBase<L>>
-
getTabByIndex
-
setTabByIndex
protected void setTabByIndex(int tabIndex) -
playButtonClickSound
protected void playButtonClickSound() -
mouseClicked
public boolean mouseClicked(double mouseX, double mouseY, int mouseButton) - Specified by:
mouseClickedin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler- Specified by:
mouseClickedin interfacenet.minecraft.client.gui.components.events.GuiEventListener- Overrides:
mouseClickedin classnet.minecraft.client.gui.screens.inventory.AbstractContainerScreen<C extends ContainerTerminalStorageBase<L>>
-
getSlotUnderMouse
@Nullable public net.minecraft.world.inventory.Slot getSlotUnderMouse()- Overrides:
getSlotUnderMousein classnet.minecraft.client.gui.screens.inventory.AbstractContainerScreen<C extends ContainerTerminalStorageBase<L>>
-
mouseDragged
public boolean mouseDragged(double mouseX, double mouseY, int mouseButton, double mouseXPrev, double mouseYPrev) - Specified by:
mouseDraggedin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler- Specified by:
mouseDraggedin interfacenet.minecraft.client.gui.components.events.GuiEventListener- Overrides:
mouseDraggedin classnet.minecraft.client.gui.screens.inventory.AbstractContainerScreen<C extends ContainerTerminalStorageBase<L>>
-
mouseReleased
public boolean mouseReleased(double mouseX, double mouseY, int mouseButton) - Specified by:
mouseReleasedin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler- Specified by:
mouseReleasedin interfacenet.minecraft.client.gui.components.events.GuiEventListener- Overrides:
mouseReleasedin classnet.minecraft.client.gui.screens.inventory.AbstractContainerScreen<C extends ContainerTerminalStorageBase<L>>
-
mouseScrolled
public boolean mouseScrolled(double mouseX, double mouseY, double delta) -
handleKeyCodeFirst
protected boolean handleKeyCodeFirst(int keyCode, int scanCode) -
handleKeyCodeLast
protected boolean handleKeyCodeLast(int keyCode, int scanCode) -
charTyped
public boolean charTyped(char keyCode, int scanCode) -
keyPressed
public boolean keyPressed(int keyCode, int scanCode, int modifiers) - Specified by:
keyPressedin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler- Specified by:
keyPressedin interfacenet.minecraft.client.gui.components.events.GuiEventListener- Overrides:
keyPressedin classnet.minecraft.client.gui.screens.inventory.AbstractContainerScreen<C extends ContainerTerminalStorageBase<L>>
-
clearCraftingGrid
protected void clearCraftingGrid(boolean toStorage) -
balanceCraftingGrid
protected void balanceCraftingGrid() -
getStorageSlotIndexAtPosition
public int getStorageSlotIndexAtPosition(double mouseX, double mouseY) -
getStorageSlotRect
public net.minecraft.client.renderer.Rect2i getStorageSlotRect(int slotIndex) Returns the rectangle that a storage slot occupies even if the slot is not visible. UsegetStorageSlotIndexAtPosition(double, double)to get a currently visible slot.- Parameters:
slotIndex-- Returns:
Rect2iof the slot.
-
drawTabsBackground
protected void drawTabsBackground(net.minecraft.client.gui.GuiGraphics guiGraphics) -
getSlotsOffsetX
protected int getSlotsOffsetX() -
getSlotsOffsetY
protected int getSlotsOffsetY() -
getSlotVisibleRows
protected int getSlotVisibleRows() -
getSlotRowLength
protected int getSlotRowLength() -
getSelectedFirstRow
protected int getSelectedFirstRow() -
drawTabContents
protected void drawTabContents(net.minecraft.client.gui.GuiGraphics guiGraphics, String tabId, int channel, ContainerScreenTerminalStorage.DrawLayer layer, float partialTick, int x, int y, int mouseX, int mouseY) -
getClientTab
-
getCommonTab
-
getSelectedClientTab
-
getSelectedClientTabIndex
protected int getSelectedClientTabIndex() -
drawTabsForeground
protected void drawTabsForeground(net.minecraft.client.gui.GuiGraphics guiGraphics, int mouseX, int mouseY) -
getFieldSearch
public org.cyclops.cyclopscore.client.gui.component.input.WidgetTextFieldExtended getFieldSearch()
-