Class BookViewScreen

All Implemented Interfaces:
ContainerEventHandler, GuiEventListener, Renderable, TabOrderedElement
Direct Known Subclasses:
LecternScreen

public class BookViewScreen extends Screen
  • Field Details

  • Constructor Details

  • Method Details

    • setBookAccess

      public void setBookAccess(BookViewScreen.BookAccess pBookAccess)
    • setPage

      public boolean setPage(int pPageNum)
      Moves the book to the specified page and returns true if it exists, false otherwise.
    • forcePage

      protected boolean forcePage(int pPageNum)
      I'm not sure why this exists. The function it calls is public and does all the work.
    • init

      protected void init()
      Overrides:
      init in class Screen
    • getNarrationMessage

      public Component getNarrationMessage()
      Overrides:
      getNarrationMessage in class Screen
    • getPageNumberMessage

      private Component getPageNumberMessage()
    • createMenuControls

      protected void createMenuControls()
    • createPageControlButtons

      protected void createPageControlButtons()
    • getNumPages

      private int getNumPages()
    • pageBack

      protected void pageBack()
    • pageForward

      protected void pageForward()
    • updateButtonVisibility

      private void updateButtonVisibility()
    • keyPressed

      public boolean keyPressed(KeyEvent p_445531_)
      Specified by:
      keyPressed in interface ContainerEventHandler
      Specified by:
      keyPressed in interface GuiEventListener
      Overrides:
      keyPressed in class Screen
    • render

      public void render(GuiGraphics p_281997_, int p_281262_, int p_283321_, float p_282251_)
      Description copied from interface: Renderable
      Renders the graphical user interface (GUI) element.
      Specified by:
      render in interface Renderable
      Overrides:
      render in class Screen
      Parameters:
      p_281997_ - the GuiGraphics object used for rendering.
      p_281262_ - the x-coordinate of the mouse cursor.
      p_283321_ - the y-coordinate of the mouse cursor.
      p_282251_ - the partial tick time.
    • renderBackground

      public void renderBackground(GuiGraphics p_295678_, int p_296491_, int p_294260_, float p_294869_)
      Overrides:
      renderBackground in class Screen
    • mouseClicked

      public boolean mouseClicked(MouseButtonEvent p_446030_, boolean p_434370_)
    • handleClickEvent

      protected void handleClickEvent(Minecraft p_427450_, ClickEvent p_425867_)
      Overrides:
      handleClickEvent in class Screen
    • closeContainerOnServer

      protected void closeContainerOnServer()
    • isInGameUi

      public boolean isInGameUi()
      Overrides:
      isInGameUi in class Screen
    • getClickedComponentStyleAt

      @Nullable public Style getClickedComponentStyleAt(double pMouseX, double pMouseY)