Package net.minecraft.src
Class GuiContainer
java.lang.Object
net.minecraft.src.Gui
net.minecraft.src.GuiScreen
net.minecraft.src.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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final ResourceLocationprotected booleanprotected final Setprotected intStarting X position for the Gui.protected intStarting Y position for the Gui.A list of the players inventory slots.protected static RenderItemStacks renderer.protected intThe X size of the inventory window in pixels.protected intThe Y size of the inventory window in pixels.Fields inherited from class net.minecraft.src.GuiScreen
allowUserInput, buttonList, fontRenderer, height, mc, widthFields inherited from class net.minecraft.src.Gui
icons, optionsBackground, statIcons, zLevel -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancheckHotbarKeys(int par1) This function is what controls the hotbar shortcut check when you press a number key when hovering a stack.booleanReturns true if this GUI should pause the game when it is displayed in single-playerprotected voiddrawCreativeTabHoveringText(String par1Str, int par2, int par3) Draws the text when mouse is over creative inventory tab.protected abstract voiddrawGuiContainerBackgroundLayer(float var1, int var2, int var3) Draw the background layer for the GuiContainer (everything behind the items)protected voiddrawGuiContainerForegroundLayer(int par1, int par2) Draw the foreground layer for the GuiContainer (everything in front of the items)protected voiddrawItemStackTooltip(ItemStack par1ItemStack, int par2, int par3) voiddrawScreen(int par1, int par2, float par3) Draws the screen and all the components in it.protected voidfunc_102021_a(List par1List, int par2, int par3) intintintgetxSize()intgetySize()protected voidhandleMouseClick(Slot par1Slot, int par2, int par3, int par4) voidinitGui()Adds the buttons (and other controls) to the screen in question.static booleanprotected booleanisPointInRegion(int par1, int par2, int par3, int par4, int par5, int par6) Args: left, top, width, height, pointX, pointY.protected voidkeyTyped(char par1, int par2) Fired when a key is typed.protected voidmouseClicked(int par1, int par2, int par3) Called when the mouse is clicked.protected voidmouseClickMove(int par1, int par2, int par3, long par4) Called when a mouse button is pressed and the mouse is moved around.protected voidmouseMovedOrUp(int par1, int par2, int par3) Called when the mouse is moved or a mouse button is released.voidCalled when the screen is unloaded.voidCalled from the main game loop to update the screen.Methods inherited from class net.minecraft.src.GuiScreen
actionPerformed, confirmClicked, drawBackground, drawDefaultBackground, drawWorldBackground, getClipboardString, handleInput, handleKeyboardInput, handleMouseInput, isCtrlKeyDown, isShiftKeyDown, setClipboardString, setWorldAndResolutionMethods inherited from class net.minecraft.src.Gui
drawCenteredString, drawGradientRect, drawHorizontalLine, drawRect, drawString, drawTexturedModalRect, drawTexturedModelRectFromIcon, drawVerticalLine
-
Field Details
-
field_110408_a
-
itemRenderer
Stacks renderer. Icons, stack size, health, etc... -
xSize
protected int xSizeThe X size of the inventory window in pixels. -
ySize
protected int ySizeThe Y size of the inventory window in pixels. -
inventorySlots
A list of the players inventory slots. -
guiLeft
protected int guiLeftStarting X position for the Gui. Inconsistent use for Gui backgrounds. -
guiTop
protected int guiTopStarting Y position for the Gui. Inconsistent use for Gui backgrounds. -
field_94077_p
-
field_94076_q
protected boolean field_94076_q
-
-
Constructor Details
-
GuiContainer
-
-
Method Details
-
initGui
public void initGui()Adds the buttons (and other controls) to the screen in question. -
drawScreen
public void drawScreen(int par1, int par2, float par3) Draws the screen and all the components in it.- Overrides:
drawScreenin classGuiScreen
-
drawItemStackTooltip
-
drawCreativeTabHoveringText
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
-
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:
mouseClickedin classGuiScreen
-
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:
mouseClickMovein classGuiScreen
-
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:
mouseMovedOrUpin classGuiScreen
-
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
-
keyTyped
protected void keyTyped(char par1, int par2) Fired when a key is typed. This is the equivalent of KeyListener.keyTyped(KeyEvent e). -
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:
onGuiClosedin classGuiScreen
-
doesGuiPauseGame
public boolean doesGuiPauseGame()Returns true if this GUI should pause the game when it is displayed in single-player- Overrides:
doesGuiPauseGamein classGuiScreen
-
updateScreen
public void updateScreen()Called from the main game loop to update the screen.- Overrides:
updateScreenin classGuiScreen
-
installationIntegrityTest
public static boolean installationIntegrityTest() -
getTheSlot
-
getGuiLeft
public int getGuiLeft() -
getGuiTop
public int getGuiTop() -
getxSize
public int getxSize() -
getySize
public int getySize()
-