Class AbstractContainerScreen<T extends AbstractContainerMenu>
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<T>
- All Implemented Interfaces:
- ContainerEventHandler,- GuiEventListener,- Renderable,- TabOrderedElement,- MenuAccess<T>
- Direct Known Subclasses:
- AbstractFurnaceScreen,- BeaconScreen,- BrewingStandScreen,- CartographyTableScreen,- ContainerScreen,- CraftingScreen,- DispenserScreen,- EffectRenderingInventoryScreen,- EnchantmentScreen,- GrindstoneScreen,- HopperScreen,- HorseInventoryScreen,- ItemCombinerScreen,- LoomScreen,- MerchantScreen,- ShulkerBoxScreen,- StonecutterScreen
public abstract class AbstractContainerScreen<T extends AbstractContainerMenu>
extends Screen
implements MenuAccess<T>
- 
Nested Class SummaryNested classes/interfaces inherited from class net.minecraft.client.gui.screens.ScreenScreen.NarratableSearchResult
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate Slotprivate booleanprivate ItemStackprivate static final intprotected Slotprotected intprotected intstatic final ResourceLocationprotected intprotected intprotected booleanprivate booleanprivate intprivate Slotprivate longprivate ItemStackprotected intprotected final Tprotected final Componentprivate intprivate intprivate intprivate static final intprivate Slotprivate longprivate booleanstatic final intprotected intprivate static final floatprivate Slotprivate ItemStackprivate intprivate intprivate longprotected intprotected intprotected intFields inherited from class net.minecraft.client.gui.screens.ScreenBACKGROUND_LOCATION, font, height, minecraft, renderables, screenExecutor, title, widthFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListenerDOUBLE_CLICK_THRESHOLD_MS
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected booleancheckHotbarKeyPressed(int p_97806_, int p_97807_) private voidcheckHotbarMouseClicked(int p_97763_) voidprotected voidprivate SlotfindSlot(double p_97745_, double p_97746_) intintgetMenu()intgetSlotColor(int index) @Nullable SlotgetTooltipFromContainerItem(ItemStack p_283689_) intgetXSize()intgetYSize()protected booleanhasClickedOutside(double p_97757_, double p_97758_, int p_97759_, int p_97760_, int p_97761_) protected voidinit()protected booleanisHovering(int p_97768_, int p_97769_, int p_97770_, int p_97771_, double p_97772_, double p_97773_) private booleanisHovering(Slot p_97775_, double p_97776_, double p_97777_) booleanbooleankeyPressed(int p_97765_, int p_97766_, int p_97767_) booleanmouseClicked(double p_97748_, double p_97749_, int p_97750_) booleanmouseDragged(double p_97752_, double p_97753_, int p_97754_, double p_97755_, double p_97756_) booleanmouseReleased(double p_97812_, double p_97813_, int p_97814_) voidonClose()private voidvoidremoved()voidrender(GuiGraphics p_283479_, int p_283661_, int p_281248_, float p_281886_) voidrenderBackground(GuiGraphics p_300197_, int p_297538_, int p_300104_, float p_298759_) protected abstract voidrenderBg(GuiGraphics p_283065_, float p_97788_, int p_97789_, int p_97790_) private voidrenderFloatingItem(GuiGraphics p_282567_, ItemStack p_281330_, int p_281772_, int p_281689_, String p_282568_) protected voidrenderLabels(GuiGraphics p_281635_, int p_282681_, int p_283686_) private voidrenderSlot(GuiGraphics p_281607_, Slot p_282613_) static voidrenderSlotHighlight(GuiGraphics p_283692_, int p_281453_, int p_281915_, int p_283504_) static voidrenderSlotHighlight(GuiGraphics p_283692_, int p_281453_, int p_281915_, int p_283504_, int color) protected voidrenderTooltip(GuiGraphics p_283594_, int p_282171_, int p_281909_) protected voidslotClicked(Slot p_97778_, int p_97779_, int p_97780_, ClickType p_97781_) final voidtick()Methods inherited from class net.minecraft.client.gui.screens.Screenadded, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, changeFocus, children, clearWidgets, findNarratableWidget, getBackgroundMusic, getMinecraft, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, hideWidgets, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, narrationEnabled, onFilesDrop, rebuildWidgets, removeWidget, renderDirtBackground, renderTransparentBackground, renderWithTooltip, repositionElements, resize, setInitialFocus, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldCloseOnEsc, shouldNarrateNavigation, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, wrapScreenErrorMethods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandlergetFocused, isDragging, setDragging, setFocusedMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandlercharTyped, getChildAt, getCurrentFocusPath, isFocused, keyReleased, magicalSpecialHackyFocus, mouseScrolled, nextFocusPath, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListenermouseMovedMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElementgetTabOrderGroup
- 
Field Details- 
INVENTORY_LOCATION
- 
SNAPBACK_SPEEDprivate static final float SNAPBACK_SPEED- See Also:
 
- 
QUICKDROP_DELAYprivate static final int QUICKDROP_DELAY- See Also:
 
- 
SLOT_ITEM_BLIT_OFFSETpublic static final int SLOT_ITEM_BLIT_OFFSET- See Also:
 
- 
HOVER_ITEM_BLIT_OFFSETprivate static final int HOVER_ITEM_BLIT_OFFSET- See Also:
 
- 
imageWidthprotected int imageWidth
- 
imageHeightprotected int imageHeight
- 
titleLabelXprotected int titleLabelX
- 
titleLabelYprotected int titleLabelY
- 
inventoryLabelXprotected int inventoryLabelX
- 
inventoryLabelYprotected int inventoryLabelY
- 
playerInventoryTitle
- 
hoveredSlot
- 
clickedSlot
- 
snapbackEnd
- 
quickdropSlot
- 
lastClickSlot
- 
leftPosprotected int leftPos
- 
topPosprotected int topPos
- 
isSplittingStackprivate boolean isSplittingStack
- 
draggingItem
- 
snapbackStartXprivate int snapbackStartX
- 
snapbackStartYprivate int snapbackStartY
- 
snapbackTimeprivate long snapbackTime
- 
snapbackItem
- 
quickdropTimeprivate long quickdropTime
- 
quickCraftSlots
- 
isQuickCraftingprotected boolean isQuickCrafting
- 
quickCraftingTypeprivate int quickCraftingType
- 
quickCraftingButtonprivate int quickCraftingButton
- 
skipNextReleaseprivate boolean skipNextRelease
- 
quickCraftingRemainderprivate int quickCraftingRemainder
- 
lastClickTimeprivate long lastClickTime
- 
lastClickButtonprivate int lastClickButton
- 
doubleclickprivate boolean doubleclick
- 
lastQuickMoved
- 
slotColorprotected int slotColor
 
- 
- 
Constructor Details- 
AbstractContainerScreen
 
- 
- 
Method Details- 
initprotected void init()
- 
render- Specified by:
- renderin interface- Renderable
- Overrides:
- renderin class- Screen
 
- 
renderBackground- Overrides:
- renderBackgroundin class- Screen
 
- 
renderSlotHighlightpublic static void renderSlotHighlight(GuiGraphics p_283692_, int p_281453_, int p_281915_, int p_283504_) 
- 
renderSlotHighlightpublic static void renderSlotHighlight(GuiGraphics p_283692_, int p_281453_, int p_281915_, int p_283504_, int color) 
- 
renderTooltip
- 
getTooltipFromContainerItem
- 
renderFloatingItemprivate void renderFloatingItem(GuiGraphics p_282567_, ItemStack p_281330_, int p_281772_, int p_281689_, String p_282568_) 
- 
renderLabels
- 
renderBg
- 
renderSlot
- 
recalculateQuickCraftRemainingprivate void recalculateQuickCraftRemaining()
- 
findSlot
- 
mouseClickedpublic boolean mouseClicked(double p_97748_, double p_97749_, int p_97750_) - Specified by:
- mouseClickedin interface- ContainerEventHandler
- Specified by:
- mouseClickedin interface- GuiEventListener
 
- 
checkHotbarMouseClickedprivate void checkHotbarMouseClicked(int p_97763_) 
- 
hasClickedOutsideprotected boolean hasClickedOutside(double p_97757_, double p_97758_, int p_97759_, int p_97760_, int p_97761_) 
- 
mouseDraggedpublic boolean mouseDragged(double p_97752_, double p_97753_, int p_97754_, double p_97755_, double p_97756_) - Specified by:
- mouseDraggedin interface- ContainerEventHandler
- Specified by:
- mouseDraggedin interface- GuiEventListener
 
- 
mouseReleasedpublic boolean mouseReleased(double p_97812_, double p_97813_, int p_97814_) - Specified by:
- mouseReleasedin interface- ContainerEventHandler
- Specified by:
- mouseReleasedin interface- GuiEventListener
 
- 
clearDraggingStatepublic void clearDraggingState()
- 
isHovering
- 
isHoveringprotected boolean isHovering(int p_97768_, int p_97769_, int p_97770_, int p_97771_, double p_97772_, double p_97773_) 
- 
slotClicked
- 
keyPressedpublic boolean keyPressed(int p_97765_, int p_97766_, int p_97767_) - Specified by:
- keyPressedin interface- ContainerEventHandler
- Specified by:
- keyPressedin interface- GuiEventListener
- Overrides:
- keyPressedin class- Screen
 
- 
checkHotbarKeyPressedprotected boolean checkHotbarKeyPressed(int p_97806_, int p_97807_) 
- 
removedpublic void removed()
- 
isPauseScreenpublic boolean isPauseScreen()- Overrides:
- isPauseScreenin class- Screen
 
- 
tickpublic final void tick()
- 
containerTickprotected void containerTick()
- 
getMenu- Specified by:
- getMenuin interface- MenuAccess<T extends AbstractContainerMenu>
 
- 
getSlotUnderMouse
- 
getGuiLeftpublic int getGuiLeft()
- 
getGuiToppublic int getGuiTop()
- 
getXSizepublic int getXSize()
- 
getYSizepublic int getYSize()
- 
getSlotColorpublic int getSlotColor(int index) 
- 
onClosepublic void onClose()
 
-