类 Screen

所有已实现的接口:
ContainerEventHandler, GuiEventListener, Renderable, TabOrderedElement
直接已知子类:
AbstractCommandBlockEditScreen, AbstractContainerScreen, AbstractSignEditScreen, AccessibilityOnboardingScreen, AdvancementsScreen, AlertScreen, BackupConfirmScreen, BookEditScreen, BookViewScreen, ChatReportScreen, ChatScreen, ChatSelectionScreen, ConfirmExperimentalFeaturesScreen, ConfirmExperimentalFeaturesScreen.DetailsScreen, ConfirmScreen, ConnectScreen, CreateBuffetWorldScreen, CreateFlatWorldScreen, CreateWorldScreen, CreditsAndAttributionScreen, DatapackLoadFailureScreen, DeathScreen, DemoIntroScreen, DirectJoinServerScreen, DisconnectedScreen, EditGameRulesScreen, EditServerScreen, EditWorldScreen, ErrorScreen, ExperimentsScreen, GameModeSwitcherScreen, GenericDirtMessageScreen, GenericWaitingScreen, JigsawBlockEditScreen, JoinMultiplayerScreen, LevelLoadingScreen, ModListScreen, ModMismatchDisconnectedScreen, OptimizeWorldScreen, OptionsScreen, OptionsSubScreen, OutOfMemoryScreen, PackSelectionScreen, PauseScreen, PopupScreen, PresetFlatWorldScreen, ProgressScreen, RealmsScreen, ReceivingLevelScreen, ReportReasonSelectionScreen, SelectWorldScreen, ShareToLanScreen, SocialInteractionsScreen, StatsScreen, StructureBlockEditScreen, SymlinkWarningScreen, TelemetryInfoScreen, TitleScreen, TitleScreenModUpdateIndicator, WarningScreen, WinScreen

public abstract class Screen extends AbstractContainerEventHandler implements Renderable
  • 字段详细资料

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • ALLOWED_PROTOCOLS

      private static final Set<String> ALLOWED_PROTOCOLS
    • USAGE_NARRATION

      private static final Component USAGE_NARRATION
    • BACKGROUND_LOCATION

      public static final ResourceLocation BACKGROUND_LOCATION
    • title

      protected final Component title
    • children

      private final List<GuiEventListener> children
    • narratables

      private final List<NarratableEntry> narratables
    • minecraft

      @Nullable protected Minecraft minecraft
    • initialized

      private boolean initialized
    • width

      public int width
    • height

      public int height
    • renderables

      public final List<Renderable> renderables
    • font

      protected Font font
    • NARRATE_SUPPRESS_AFTER_INIT_TIME

      private static final long NARRATE_SUPPRESS_AFTER_INIT_TIME
    • NARRATE_DELAY_NARRATOR_ENABLED

      private static final long NARRATE_DELAY_NARRATOR_ENABLED
    • NARRATE_DELAY_MOUSE_MOVE

      private static final long NARRATE_DELAY_MOUSE_MOVE
      另请参阅:
    • NARRATE_DELAY_MOUSE_ACTION

      private static final long NARRATE_DELAY_MOUSE_ACTION
      另请参阅:
    • NARRATE_DELAY_KEYBOARD_ACTION

      private static final long NARRATE_DELAY_KEYBOARD_ACTION
      另请参阅:
    • narrationState

      private final ScreenNarrationCollector narrationState
    • narrationSuppressTime

      private long narrationSuppressTime
    • nextNarrationTime

      private long nextNarrationTime
    • lastNarratable

      @Nullable private NarratableEntry lastNarratable
    • deferredTooltipRendering

      @Nullable private Screen.DeferredTooltipRendering deferredTooltipRendering
    • screenExecutor

      protected final Executor screenExecutor
  • 构造器详细资料

    • Screen

      protected Screen(Component pTitle)
  • 方法详细资料

    • getTitle

      public Component getTitle()
    • getNarrationMessage

      public Component getNarrationMessage()
    • renderWithTooltip

      public final void renderWithTooltip(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick)
    • render

      public void render(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick)
      指定者:
      render 在接口中 Renderable
    • keyPressed

      public boolean keyPressed(int pKeyCode, int pScanCode, int pModifiers)
      指定者:
      keyPressed 在接口中 ContainerEventHandler
      指定者:
      keyPressed 在接口中 GuiEventListener
    • createTabEvent

      private FocusNavigationEvent.TabNavigation createTabEvent()
    • createArrowEvent

      private FocusNavigationEvent.ArrowNavigation createArrowEvent(ScreenDirection pDirection)
    • setInitialFocus

      protected void setInitialFocus(GuiEventListener pListener)
    • clearFocus

      private void clearFocus()
    • changeFocus

      protected void changeFocus(ComponentPath pPath)
    • shouldCloseOnEsc

      public boolean shouldCloseOnEsc()
    • onClose

      public void onClose()
    • addRenderableWidget

      protected <T extends GuiEventListener & Renderable & NarratableEntry> T addRenderableWidget(T pWidget)
    • addRenderableOnly

      protected <T extends Renderable> T addRenderableOnly(T pRenderable)
    • addWidget

      protected <T extends GuiEventListener & NarratableEntry> T addWidget(T pListener)
    • removeWidget

      protected void removeWidget(GuiEventListener pListener)
    • clearWidgets

      protected void clearWidgets()
    • getTooltipFromItem

      public static List<Component> getTooltipFromItem(Minecraft pMinecraft, ItemStack pItem)
    • insertText

      protected void insertText(String pText, boolean pOverwrite)
    • handleComponentClicked

      public boolean handleComponentClicked(@Nullable Style pStyle)
    • init

      public final void init(Minecraft pMinecraft, int pWidth, int pHeight)
    • rebuildWidgets

      protected void rebuildWidgets()
    • children

      public List<? extends GuiEventListener> children()
      指定者:
      children 在接口中 ContainerEventHandler
    • init

      protected void init()
    • tick

      public void tick()
    • removed

      public void removed()
    • added

      public void added()
    • renderBackground

      public void renderBackground(GuiGraphics pGuiGraphics)
    • renderDirtBackground

      public void renderDirtBackground(GuiGraphics pGuiGraphics)
    • isPauseScreen

      public boolean isPauseScreen()
    • confirmLink

      private void confirmLink(boolean p_96623_)
    • openLink

      private void openLink(URI pUri)
    • hasControlDown

      public static boolean hasControlDown()
    • hasShiftDown

      public static boolean hasShiftDown()
    • hasAltDown

      public static boolean hasAltDown()
    • isCut

      public static boolean isCut(int pKeyCode)
    • isPaste

      public static boolean isPaste(int pKeyCode)
    • isCopy

      public static boolean isCopy(int pKeyCode)
    • isSelectAll

      public static boolean isSelectAll(int pKeyCode)
    • repositionElements

      protected void repositionElements()
    • resize

      public void resize(Minecraft pMinecraft, int pWidth, int pHeight)
    • wrapScreenError

      public static void wrapScreenError(Runnable pAction, String pErrorDesc, String pScreenName)
    • isValidCharacterForName

      protected boolean isValidCharacterForName(String pText, char pCharTyped, int pCursorPos)
    • isMouseOver

      public boolean isMouseOver(double pMouseX, double pMouseY)
      指定者:
      isMouseOver 在接口中 GuiEventListener
    • onFilesDrop

      public void onFilesDrop(List<Path> pPacks)
    • getMinecraft

      public Minecraft getMinecraft()
    • scheduleNarration

      private void scheduleNarration(long pDelay, boolean pStopSuppression)
    • suppressNarration

      private void suppressNarration(long pTime)
    • afterMouseMove

      public void afterMouseMove()
    • afterMouseAction

      public void afterMouseAction()
    • afterKeyboardAction

      public void afterKeyboardAction()
    • shouldRunNarration

      private boolean shouldRunNarration()
    • handleDelayedNarration

      public void handleDelayedNarration()
    • triggerImmediateNarration

      public void triggerImmediateNarration(boolean pOnlyNarrateNew)
    • runNarration

      private void runNarration(boolean pOnlyNarrateNew)
    • shouldNarrateNavigation

      protected boolean shouldNarrateNavigation()
    • updateNarrationState

      protected void updateNarrationState(NarrationElementOutput p_169396_)
    • updateNarratedWidget

      protected void updateNarratedWidget(NarrationElementOutput pNarrationElementOutput)
    • findNarratableWidget

      @Nullable public static Screen.NarratableSearchResult findNarratableWidget(List<? extends NarratableEntry> pEntries, @Nullable NarratableEntry pTarget)
    • narrationEnabled

      public void narrationEnabled()
    • setTooltipForNextRenderPass

      public void setTooltipForNextRenderPass(List<FormattedCharSequence> pTooltip)
    • setTooltipForNextRenderPass

      public void setTooltipForNextRenderPass(List<FormattedCharSequence> pTooltip, ClientTooltipPositioner pPositioner, boolean pOverride)
    • setTooltipForNextRenderPass

      protected void setTooltipForNextRenderPass(Component pTooltip)
    • setTooltipForNextRenderPass

      public void setTooltipForNextRenderPass(Tooltip pTooltip, ClientTooltipPositioner pPositioner, boolean pOverride)
    • hideWidgets

      protected static void hideWidgets(AbstractWidget... pWidgets)
    • getRectangle

      public ScreenRectangle getRectangle()
      指定者:
      getRectangle 在接口中 GuiEventListener
    • getBackgroundMusic

      @Nullable public Music getBackgroundMusic()
    • addEventWidget

      private void addEventWidget(GuiEventListener b)