public abstract class GuiContainer extends GuiScreen
Modifier and Type | Field and Description |
---|---|
private Slot |
clickedSlot |
private Slot |
currentDragTargetSlot |
private boolean |
doubleClick |
private ItemStack |
draggedStack |
private long |
dragItemDropDelay |
protected boolean |
dragSplitting |
private int |
dragSplittingButton |
private int |
dragSplittingLimit |
private int |
dragSplittingRemnant |
protected java.util.Set<Slot> |
dragSplittingSlots |
protected int |
guiLeft |
protected int |
guiTop |
private Slot |
hoveredSlot |
private boolean |
ignoreMouseUp |
static ResourceLocation |
INVENTORY_BACKGROUND |
Container |
inventorySlots |
private boolean |
isRightMouseClick |
private int |
lastClickButton |
private Slot |
lastClickSlot |
private long |
lastClickTime |
private ItemStack |
returningStack |
private Slot |
returningStackDestSlot |
private long |
returningStackTime |
private ItemStack |
shiftClickedSlot |
private int |
touchUpX |
private int |
touchUpY |
protected int |
xSize |
protected int |
ySize |
allowUserInput, buttonList, fontRenderer, height, itemRender, keyHandled, labelList, mc, mouseHandled, selectedButton, width
ICONS, OPTIONS_BACKGROUND, STAT_ICONS, zLevel
Constructor and Description |
---|
GuiContainer(Container inventorySlotsIn) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkHotbarKeys(int keyCode) |
boolean |
doesGuiPauseGame() |
protected abstract void |
drawGuiContainerBackgroundLayer(float partialTicks,
int mouseX,
int mouseY) |
protected void |
drawGuiContainerForegroundLayer(int mouseX,
int mouseY) |
private void |
drawItemStack(ItemStack stack,
int x,
int y,
java.lang.String altText) |
void |
drawScreen(int mouseX,
int mouseY,
float partialTicks) |
private void |
drawSlot(Slot slotIn) |
int |
getGuiLeft() |
int |
getGuiTop() |
private Slot |
getSlotAtPosition(int x,
int y) |
Slot |
getSlotUnderMouse()
Returns the slot that is currently displayed under the mouse.
|
int |
getXSize() |
int |
getYSize() |
protected void |
handleMouseClick(Slot slotIn,
int slotId,
int mouseButton,
ClickType type) |
protected boolean |
hasClickedOutside(int p_193983_1_,
int p_193983_2_,
int p_193983_3_,
int p_193983_4_) |
void |
initGui() |
private boolean |
isMouseOverSlot(Slot slotIn,
int mouseX,
int mouseY) |
protected boolean |
isPointInRegion(int rectX,
int rectY,
int rectWidth,
int rectHeight,
int pointX,
int pointY) |
protected void |
keyTyped(char typedChar,
int keyCode) |
protected void |
mouseClicked(int mouseX,
int mouseY,
int mouseButton) |
protected void |
mouseClickMove(int mouseX,
int mouseY,
int clickedMouseButton,
long timeSinceLastClick) |
protected void |
mouseReleased(int mouseX,
int mouseY,
int state) |
void |
onGuiClosed() |
protected void |
renderHoveredToolTip(int p_191948_1_,
int p_191948_2_) |
private void |
updateDragSplitting() |
void |
updateScreen() |
actionPerformed, addButton, confirmClicked, drawBackground, drawDefaultBackground, drawHoveringText, drawHoveringText, drawHoveringText, drawWorldBackground, getClipboardString, getItemToolTip, handleComponentClick, handleComponentHover, handleInput, handleKeyboardInput, handleMouseInput, isAltKeyDown, isCtrlKeyDown, isFocused, isKeyComboCtrlA, isKeyComboCtrlC, isKeyComboCtrlV, isKeyComboCtrlX, isShiftKeyDown, onResize, renderToolTip, sendChatMessage, sendChatMessage, setClipboardString, setFocused, setGuiSize, setText, setWorldAndResolution
drawCenteredString, drawGradientRect, drawHorizontalLine, drawModalRectWithCustomSizedTexture, drawRect, drawScaledCustomSizeModalRect, drawString, drawTexturedModalRect, drawTexturedModalRect, drawTexturedModalRect, drawVerticalLine
public static final ResourceLocation INVENTORY_BACKGROUND
protected int xSize
protected int ySize
public Container inventorySlots
protected int guiLeft
protected int guiTop
private Slot hoveredSlot
private Slot clickedSlot
private boolean isRightMouseClick
private ItemStack draggedStack
private int touchUpX
private int touchUpY
private Slot returningStackDestSlot
private long returningStackTime
private ItemStack returningStack
private Slot currentDragTargetSlot
private long dragItemDropDelay
protected final java.util.Set<Slot> dragSplittingSlots
protected boolean dragSplitting
private int dragSplittingLimit
private int dragSplittingButton
private boolean ignoreMouseUp
private int dragSplittingRemnant
private long lastClickTime
private Slot lastClickSlot
private int lastClickButton
private boolean doubleClick
private ItemStack shiftClickedSlot
public GuiContainer(Container inventorySlotsIn)
public void drawScreen(int mouseX, int mouseY, float partialTicks)
drawScreen
in class GuiScreen
protected void renderHoveredToolTip(int p_191948_1_, int p_191948_2_)
private void drawItemStack(ItemStack stack, int x, int y, java.lang.String altText)
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)
protected abstract void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY)
private void drawSlot(Slot slotIn)
private void updateDragSplitting()
private Slot getSlotAtPosition(int x, int y)
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws java.io.IOException
mouseClicked
in class GuiScreen
java.io.IOException
protected boolean hasClickedOutside(int p_193983_1_, int p_193983_2_, int p_193983_3_, int p_193983_4_)
protected void mouseClickMove(int mouseX, int mouseY, int clickedMouseButton, long timeSinceLastClick)
mouseClickMove
in class GuiScreen
protected void mouseReleased(int mouseX, int mouseY, int state)
mouseReleased
in class GuiScreen
private boolean isMouseOverSlot(Slot slotIn, int mouseX, int mouseY)
protected boolean isPointInRegion(int rectX, int rectY, int rectWidth, int rectHeight, int pointX, int pointY)
protected void handleMouseClick(Slot slotIn, int slotId, int mouseButton, ClickType type)
protected void keyTyped(char typedChar, int keyCode) throws java.io.IOException
protected boolean checkHotbarKeys(int keyCode)
public void onGuiClosed()
onGuiClosed
in class GuiScreen
public boolean doesGuiPauseGame()
doesGuiPauseGame
in class GuiScreen
public void updateScreen()
updateScreen
in class GuiScreen
@Nullable public Slot getSlotUnderMouse()
public int getGuiLeft()
public int getGuiTop()
public int getXSize()
public int getYSize()