public abstract class ContainerScreen<T extends Container> extends Screen implements IHasContainer<T>
| Modifier and Type | Field and Description |
|---|---|
protected T |
container |
protected boolean |
dragSplitting |
protected java.util.Set<Slot> |
dragSplittingSlots |
protected int |
guiLeft |
protected int |
guiTop |
protected Slot |
hoveredSlot |
static ResourceLocation |
INVENTORY_BACKGROUND |
protected PlayerInventory |
playerInventory |
protected int |
slotColor |
protected int |
xSize |
protected int |
ySize |
buttons, children, font, height, itemRenderer, minecraft, passEvents, title, widthBACKGROUND_LOCATION, blitOffset, GUI_ICONS_LOCATION, STATS_ICON_LOCATION| Constructor and Description |
|---|
ContainerScreen(T screenContainer,
PlayerInventory inv,
ITextComponent titleIn) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
drawGuiContainerBackgroundLayer(float partialTicks,
int mouseX,
int mouseY) |
protected void |
drawGuiContainerForegroundLayer(int mouseX,
int mouseY) |
protected boolean |
func_195363_d(int p_195363_1_,
int p_195363_2_) |
T |
getContainer() |
int |
getGuiLeft() |
int |
getGuiTop() |
int |
getSlotColor(int index) |
Slot |
getSlotUnderMouse() |
int |
getXSize() |
int |
getYSize() |
protected void |
handleMouseClick(Slot slotIn,
int slotId,
int mouseButton,
ClickType type) |
protected boolean |
hasClickedOutside(double p_195361_1_,
double p_195361_3_,
int p_195361_5_,
int p_195361_6_,
int p_195361_7_) |
protected void |
init() |
boolean |
isPauseScreen() |
protected boolean |
isPointInRegion(int p_195359_1_,
int p_195359_2_,
int p_195359_3_,
int p_195359_4_,
double p_195359_5_,
double p_195359_7_) |
boolean |
keyPressed(int p_keyPressed_1_,
int p_keyPressed_2_,
int p_keyPressed_3_) |
boolean |
mouseClicked(double p_mouseClicked_1_,
double p_mouseClicked_3_,
int p_mouseClicked_5_) |
boolean |
mouseDragged(double p_mouseDragged_1_,
double p_mouseDragged_3_,
int p_mouseDragged_5_,
double p_mouseDragged_6_,
double p_mouseDragged_8_) |
boolean |
mouseReleased(double p_mouseReleased_1_,
double p_mouseReleased_3_,
int p_mouseReleased_5_) |
void |
removed() |
void |
render(int p_render_1_,
int p_render_2_,
float p_render_3_) |
protected void |
renderHoveredToolTip(int p_191948_1_,
int p_191948_2_) |
boolean |
shouldCloseOnEsc() |
void |
tick() |
addButton, children, getMinecraft, getNarrationMessage, getTitle, getTooltipFromItem, handleComponentClicked, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, onClose, renderBackground, renderBackground, renderComponentHoverEffect, renderDirtBackground, renderTooltip, renderTooltip, renderTooltip, renderTooltip, resize, sendMessage, sendMessage, setSize, wrapScreenErrorgetFocused, isDragging, setDragging, setFocusedblit, blit, blit, blit, blit, drawCenteredString, drawRightAlignedString, drawString, fill, fillGradient, hLine, innerBlit, vLineclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitchangeFocus, charTyped, func_212928_a, func_212930_a, func_212932_b, keyReleased, mouseScrolledmouseMovedpublic static final ResourceLocation INVENTORY_BACKGROUND
protected int xSize
protected int ySize
protected final PlayerInventory playerInventory
protected int guiLeft
protected int guiTop
protected Slot hoveredSlot
protected final java.util.Set<Slot> dragSplittingSlots
protected boolean dragSplitting
protected int slotColor
public ContainerScreen(T screenContainer, PlayerInventory inv, ITextComponent titleIn)
public void render(int p_render_1_,
int p_render_2_,
float p_render_3_)
render in interface IRenderablerender in class Screenprotected void renderHoveredToolTip(int p_191948_1_,
int p_191948_2_)
protected void drawGuiContainerForegroundLayer(int mouseX,
int mouseY)
protected abstract void drawGuiContainerBackgroundLayer(float partialTicks,
int mouseX,
int mouseY)
public boolean mouseClicked(double p_mouseClicked_1_,
double p_mouseClicked_3_,
int p_mouseClicked_5_)
mouseClicked in interface IGuiEventListenermouseClicked in interface INestedGuiEventHandlerprotected boolean hasClickedOutside(double p_195361_1_,
double p_195361_3_,
int p_195361_5_,
int p_195361_6_,
int p_195361_7_)
public boolean mouseDragged(double p_mouseDragged_1_,
double p_mouseDragged_3_,
int p_mouseDragged_5_,
double p_mouseDragged_6_,
double p_mouseDragged_8_)
mouseDragged in interface IGuiEventListenermouseDragged in interface INestedGuiEventHandlerpublic boolean mouseReleased(double p_mouseReleased_1_,
double p_mouseReleased_3_,
int p_mouseReleased_5_)
mouseReleased in interface IGuiEventListenermouseReleased in interface INestedGuiEventHandlerprotected boolean isPointInRegion(int p_195359_1_,
int p_195359_2_,
int p_195359_3_,
int p_195359_4_,
double p_195359_5_,
double p_195359_7_)
protected void handleMouseClick(Slot slotIn, int slotId, int mouseButton, ClickType type)
public boolean shouldCloseOnEsc()
shouldCloseOnEsc in class Screenpublic boolean keyPressed(int p_keyPressed_1_,
int p_keyPressed_2_,
int p_keyPressed_3_)
keyPressed in interface IGuiEventListenerkeyPressed in interface INestedGuiEventHandlerkeyPressed in class Screenprotected boolean func_195363_d(int p_195363_1_,
int p_195363_2_)
public boolean isPauseScreen()
isPauseScreen in class Screenpublic T getContainer()
getContainer in interface IHasContainer<T extends Container>@Nullable public Slot getSlotUnderMouse()
public int getGuiLeft()
public int getGuiTop()
public int getXSize()
public int getYSize()
public int getSlotColor(int index)