类 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>
- 直接已知子类:
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>
-
嵌套类概要
从类继承的嵌套类/接口 net.minecraft.client.gui.screens.Screen
Screen.NarratableSearchResult
-
字段概要
字段修饰符和类型字段说明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 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
static final int
protected 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
BACKGROUND_LOCATION, font, height, minecraft, renderables, screenExecutor, title, width
从接口继承的字段 net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected boolean
checkHotbarKeyPressed
(int pKeyCode, int pScanCode) private void
checkHotbarMouseClicked
(int pKeyCode) void
protected void
private Slot
findSlot
(double pMouseX, double pMouseY) int
int
getMenu()
int
getSlotColor
(int index) @Nullable Slot
getTooltipFromContainerItem
(ItemStack pStack) int
getXSize()
int
getYSize()
protected boolean
hasClickedOutside
(double pMouseX, double pMouseY, int pGuiLeft, int pGuiTop, int pMouseButton) protected void
init()
protected boolean
isHovering
(int pX, int pY, int pWidth, int pHeight, double pMouseX, double pMouseY) private boolean
isHovering
(Slot pSlot, double pMouseX, double pMouseY) boolean
boolean
keyPressed
(int pKeyCode, int pScanCode, int pModifiers) boolean
mouseClicked
(double pMouseX, double pMouseY, int pButton) boolean
mouseDragged
(double pMouseX, double pMouseY, int pButton, double pDragX, double pDragY) boolean
mouseReleased
(double pMouseX, double pMouseY, int pButton) void
onClose()
private void
void
removed()
void
render
(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick) protected abstract void
renderBg
(GuiGraphics pGuiGraphics, float pPartialTick, int pMouseX, int pMouseY) private void
renderFloatingItem
(GuiGraphics pGuiGraphics, ItemStack pStack, int pX, int pY, String pText) protected void
renderLabels
(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY) private void
renderSlot
(GuiGraphics pGuiGraphics, Slot pSlot) static void
renderSlotHighlight
(GuiGraphics pGuiGraphics, int pX, int pY, int pBlitOffset) static void
renderSlotHighlight
(GuiGraphics pGuiGraphics, int pX, int pY, int pBlitOffset, int color) protected void
renderTooltip
(GuiGraphics pGuiGraphics, int pX, int pY) protected void
slotClicked
(Slot pSlot, int pSlotId, int pMouseButton, ClickType pType) final void
tick()
从类继承的方法 net.minecraft.client.gui.screens.Screen
added, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, changeFocus, children, clearWidgets, findNarratableWidget, getBackgroundMusic, getMinecraft, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, hideWidgets, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, narrationEnabled, onFilesDrop, rebuildWidgets, removeWidget, renderBackground, renderDirtBackground, renderWithTooltip, repositionElements, resize, setInitialFocus, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldCloseOnEsc, shouldNarrateNavigation, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, wrapScreenError
从类继承的方法 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, magicalSpecialHackyFocus, mouseScrolled, nextFocusPath, setFocused
从接口继承的方法 net.minecraft.client.gui.components.events.GuiEventListener
mouseMoved
从接口继承的方法 net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
字段详细资料
-
INVENTORY_LOCATION
-
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 -
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
-
slotColor
protected int slotColor
-
-
构造器详细资料
-
AbstractContainerScreen
-
-
方法详细资料
-
init
protected void init() -
render
- 指定者:
render
在接口中Renderable
- 覆盖:
render
在类中Screen
-
renderSlotHighlight
-
renderSlotHighlight
public static void renderSlotHighlight(GuiGraphics pGuiGraphics, int pX, int pY, int pBlitOffset, int color) -
renderTooltip
-
getTooltipFromContainerItem
-
renderFloatingItem
private void renderFloatingItem(GuiGraphics pGuiGraphics, ItemStack pStack, int pX, int pY, String pText) -
renderLabels
-
renderBg
protected abstract void renderBg(GuiGraphics pGuiGraphics, float pPartialTick, int pMouseX, int pMouseY) -
renderSlot
-
recalculateQuickCraftRemaining
private void recalculateQuickCraftRemaining() -
findSlot
-
mouseClicked
public boolean mouseClicked(double pMouseX, double pMouseY, int pButton) - 指定者:
mouseClicked
在接口中ContainerEventHandler
- 指定者:
mouseClicked
在接口中GuiEventListener
-
checkHotbarMouseClicked
private void checkHotbarMouseClicked(int pKeyCode) -
hasClickedOutside
protected boolean hasClickedOutside(double pMouseX, double pMouseY, int pGuiLeft, int pGuiTop, int pMouseButton) -
mouseDragged
public boolean mouseDragged(double pMouseX, double pMouseY, int pButton, double pDragX, double pDragY) - 指定者:
mouseDragged
在接口中ContainerEventHandler
- 指定者:
mouseDragged
在接口中GuiEventListener
-
mouseReleased
public boolean mouseReleased(double pMouseX, double pMouseY, int pButton) - 指定者:
mouseReleased
在接口中ContainerEventHandler
- 指定者:
mouseReleased
在接口中GuiEventListener
-
clearDraggingState
public void clearDraggingState() -
isHovering
-
isHovering
protected boolean isHovering(int pX, int pY, int pWidth, int pHeight, double pMouseX, double pMouseY) -
slotClicked
-
keyPressed
public boolean keyPressed(int pKeyCode, int pScanCode, int pModifiers) - 指定者:
keyPressed
在接口中ContainerEventHandler
- 指定者:
keyPressed
在接口中GuiEventListener
- 覆盖:
keyPressed
在类中Screen
-
checkHotbarKeyPressed
protected boolean checkHotbarKeyPressed(int pKeyCode, int pScanCode) -
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>
-
getSlotUnderMouse
-
getGuiLeft
public int getGuiLeft() -
getGuiTop
public int getGuiTop() -
getXSize
public int getXSize() -
getYSize
public int getYSize() -
getSlotColor
public int getSlotColor(int index) -
onClose
public void onClose()
-