Class ContainerScreenTerminalStorage<L,C extends ContainerTerminalStorageBase<L>>

java.lang.Object
net.minecraft.client.gui.GuiComponent
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.Widget, 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 Classes
    Modifier and Type
    Class
    Description
    static enum 
    The 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

    Fields
    Modifier and Type
    Field
    Description
    protected boolean
     
    protected final Set<net.minecraft.world.inventory.Slot>
     

    Fields inherited from class org.cyclops.cyclopscore.client.gui.container.ContainerScreenExtended

    container, offsetX, offsetY, texture

    Fields 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, topPos

    Fields inherited from class net.minecraft.client.gui.screens.Screen

    font, height, itemRenderer, minecraft, passEvents, renderables, title, width

    Fields inherited from class net.minecraft.client.gui.GuiComponent

    BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION

    Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener

    DOUBLE_CLICK_THRESHOLD_MS
  • Constructor Summary

    Constructors
    Constructor
    Description
    ContainerScreenTerminalStorage(C container, net.minecraft.world.entity.player.Inventory inventory, net.minecraft.network.chat.Component title)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
     
    static void
    blitRescalable(com.mojang.blaze3d.vertex.PoseStack p_93144_, 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)
     
    boolean
    charTyped(char keyCode, int scanCode)
     
    protected void
    clearCraftingGrid(boolean toStorage)
     
    protected net.minecraft.resources.ResourceLocation
     
    void
     
    protected void
    drawCurrentScreen(com.mojang.blaze3d.vertex.PoseStack matrixStack, int mouseX, int mouseY, float partialTicks)
     
    protected void
    drawTabContents(com.mojang.blaze3d.vertex.PoseStack matrixStack, String tabId, int channel, ContainerScreenTerminalStorage.DrawLayer layer, float partialTick, int x, int y, int mouseX, int mouseY)
     
    protected void
    drawTabsBackground(com.mojang.blaze3d.vertex.PoseStack matrixStack)
     
    protected void
    drawTabsForeground(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY)
     
    int
     
    int
     
     
     
    org.cyclops.cyclopscore.client.gui.component.input.WidgetTextFieldExtended
     
    int
     
    int
     
     
    protected int
     
    protected int
     
    int
     
    int
     
     
    protected int
     
    protected int
     
    protected int
     
    protected int
     
    protected int
     
    net.minecraft.world.inventory.Slot
     
    protected int
     
    int
    getStorageSlotIndexAtPosition(double mouseX, double mouseY)
     
    getTabByIndex(int tabIndex)
     
    protected boolean
    handleKeyCodeFirst(int keyCode, int scanCode)
     
    protected boolean
    handleKeyCodeLast(int keyCode, int scanCode)
     
    void
     
    boolean
    keyPressed(int keyCode, int scanCode, int modifiers)
     
    boolean
    mouseClicked(double mouseX, double mouseY, int mouseButton)
     
    boolean
    mouseDragged(double mouseX, double mouseY, int mouseButton, double mouseXPrev, double mouseYPrev)
     
    boolean
    mouseReleased(double mouseX, double mouseY, int mouseButton)
     
    boolean
    mouseScrolled(double mouseX, double mouseY, double delta)
     
    protected void
     
    protected void
    renderBg(com.mojang.blaze3d.vertex.PoseStack matrixStack, float f, int mouseX, int mouseY)
     
    protected void
    renderBgPlayerInventory(com.mojang.blaze3d.vertex.PoseStack matrixStack, float f, int mouseX, int mouseY)
     
    protected void
    renderBgTab(com.mojang.blaze3d.vertex.PoseStack matrixStack, float f, int mouseX, int mouseY)
     
    protected void
    renderLabels(com.mojang.blaze3d.vertex.PoseStack matrixStack, int mouseX, int mouseY)
     
    void
     
    protected void
    setTabByIndex(int tabIndex)
     

    Methods inherited from class org.cyclops.cyclopscore.client.gui.container.ContainerScreenExtended

    createServerPressable, drawTooltip, getGuiLeftTotal, getGuiTexture, getGuiTopTotal, getValueNotifiableType, isHovering, isHovering, isPointInRegion, onUpdate, refreshValues, render

    Methods inherited from class net.minecraft.client.gui.screens.inventory.AbstractContainerScreen

    checkHotbarKeyPressed, getGuiLeft, getGuiTop, getSlotColor, getXSize, getYSize, hasClickedOutside, isPauseScreen, onClose, removed, renderSlotHighlight, renderSlotHighlight, renderTooltip, slotClicked, tick

    Methods inherited from class net.minecraft.client.gui.screens.Screen

    addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, children, clearWidgets, findNarratableWidget, getMinecraft, getNarrationMessage, getTitle, getTooltipFromItem, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, hideWidgets, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, narrationEnabled, onFilesDrop, removeWidget, renderBackground, renderBackground, renderComponentHoverEffect, renderComponentTooltip, renderComponentTooltip, renderComponentTooltip, renderComponentTooltip, renderDirtBackground, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, resize, sendMessage, sendMessage, shouldCloseOnEsc, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, wrapScreenError

    Methods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler

    getFocused, isDragging, setDragging, setFocused

    Methods 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, innerBlit, innerBlit, setBlitOffset, vLine

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler

    changeFocus, getChildAt, keyReleased, magicalSpecialHackyFocus, setInitialFocus

    Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener

    mouseMoved
  • Field Details

    • terminalDragSplittingSlots

      protected final Set<net.minecraft.world.inventory.Slot> terminalDragSplittingSlots
    • terminalDragSplitting

      protected boolean terminalDragSplitting
  • 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:
      init in class org.cyclops.cyclopscore.client.gui.container.ContainerScreenExtended<C extends ContainerTerminalStorageBase<L>>
    • repositionInventorySlots

      public void repositionInventorySlots()
    • containerTick

      public void containerTick()
      Overrides:
      containerTick in class net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<C extends ContainerTerminalStorageBase<L>>
    • constructGuiTexture

      protected net.minecraft.resources.ResourceLocation constructGuiTexture()
      Specified by:
      constructGuiTexture in class org.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:
      getBaseXSize in class org.cyclops.cyclopscore.client.gui.container.ContainerScreenExtended<C extends ContainerTerminalStorageBase<L>>
    • getBaseYSize

      public int getBaseYSize()
      Overrides:
      getBaseYSize in class org.cyclops.cyclopscore.client.gui.container.ContainerScreenExtended<C extends ContainerTerminalStorageBase<L>>
    • getPlayerInventoryOffsetX

      protected int getPlayerInventoryOffsetX()
    • getPlayerInventoryOffsetY

      protected int getPlayerInventoryOffsetY()
    • renderBg

      protected void renderBg(com.mojang.blaze3d.vertex.PoseStack matrixStack, float f, int mouseX, int mouseY)
      Overrides:
      renderBg in class org.cyclops.cyclopscore.client.gui.container.ContainerScreenExtended<C extends ContainerTerminalStorageBase<L>>
    • renderBgTab

      protected void renderBgTab(com.mojang.blaze3d.vertex.PoseStack matrixStack, float f, int mouseX, int mouseY)
    • blitRescalable

      public static void blitRescalable(com.mojang.blaze3d.vertex.PoseStack p_93144_, 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(com.mojang.blaze3d.vertex.PoseStack matrixStack, float f, int mouseX, int mouseY)
    • renderLabels

      protected void renderLabels(com.mojang.blaze3d.vertex.PoseStack matrixStack, int mouseX, int mouseY)
      Overrides:
      renderLabels in class net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<C extends ContainerTerminalStorageBase<L>>
    • drawCurrentScreen

      protected void drawCurrentScreen(com.mojang.blaze3d.vertex.PoseStack matrixStack, int mouseX, int mouseY, float partialTicks)
      Overrides:
      drawCurrentScreen in class org.cyclops.cyclopscore.client.gui.container.ContainerScreenExtended<C extends ContainerTerminalStorageBase<L>>
    • getMenu

      public C getMenu()
      Specified by:
      getMenu in interface net.minecraft.client.gui.screens.inventory.MenuAccess<L>
      Overrides:
      getMenu in class net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<C extends ContainerTerminalStorageBase<L>>
    • getTabByIndex

      protected Optional<ITerminalStorageTabClient<?>> getTabByIndex(int tabIndex)
    • setTabByIndex

      protected void setTabByIndex(int tabIndex)
    • playButtonClickSound

      protected void playButtonClickSound()
    • mouseClicked

      public boolean mouseClicked(double mouseX, double mouseY, int mouseButton)
      Specified by:
      mouseClicked in interface net.minecraft.client.gui.components.events.ContainerEventHandler
      Specified by:
      mouseClicked in interface net.minecraft.client.gui.components.events.GuiEventListener
      Overrides:
      mouseClicked in class net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<C extends ContainerTerminalStorageBase<L>>
    • getSlotUnderMouse

      @Nullable public net.minecraft.world.inventory.Slot getSlotUnderMouse()
      Overrides:
      getSlotUnderMouse in class net.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:
      mouseDragged in interface net.minecraft.client.gui.components.events.ContainerEventHandler
      Specified by:
      mouseDragged in interface net.minecraft.client.gui.components.events.GuiEventListener
      Overrides:
      mouseDragged in class net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<C extends ContainerTerminalStorageBase<L>>
    • mouseReleased

      public boolean mouseReleased(double mouseX, double mouseY, int mouseButton)
      Specified by:
      mouseReleased in interface net.minecraft.client.gui.components.events.ContainerEventHandler
      Specified by:
      mouseReleased in interface net.minecraft.client.gui.components.events.GuiEventListener
      Overrides:
      mouseReleased in class net.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:
      keyPressed in interface net.minecraft.client.gui.components.events.ContainerEventHandler
      Specified by:
      keyPressed in interface net.minecraft.client.gui.components.events.GuiEventListener
      Overrides:
      keyPressed in class net.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)
    • drawTabsBackground

      protected void drawTabsBackground(com.mojang.blaze3d.vertex.PoseStack matrixStack)
    • getSlotsOffsetX

      protected int getSlotsOffsetX()
    • getSlotsOffsetY

      protected int getSlotsOffsetY()
    • getSlotVisibleRows

      protected int getSlotVisibleRows()
    • getSlotRowLength

      protected int getSlotRowLength()
    • getSelectedFirstRow

      protected int getSelectedFirstRow()
    • drawTabContents

      protected void drawTabContents(com.mojang.blaze3d.vertex.PoseStack matrixStack, String tabId, int channel, ContainerScreenTerminalStorage.DrawLayer layer, float partialTick, int x, int y, int mouseX, int mouseY)
    • getClientTab

      protected Optional<ITerminalStorageTabClient<?>> getClientTab(String tab)
    • getCommonTab

      protected Optional<ITerminalStorageTabCommon> getCommonTab(String tab)
    • getSelectedClientTab

      public Optional<ITerminalStorageTabClient<?>> getSelectedClientTab()
    • getSelectedClientTabIndex

      protected int getSelectedClientTabIndex()
    • drawTabsForeground

      protected void drawTabsForeground(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY)
    • getFieldSearch

      public org.cyclops.cyclopscore.client.gui.component.input.WidgetTextFieldExtended getFieldSearch()