public abstract class GuiSlot
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected float |
amountScrolled |
int |
bottom |
protected boolean |
centerListVertically |
protected boolean |
hasListHeader |
int |
headerPadding |
int |
height |
protected int |
initialClickY |
protected long |
lastClicked |
int |
left |
protected Minecraft |
mc |
protected int |
mouseX |
protected int |
mouseY |
int |
right |
protected float |
scrollMultiplier |
protected int |
selectedElement |
protected boolean |
showSelectionBox |
int |
slotHeight |
int |
top |
protected boolean |
visible |
int |
width |
Constructor and Description |
---|
GuiSlot(Minecraft mcIn,
int width,
int height,
int topIn,
int bottomIn,
int slotHeightIn) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(GuiButton button) |
protected void |
bindAmountScrolled() |
protected void |
clickedHeader(int p_148132_1_,
int p_148132_2_) |
protected abstract void |
drawBackground() |
protected void |
drawContainerBackground(Tessellator tessellator) |
protected void |
drawListHeader(int insideLeft,
int insideTop,
Tessellator tessellatorIn) |
void |
drawScreen(int mouseXIn,
int mouseYIn,
float partialTicks) |
protected void |
drawSelectionBox(int insideLeft,
int insideTop,
int mouseXIn,
int mouseYIn,
float partialTicks) |
protected abstract void |
drawSlot(int slotIndex,
int xPos,
int yPos,
int heightIn,
int mouseXIn,
int mouseYIn,
float partialTicks) |
protected abstract void |
elementClicked(int slotIndex,
boolean isDoubleClick,
int mouseX,
int mouseY) |
int |
getAmountScrolled() |
protected int |
getContentHeight() |
boolean |
getEnabled() |
int |
getListWidth() |
int |
getMaxScroll() |
protected int |
getScrollBarX() |
protected abstract int |
getSize() |
int |
getSlotHeight() |
int |
getSlotIndexFromScreenCoords(int posX,
int posY) |
void |
handleMouseInput() |
boolean |
isMouseYWithinSlotBounds(int p_148141_1_) |
protected abstract boolean |
isSelected(int slotIndex) |
protected void |
overlayBackground(int startY,
int endY,
int startAlpha,
int endAlpha) |
void |
registerScrollButtons(int scrollUpButtonIDIn,
int scrollDownButtonIDIn) |
protected void |
renderDecorations(int mouseXIn,
int mouseYIn) |
void |
scrollBy(int amount) |
void |
setDimensions(int widthIn,
int heightIn,
int topIn,
int bottomIn) |
void |
setEnabled(boolean enabledIn) |
protected void |
setHasListHeader(boolean hasListHeaderIn,
int headerPaddingIn) |
void |
setShowSelectionBox(boolean showSelectionBoxIn) |
void |
setSlotXBoundsFromLeft(int leftIn) |
protected void |
updateItemPos(int entryID,
int insideLeft,
int yPos,
float partialTicks) |
protected final Minecraft mc
public int width
public int height
public int top
public int bottom
public int right
public int left
public final int slotHeight
protected int mouseX
protected int mouseY
protected boolean centerListVertically
protected int initialClickY
protected float scrollMultiplier
protected float amountScrolled
protected int selectedElement
protected long lastClicked
protected boolean visible
protected boolean showSelectionBox
protected boolean hasListHeader
public int headerPadding
public GuiSlot(Minecraft mcIn, int width, int height, int topIn, int bottomIn, int slotHeightIn)
public void setDimensions(int widthIn, int heightIn, int topIn, int bottomIn)
public void setShowSelectionBox(boolean showSelectionBoxIn)
protected void setHasListHeader(boolean hasListHeaderIn, int headerPaddingIn)
protected abstract int getSize()
protected abstract void elementClicked(int slotIndex, boolean isDoubleClick, int mouseX, int mouseY)
protected abstract boolean isSelected(int slotIndex)
protected int getContentHeight()
protected abstract void drawBackground()
protected void updateItemPos(int entryID, int insideLeft, int yPos, float partialTicks)
protected abstract void drawSlot(int slotIndex, int xPos, int yPos, int heightIn, int mouseXIn, int mouseYIn, float partialTicks)
protected void drawListHeader(int insideLeft, int insideTop, Tessellator tessellatorIn)
protected void clickedHeader(int p_148132_1_, int p_148132_2_)
protected void renderDecorations(int mouseXIn, int mouseYIn)
public int getSlotIndexFromScreenCoords(int posX, int posY)
public void registerScrollButtons(int scrollUpButtonIDIn, int scrollDownButtonIDIn)
protected void bindAmountScrolled()
public int getMaxScroll()
public int getAmountScrolled()
public boolean isMouseYWithinSlotBounds(int p_148141_1_)
public void scrollBy(int amount)
public void actionPerformed(GuiButton button)
public void drawScreen(int mouseXIn, int mouseYIn, float partialTicks)
public void handleMouseInput()
public void setEnabled(boolean enabledIn)
public boolean getEnabled()
public int getListWidth()
protected void drawSelectionBox(int insideLeft, int insideTop, int mouseXIn, int mouseYIn, float partialTicks)
protected int getScrollBarX()
protected void overlayBackground(int startY, int endY, int startAlpha, int endAlpha)
public void setSlotXBoundsFromLeft(int leftIn)
public int getSlotHeight()
protected void drawContainerBackground(Tessellator tessellator)