Class ScreenInfoBook<T extends ContainerExtended>

java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<T>
org.cyclops.cyclopscore.infobook.ScreenInfoBook<T>
All Implemented Interfaces:
net.minecraft.client.gui.components.events.ContainerEventHandler, net.minecraft.client.gui.components.events.GuiEventListener, net.minecraft.client.gui.components.Renderable, net.minecraft.client.gui.components.TabOrderedElement, net.minecraft.client.gui.screens.inventory.MenuAccess<T>
Direct Known Subclasses:
ContainerScreenInfoBookTest

public abstract class ScreenInfoBook<T extends ContainerExtended> extends net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<T>
Base gui for IInfoBook.
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen

    net.minecraft.client.gui.screens.Screen.NarratableSearchResult
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.cyclops.cyclopscore.infobook.ScreenInfoBook.NextPageButton
     
    protected org.cyclops.cyclopscore.infobook.ScreenInfoBook.NextPageButton
     
    protected org.cyclops.cyclopscore.infobook.ScreenInfoBook.NextPageButton
     
    protected org.cyclops.cyclopscore.infobook.ScreenInfoBook.NextPageButton
     
    protected org.cyclops.cyclopscore.infobook.ScreenInfoBook.NextPageButton
     
    protected final IInfoBook
     
    protected final net.minecraft.resources.ResourceLocation
     

    Fields inherited from class net.minecraft.client.gui.screens.inventory.AbstractContainerScreen

    hoveredSlot, imageHeight, imageWidth, INVENTORY_LOCATION, inventoryLabelX, inventoryLabelY, isQuickCrafting, leftPos, menu, playerInventoryTitle, quickCraftSlots, SLOT_ITEM_BLIT_OFFSET, slotColor, titleLabelX, titleLabelY, topPos

    Fields inherited from class net.minecraft.client.gui.screens.Screen

    BACKGROUND_LOCATION, font, height, minecraft, renderables, screenExecutor, title, width

    Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener

    DOUBLE_CLICK_THRESHOLD_MS
  • Constructor Summary

    Constructors
    Constructor
    Description
    ScreenInfoBook(T container, net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.network.chat.Component title, IInfoBook infoBook)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
     
    void
    blitMirrored(int x, int y, int u, int v, int width, int height)
     
    protected abstract net.minecraft.resources.ResourceLocation
     
    void
     
    void
    drawArrowRight(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y)
     
    void
    drawHorizontalRule(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y)
     
    void
    drawOuterBorder(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y, int width, int height)
     
    void
    drawOuterBorder(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y, int width, int height, float r, float g, float b, float alpha)
     
    void
    drawScaledCenteredString(net.minecraft.client.gui.GuiGraphics guiGraphics, String string, int x, int y, int width, float scale, int color)
     
    void
    drawScaledCenteredString(net.minecraft.client.gui.GuiGraphics guiGraphics, String string, int x, int y, int width, float scale, int color, boolean shadow)
     
    void
    drawScaledCenteredString(net.minecraft.client.gui.GuiGraphics guiGraphics, String string, int x, int y, int width, float originalScale, int maxWidth, int color)
     
    void
    drawScaledCenteredString(net.minecraft.client.gui.GuiGraphics guiGraphics, String string, int x, int y, int width, float originalScale, int maxWidth, int color, boolean shadow)
     
    void
    drawTextBanner(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y)
     
    void
    drawTooltip(net.minecraft.client.gui.GuiGraphics guiGraphics, int mx, int my, net.minecraft.network.chat.Component lines)
     
    int
     
    net.minecraft.client.gui.Font
     
    protected int
     
    protected int
     
    protected abstract int
     
    protected abstract int
     
    protected void
     
    protected abstract int
     
    protected int
     
    protected int
     
    protected int
     
    protected abstract int
     
    protected int
     
    protected void
     
    protected int
     
    protected int
     
    int
     
    int
     
    void
     
    boolean
     
    boolean
    mouseScrolled(double mouseX, double mouseY, double scrollDelta)
     
    abstract void
    playPageFlipSound(net.minecraft.client.sounds.SoundManager soundHandler)
     
    abstract void
    playPagesFlipSound(net.minecraft.client.sounds.SoundManager soundHandler)
     
    void
    render(net.minecraft.client.gui.GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks)
     
    protected void
    renderBg(net.minecraft.client.gui.GuiGraphics guiGraphics, float partialTicks, int mouseX, int mouseY)
     
    protected void
    renderLabels(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y)
     
    void
    renderTooltip(net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.world.item.ItemStack itemStack, int x, int y)
     

    Methods inherited from class net.minecraft.client.gui.screens.inventory.AbstractContainerScreen

    checkHotbarKeyPressed, clearDraggingState, getGuiLeft, getGuiTop, getMenu, getSlotColor, getSlotUnderMouse, getTooltipFromContainerItem, getXSize, getYSize, hasClickedOutside, isHovering, isHovering, keyPressed, mouseClicked, mouseDragged, mouseReleased, onClose, removed, renderSlotHighlight, renderSlotHighlight, renderTooltip, slotClicked, tick

    Methods inherited from class 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

    Methods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler

    getFocused, isDragging, setDragging, setFocused

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler

    charTyped, getChildAt, getCurrentFocusPath, isFocused, keyReleased, magicalSpecialHackyFocus, nextFocusPath, setFocused

    Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener

    mouseMoved

    Methods inherited from interface net.minecraft.client.gui.components.TabOrderedElement

    getTabOrderGroup
  • Field Details

    • infoBook

      protected final IInfoBook infoBook
    • texture

      protected final net.minecraft.resources.ResourceLocation texture
    • buttonNextPage

      protected org.cyclops.cyclopscore.infobook.ScreenInfoBook.NextPageButton buttonNextPage
    • buttonPreviousPage

      protected org.cyclops.cyclopscore.infobook.ScreenInfoBook.NextPageButton buttonPreviousPage
    • buttonParent

      protected org.cyclops.cyclopscore.infobook.ScreenInfoBook.NextPageButton buttonParent
    • buttonBack

      protected org.cyclops.cyclopscore.infobook.ScreenInfoBook.NextPageButton buttonBack
    • buttonExternal

      protected org.cyclops.cyclopscore.infobook.ScreenInfoBook.NextPageButton buttonExternal
  • Constructor Details

    • ScreenInfoBook

      public ScreenInfoBook(T container, net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.network.chat.Component title, IInfoBook infoBook)
  • Method Details

    • constructGuiTexture

      protected abstract net.minecraft.resources.ResourceLocation constructGuiTexture()
    • getPages

      protected int getPages()
      Returns:
      The amount of pages to show at once.
    • getGuiWidth

      protected abstract int getGuiWidth()
    • getGuiHeight

      protected abstract int getGuiHeight()
    • getPageWidth

      protected abstract int getPageWidth()
    • getPageYOffset

      protected int getPageYOffset()
    • getFootnoteOffsetX

      protected int getFootnoteOffsetX()
    • getFootnoteOffsetY

      protected int getFootnoteOffsetY()
    • getPrevNextOffsetY

      protected int getPrevNextOffsetY()
    • getPrevNextOffsetX

      protected int getPrevNextOffsetX()
    • getTitleColor

      public int getTitleColor()
    • init

      public void init()
      Overrides:
      init in class net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<T extends ContainerExtended>
    • getOffsetXForPageBase

      protected abstract int getOffsetXForPageBase(int page)
    • getOffsetXForPageWithWidths

      protected int getOffsetXForPageWithWidths(int page)
    • getOffsetXTotal

      protected int getOffsetXTotal()
    • render

      public void render(net.minecraft.client.gui.GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks)
      Specified by:
      render in interface net.minecraft.client.gui.components.Renderable
      Overrides:
      render in class net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<T extends ContainerExtended>
    • renderBg

      protected void renderBg(net.minecraft.client.gui.GuiGraphics guiGraphics, float partialTicks, int mouseX, int mouseY)
      Specified by:
      renderBg in class net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<T extends ContainerExtended>
    • renderLabels

      protected void renderLabels(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y)
      Overrides:
      renderLabels in class net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<T extends ContainerExtended>
    • drawTooltip

      public void drawTooltip(net.minecraft.client.gui.GuiGraphics guiGraphics, int mx, int my, net.minecraft.network.chat.Component lines)
    • blitMirrored

      public void blitMirrored(int x, int y, int u, int v, int width, int height)
    • isPauseScreen

      public boolean isPauseScreen()
      Overrides:
      isPauseScreen in class net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<T extends ContainerExtended>
    • getFont

      public net.minecraft.client.gui.Font getFont()
    • getBannerWidth

      public int getBannerWidth()
    • getPreviousSections

      protected void getPreviousSections(List<InfoSection> sections)
    • getNextSections

      protected void getNextSections(List<InfoSection> sections)
    • applyNavigation

      protected void applyNavigation()
    • drawScaledCenteredString

      public void drawScaledCenteredString(net.minecraft.client.gui.GuiGraphics guiGraphics, String string, int x, int y, int width, float originalScale, int maxWidth, int color)
    • drawScaledCenteredString

      public void drawScaledCenteredString(net.minecraft.client.gui.GuiGraphics guiGraphics, String string, int x, int y, int width, float originalScale, int maxWidth, int color, boolean shadow)
    • drawScaledCenteredString

      public void drawScaledCenteredString(net.minecraft.client.gui.GuiGraphics guiGraphics, String string, int x, int y, int width, float scale, int color)
    • drawScaledCenteredString

      public void drawScaledCenteredString(net.minecraft.client.gui.GuiGraphics guiGraphics, String string, int x, int y, int width, float scale, int color, boolean shadow)
    • drawHorizontalRule

      public void drawHorizontalRule(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y)
    • drawTextBanner

      public void drawTextBanner(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y)
    • drawArrowRight

      public void drawArrowRight(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y)
    • drawOuterBorder

      public void drawOuterBorder(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y, int width, int height)
    • drawOuterBorder

      public void drawOuterBorder(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y, int width, int height, float r, float g, float b, float alpha)
    • renderTooltip

      public void renderTooltip(net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.world.item.ItemStack itemStack, int x, int y)
    • getTick

      public int getTick()
    • containerTick

      public void containerTick()
      Overrides:
      containerTick in class net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<T extends ContainerExtended>
    • playPageFlipSound

      public abstract void playPageFlipSound(net.minecraft.client.sounds.SoundManager soundHandler)
    • playPagesFlipSound

      public abstract void playPagesFlipSound(net.minecraft.client.sounds.SoundManager soundHandler)
    • mouseScrolled

      public boolean mouseScrolled(double mouseX, double mouseY, double scrollDelta)