类 AbstractContainerScreen<T extends AbstractContainerMenu>

所有已实现的接口:
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>
  • 字段详细资料

    • INVENTORY_LOCATION

      public static final ResourceLocation 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

      protected final Component playerInventoryTitle
    • hoveredSlot

      @Nullable protected Slot hoveredSlot
    • clickedSlot

      @Nullable private Slot clickedSlot
    • snapbackEnd

      @Nullable private Slot snapbackEnd
    • quickdropSlot

      @Nullable private Slot quickdropSlot
    • lastClickSlot

      @Nullable private Slot lastClickSlot
    • leftPos

      protected int leftPos
    • topPos

      protected int topPos
    • isSplittingStack

      private boolean isSplittingStack
    • draggingItem

      private ItemStack draggingItem
    • snapbackStartX

      private int snapbackStartX
    • snapbackStartY

      private int snapbackStartY
    • snapbackTime

      private long snapbackTime
    • snapbackItem

      private ItemStack snapbackItem
    • quickdropTime

      private long quickdropTime
    • quickCraftSlots

      protected final Set<Slot> 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

      private ItemStack lastQuickMoved
    • slotColor

      protected int slotColor
  • 构造器详细资料

    • AbstractContainerScreen

      public AbstractContainerScreen(T pMenu, Inventory pPlayerInventory, Component pTitle)
  • 方法详细资料

    • init

      protected void init()
      覆盖:
      init 在类中 Screen
    • render

      public void render(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick)
      指定者:
      render 在接口中 Renderable
      覆盖:
      render 在类中 Screen
    • renderSlotHighlight

      public static void renderSlotHighlight(GuiGraphics pGuiGraphics, int pX, int pY, int pBlitOffset)
    • renderSlotHighlight

      public static void renderSlotHighlight(GuiGraphics pGuiGraphics, int pX, int pY, int pBlitOffset, int color)
    • renderTooltip

      protected void renderTooltip(GuiGraphics pGuiGraphics, int pX, int pY)
    • getTooltipFromContainerItem

      protected List<Component> getTooltipFromContainerItem(ItemStack pStack)
    • renderFloatingItem

      private void renderFloatingItem(GuiGraphics pGuiGraphics, ItemStack pStack, int pX, int pY, String pText)
    • renderLabels

      protected void renderLabels(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY)
    • renderBg

      protected abstract void renderBg(GuiGraphics pGuiGraphics, float pPartialTick, int pMouseX, int pMouseY)
    • renderSlot

      private void renderSlot(GuiGraphics pGuiGraphics, Slot pSlot)
    • recalculateQuickCraftRemaining

      private void recalculateQuickCraftRemaining()
    • findSlot

      @Nullable private Slot findSlot(double pMouseX, double pMouseY)
    • 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

      private boolean isHovering(Slot pSlot, double pMouseX, double pMouseY)
    • isHovering

      protected boolean isHovering(int pX, int pY, int pWidth, int pHeight, double pMouseX, double pMouseY)
    • slotClicked

      protected void slotClicked(Slot pSlot, int pSlotId, int pMouseButton, ClickType pType)
    • 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()
      覆盖:
      removed 在类中 Screen
    • isPauseScreen

      public boolean isPauseScreen()
      覆盖:
      isPauseScreen 在类中 Screen
    • tick

      public final void tick()
      覆盖:
      tick 在类中 Screen
    • containerTick

      protected void containerTick()
    • getMenu

      public T getMenu()
      指定者:
      getMenu 在接口中 MenuAccess<T extends AbstractContainerMenu>
    • getSlotUnderMouse

      @Nullable public @Nullable Slot 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()
      覆盖:
      onClose 在类中 Screen