Class GuiContainer

Direct Known Subclasses:
BlockDispenserGui, CookingVesselGui, CraftingGuiSoulforge, CraftingGuiWorkbench, GuiBeacon, GuiBrewingStand, GuiChest, GuiCrafting, GuiDispenser, GuiEnchantment, GuiFurnace, GuiHopper, GuiMerchant, GuiRepair, GuiScreenHorseInventory, HamperGui, HopperGui, InfernalEnchanterGui, InventoryEffectRenderer, LoomGui, PulleyGui, RenameItemGui

@Environment(CLIENT) public abstract class GuiContainer extends GuiScreen
  • Field Details

    • field_110408_a

      protected static final ResourceLocation field_110408_a
    • itemRenderer

      protected static RenderItem itemRenderer
      Stacks renderer. Icons, stack size, health, etc...
    • xSize

      protected int xSize
      The X size of the inventory window in pixels.
    • ySize

      protected int ySize
      The Y size of the inventory window in pixels.
    • inventorySlots

      public Container inventorySlots
      A list of the players inventory slots.
    • guiLeft

      protected int guiLeft
      Starting X position for the Gui. Inconsistent use for Gui backgrounds.
    • guiTop

      protected int guiTop
      Starting Y position for the Gui. Inconsistent use for Gui backgrounds.
    • field_94077_p

      protected final Set field_94077_p
    • field_94076_q

      protected boolean field_94076_q
  • Constructor Details

    • GuiContainer

      public GuiContainer(Container par1Container)
  • Method Details

    • initGui

      public void initGui()
      Adds the buttons (and other controls) to the screen in question.
      Overrides:
      initGui in class GuiScreen
    • drawScreen

      public void drawScreen(int par1, int par2, float par3)
      Draws the screen and all the components in it.
      Overrides:
      drawScreen in class GuiScreen
    • drawItemStackTooltip

      protected void drawItemStackTooltip(ItemStack par1ItemStack, int par2, int par3)
    • drawCreativeTabHoveringText

      protected void drawCreativeTabHoveringText(String par1Str, int par2, int par3)
      Draws the text when mouse is over creative inventory tab. Params: current creative tab to be checked, current mouse x position, current mouse y position.
    • func_102021_a

      protected void func_102021_a(List par1List, int par2, int par3)
    • drawGuiContainerForegroundLayer

      protected void drawGuiContainerForegroundLayer(int par1, int par2)
      Draw the foreground layer for the GuiContainer (everything in front of the items)
    • drawGuiContainerBackgroundLayer

      protected abstract void drawGuiContainerBackgroundLayer(float var1, int var2, int var3)
      Draw the background layer for the GuiContainer (everything behind the items)
    • mouseClicked

      protected void mouseClicked(int par1, int par2, int par3)
      Called when the mouse is clicked.
      Overrides:
      mouseClicked in class GuiScreen
    • mouseClickMove

      protected void mouseClickMove(int par1, int par2, int par3, long par4)
      Called when a mouse button is pressed and the mouse is moved around. Parameters are : mouseX, mouseY, lastButtonClicked and timeSinceMouseClick.
      Overrides:
      mouseClickMove in class GuiScreen
    • mouseMovedOrUp

      protected void mouseMovedOrUp(int par1, int par2, int par3)
      Called when the mouse is moved or a mouse button is released. Signature: (mouseX, mouseY, which) which==-1 is mouseMove, which==0 or which==1 is mouseUp
      Overrides:
      mouseMovedOrUp in class GuiScreen
    • isPointInRegion

      protected boolean isPointInRegion(int par1, int par2, int par3, int par4, int par5, int par6)
      Args: left, top, width, height, pointX, pointY. Note: left, top are local to Gui, pointX, pointY are local to screen
    • handleMouseClick

      protected void handleMouseClick(Slot par1Slot, int par2, int par3, int par4)
    • keyTyped

      protected void keyTyped(char par1, int par2)
      Fired when a key is typed. This is the equivalent of KeyListener.keyTyped(KeyEvent e).
      Overrides:
      keyTyped in class GuiScreen
    • checkHotbarKeys

      protected boolean checkHotbarKeys(int par1)
      This function is what controls the hotbar shortcut check when you press a number key when hovering a stack.
    • onGuiClosed

      public void onGuiClosed()
      Called when the screen is unloaded. Used to disable keyboard repeat events
      Overrides:
      onGuiClosed in class GuiScreen
    • doesGuiPauseGame

      public boolean doesGuiPauseGame()
      Returns true if this GUI should pause the game when it is displayed in single-player
      Overrides:
      doesGuiPauseGame in class GuiScreen
    • updateScreen

      public void updateScreen()
      Called from the main game loop to update the screen.
      Overrides:
      updateScreen in class GuiScreen
    • installationIntegrityTest

      public static boolean installationIntegrityTest()
    • getTheSlot

      public Slot getTheSlot()
    • getGuiLeft

      public int getGuiLeft()
    • getGuiTop

      public int getGuiTop()
    • getxSize

      public int getxSize()
    • getySize

      public int getySize()