类 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>
- 所有已实现的接口:
ContainerEventHandler
,GuiEventListener
,Renderable
,TabOrderedElement
,MenuAccess<T>
- 直接已知子类:
AbstractRecipeBookScreen
,BeaconScreen
,BrewingStandScreen
,CartographyTableScreen
,ContainerScreen
,CrafterScreen
,CreativeModeInventoryScreen
,DispenserScreen
,EnchantmentScreen
,GrindstoneScreen
,HopperScreen
,HorseInventoryScreen
,ItemCombinerScreen
,LoomScreen
,MerchantScreen
,ShulkerBoxScreen
,StonecutterScreen
public abstract class AbstractContainerScreen<T extends AbstractContainerMenu>
extends Screen
implements MenuAccess<T>
-
嵌套类概要
从类继承的嵌套类/接口 net.minecraft.client.gui.screens.Screen
Screen.NarratableSearchResult
-
字段概要
字段修饰符和类型字段说明protected static final int
protected static final int
private Slot
private boolean
private ItemStack
private static final int
protected Slot
protected int
protected int
static final ResourceLocation
protected int
protected int
protected boolean
private boolean
private final List
<ItemSlotMouseAction> private int
private Slot
private long
private ItemStack
protected int
protected final T
protected final Component
private int
private int
private int
private static final int
private Slot
private long
private boolean
private static final ResourceLocation
private static final ResourceLocation
static final int
private static final float
private Slot
private ItemStack
private int
private int
private long
protected int
protected int
protected int
从类继承的字段 net.minecraft.client.gui.screens.Screen
CUBE_MAP, font, FOOTER_SEPARATOR, HEADER_SEPARATOR, height, INWORLD_FOOTER_SEPARATOR, INWORLD_HEADER_SEPARATOR, MENU_BACKGROUND, minecraft, narratorButton, PANORAMA, renderables, screenExecutor, title, width
从接口继承的字段 net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected void
addItemSlotMouseAction
(ItemSlotMouseAction p_362248_) protected boolean
checkHotbarKeyPressed
(int p_97806_, int p_97807_) private void
checkHotbarMouseClicked
(int p_97763_) void
protected void
int
int
private Slot
getHoveredSlot
(double p_367266_, double p_363404_) getMenu()
@Nullable Slot
getTooltipFromContainerItem
(ItemStack p_283689_) int
getXSize()
int
getYSize()
protected void
handleSlotStateChanged
(int p_310652_, int p_312119_, boolean p_310240_) protected boolean
hasClickedOutside
(double p_97757_, double p_97758_, int p_97759_, int p_97760_, int p_97761_) protected void
init()
protected boolean
isHovering
(int p_97768_, int p_97769_, int p_97770_, int p_97771_, double p_97772_, double p_97773_) private boolean
isHovering
(Slot p_97775_, double p_97776_, double p_97777_) boolean
boolean
keyPressed
(int p_97765_, int p_97766_, int p_97767_) boolean
mouseClicked
(double p_97748_, double p_97749_, int p_97750_) boolean
mouseDragged
(double p_97752_, double p_97753_, int p_97754_, double p_97755_, double p_97756_) boolean
mouseReleased
(double p_97812_, double p_97813_, int p_97814_) boolean
mouseScrolled
(double p_367670_, double p_363682_, double p_364454_, double p_367273_) void
onClose()
(专用程序包) void
onMouseClickAction
(Slot p_363727_, ClickType p_363931_) private void
onStopHovering
(Slot p_366155_) private void
void
removed()
void
render
(GuiGraphics p_283479_, int p_283661_, int p_281248_, float p_281886_) void
renderBackground
(GuiGraphics p_300197_, int p_297538_, int p_300104_, float p_298759_) protected abstract void
renderBg
(GuiGraphics p_283065_, float p_97788_, int p_97789_, int p_97790_) private void
renderFloatingItem
(GuiGraphics p_282567_, ItemStack p_281330_, int p_281772_, int p_281689_, String p_282568_) protected void
renderLabels
(GuiGraphics p_281635_, int p_282681_, int p_283686_) protected void
renderSlot
(GuiGraphics p_281607_, Slot p_282613_) protected void
renderSlotHighlightBack
(GuiGraphics p_365614_) protected void
renderSlotHighlightFront
(GuiGraphics p_362870_) protected void
renderSlots
(GuiGraphics p_366639_) protected void
renderTooltip
(GuiGraphics p_283594_, int p_282171_, int p_281909_) private boolean
showTooltipWithItemInHand
(ItemStack p_367274_) protected void
slotClicked
(Slot p_97778_, int p_97779_, int p_97780_, ClickType p_97781_) final void
tick()
从类继承的方法 net.minecraft.client.gui.screens.Screen
added, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, changeFocus, children, clearFocus, clearTooltipForNextRenderPass, clearWidgets, fillCrashDetails, findNarratableWidget, getBackgroundMusic, getFont, getMinecraft, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, onFilesDrop, rebuildWidgets, removeWidget, renderBlurredBackground, renderMenuBackground, renderMenuBackground, renderMenuBackgroundTexture, renderPanorama, renderTransparentBackground, renderWithTooltip, repositionElements, resize, setInitialFocus, setInitialFocus, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldCloseOnEsc, shouldNarrateNavigation, showsActiveEffects, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, updateNarratorStatus
从类继承的方法 net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocused
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 net.minecraft.client.gui.components.events.ContainerEventHandler
charTyped, getChildAt, getCurrentFocusPath, isFocused, keyReleased, nextFocusPath, setFocused
从接口继承的方法 net.minecraft.client.gui.components.events.GuiEventListener
getBorderForArrowNavigation, mouseMoved
从接口继承的方法 net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
字段详细资料
-
INVENTORY_LOCATION
-
SLOT_HIGHLIGHT_BACK_SPRITE
-
SLOT_HIGHLIGHT_FRONT_SPRITE
-
BACKGROUND_TEXTURE_WIDTH
protected static final int BACKGROUND_TEXTURE_WIDTH- 另请参阅:
-
BACKGROUND_TEXTURE_HEIGHT
protected static final int BACKGROUND_TEXTURE_HEIGHT- 另请参阅:
-
SNAPBACK_SPEED
private static final float SNAPBACK_SPEED- 另请参阅:
-
QUICKDROP_DELAY
private static final int QUICKDROP_DELAY- 另请参阅:
-
SLOT_ITEM_BLIT_OFFSET
public static final int SLOT_ITEM_BLIT_OFFSET- 另请参阅:
-
HOVER_ITEM_BLIT_OFFSET
private static final int HOVER_ITEM_BLIT_OFFSET- 另请参阅:
-
imageWidth
protected int imageWidth -
imageHeight
protected int imageHeight -
titleLabelX
protected int titleLabelX -
titleLabelY
protected int titleLabelY -
inventoryLabelX
protected int inventoryLabelX -
inventoryLabelY
protected int inventoryLabelY -
itemSlotMouseActions
-
playerInventoryTitle
-
hoveredSlot
-
clickedSlot
-
snapbackEnd
-
quickdropSlot
-
lastClickSlot
-
leftPos
protected int leftPos -
topPos
protected int topPos -
isSplittingStack
private boolean isSplittingStack -
draggingItem
-
snapbackStartX
private int snapbackStartX -
snapbackStartY
private int snapbackStartY -
snapbackTime
private long snapbackTime -
snapbackItem
-
quickdropTime
private long quickdropTime -
quickCraftSlots
-
isQuickCrafting
protected boolean isQuickCrafting -
quickCraftingType
private int quickCraftingType -
quickCraftingButton
private int quickCraftingButton -
skipNextRelease
private boolean skipNextRelease -
quickCraftingRemainder
private int quickCraftingRemainder -
lastClickTime
private long lastClickTime -
lastClickButton
private int lastClickButton -
doubleclick
private boolean doubleclick -
lastQuickMoved
-
-
构造器详细资料
-
AbstractContainerScreen
-
-
方法详细资料
-
init
protected void init() -
addItemSlotMouseAction
-
render
- 指定者:
render
在接口中Renderable
- 覆盖:
render
在类中Screen
-
renderSlots
-
renderBackground
- 覆盖:
renderBackground
在类中Screen
-
mouseScrolled
public boolean mouseScrolled(double p_367670_, double p_363682_, double p_364454_, double p_367273_) - 指定者:
mouseScrolled
在接口中ContainerEventHandler
- 指定者:
mouseScrolled
在接口中GuiEventListener
-
renderSlotHighlightBack
-
renderSlotHighlightFront
-
renderTooltip
-
showTooltipWithItemInHand
-
getTooltipFromContainerItem
-
renderFloatingItem
private void renderFloatingItem(GuiGraphics p_282567_, ItemStack p_281330_, int p_281772_, int p_281689_, @Nullable String p_282568_) -
renderLabels
-
renderBg
-
renderSlot
-
recalculateQuickCraftRemaining
private void recalculateQuickCraftRemaining() -
getHoveredSlot
-
mouseClicked
public boolean mouseClicked(double p_97748_, double p_97749_, int p_97750_) - 指定者:
mouseClicked
在接口中ContainerEventHandler
- 指定者:
mouseClicked
在接口中GuiEventListener
-
checkHotbarMouseClicked
private void checkHotbarMouseClicked(int p_97763_) -
hasClickedOutside
protected boolean hasClickedOutside(double p_97757_, double p_97758_, int p_97759_, int p_97760_, int p_97761_) -
mouseDragged
public boolean mouseDragged(double p_97752_, double p_97753_, int p_97754_, double p_97755_, double p_97756_) - 指定者:
mouseDragged
在接口中ContainerEventHandler
- 指定者:
mouseDragged
在接口中GuiEventListener
-
mouseReleased
public boolean mouseReleased(double p_97812_, double p_97813_, int p_97814_) - 指定者:
mouseReleased
在接口中ContainerEventHandler
- 指定者:
mouseReleased
在接口中GuiEventListener
-
clearDraggingState
public void clearDraggingState() -
isHovering
-
isHovering
protected boolean isHovering(int p_97768_, int p_97769_, int p_97770_, int p_97771_, double p_97772_, double p_97773_) -
onStopHovering
-
slotClicked
-
onMouseClickAction
-
handleSlotStateChanged
protected void handleSlotStateChanged(int p_310652_, int p_312119_, boolean p_310240_) -
keyPressed
public boolean keyPressed(int p_97765_, int p_97766_, int p_97767_) - 指定者:
keyPressed
在接口中ContainerEventHandler
- 指定者:
keyPressed
在接口中GuiEventListener
- 覆盖:
keyPressed
在类中Screen
-
checkHotbarKeyPressed
protected boolean checkHotbarKeyPressed(int p_97806_, int p_97807_) -
removed
public void removed() -
isPauseScreen
public boolean isPauseScreen()- 覆盖:
isPauseScreen
在类中Screen
-
tick
public final void tick() -
containerTick
protected void containerTick() -
getMenu
- 指定者:
getMenu
在接口中MenuAccess<T extends AbstractContainerMenu>
-
onClose
public void onClose() -
getSlotUnderMouse
-
getGuiLeft
public int getGuiLeft() -
getGuiTop
public int getGuiTop() -
getXSize
public int getXSize() -
getYSize
public int getYSize()
-