Class ScreenInfoBook<T extends org.cyclops.cyclopscore.inventory.container.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 org.cyclops.cyclopscore.inventory.container.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.Identifier
     

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

    BACKGROUND_TEXTURE_HEIGHT, BACKGROUND_TEXTURE_WIDTH, DEFAULT_IMAGE_HEIGHT, DEFAULT_IMAGE_WIDTH, hoveredSlot, imageHeight, imageWidth, INVENTORY_LOCATION, inventoryLabelX, inventoryLabelY, isQuickCrafting, leftPos, menu, playerInventoryTitle, quickCraftSlots, titleLabelX, titleLabelY, topPos

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

    FADE_IN_TIME, font, FOOTER_SEPARATOR, HEADER_SEPARATOR, height, INWORLD_FOOTER_SEPARATOR, INWORLD_HEADER_SEPARATOR, MENU_BACKGROUND, minecraft, narratorButton, renderables, screenExecutor, title, width
  • 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(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, com.mojang.blaze3d.pipeline.RenderPipeline renderPipeline, net.minecraft.resources.Identifier atlasLocation, int x, int y, int u, int v, int width, int height, int textureWidth, int textureHeight, int color)
     
    protected abstract net.minecraft.resources.Identifier
     
    void
     
    void
    drawArrowRight(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int x, int y)
     
    void
    drawHorizontalRule(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int x, int y)
     
    void
    drawOuterBorder(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int x, int y, int width, int height)
     
    void
    drawOuterBorder(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int x, int y, int width, int height, float r, float g, float b, float alpha)
     
    void
    drawScaledCenteredString(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, String string, int x, int y, int width, float scale, int color)
     
    void
    drawScaledCenteredString(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, String string, int x, int y, int width, float scale, int color, boolean shadow)
     
    void
    drawScaledCenteredString(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, String string, int x, int y, int width, float originalScale, int maxWidth, int color)
     
    void
    drawScaledCenteredString(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, String string, int x, int y, int width, float originalScale, int maxWidth, int color, boolean shadow)
     
    void
    drawTextBanner(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int x, int y)
     
    void
    drawTooltip(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int mx, int my, net.minecraft.network.chat.Component component)
     
    void
    extractBackground(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int mouseX, int mouseY, float partialTicks)
     
    protected void
    extractBackgroundSuper(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int mouseX, int mouseY, float partialTicks)
     
    protected void
    extractLabels(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int x, int y)
     
    void
    extractRenderState(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int mouseX, int mouseY, float partialTicks)
     
    void
    extractTooltip(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, net.minecraft.world.item.ItemStack itemStack, int x, int y)
     
    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 mouseZ, double scrollDelta)
     
    abstract void
    playPageFlipSound(net.minecraft.client.sounds.SoundManager soundHandler)
     
    abstract void
    playPagesFlipSound(net.minecraft.client.sounds.SoundManager soundHandler)
     

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

    addItemSlotMouseAction, checkHotbarKeyPressed, clearDraggingState, extractCarriedItem, extractContents, extractSlot, extractSlots, extractSnapbackItem, extractTooltip, getGuiLeft, getGuiTop, getHoveredSlot, getImageHeight, getImageWidth, getLeftPos, getMenu, getSlotUnderMouse, getTooltipFromContainerItem, getTopPos, getXSize, getYSize, handleSlotStateChanged, hasClickedOutside, isHovering, isHovering, isInGameUi, keyPressed, mouseClicked, mouseDragged, mouseReleased, onClose, removed, renderSlotContents, slotClicked, tick

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

    added, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, canInterruptWithAnotherScreen, changeFocus, children, clearFocus, clearWidgets, clickCommandAction, clickUrlAction, defaultHandleClickEvent, defaultHandleGameClickEvent, extractBlurredBackground, extractMenuBackground, extractMenuBackground, extractMenuBackgroundTexture, extractPanorama, extractRenderStateWithTooltipAndSubtitles, extractTransparentBackground, fadeWidgets, fillCrashDetails, findNarratableWidget, getBackgroundMusic, getMinecraft, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleDelayedNarration, init, insertText, isAllowedInPortal, isMouseOver, isValidCharacterForName, onFilesDrop, panoramaShouldSpin, rebuildWidgets, removeWidget, repositionElements, resize, setInitialFocus, setInitialFocus, shouldCloseOnEsc, shouldNarrateNavigation, showsActiveEffects, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, updateNarratorStatus

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

    getFocused, isDragging, setDragging, setFocused

    Methods inherited from class Object

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

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

    charTyped, getBorderForArrowNavigation, getChildAt, getCurrentFocusPath, isFocused, keyReleased, nextFocusPath, preeditUpdated, setFocused

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

    mouseMoved, shouldTakeFocusAfterInteraction

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

    getTabOrderGroup
  • Field Details

    • infoBook

      protected final IInfoBook infoBook
    • texture

      protected final net.minecraft.resources.Identifier 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.Identifier 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 org.cyclops.cyclopscore.inventory.container.ContainerExtended>
    • getOffsetXForPageBase

      protected abstract int getOffsetXForPageBase(int page)
    • getOffsetXForPageWithWidths

      protected int getOffsetXForPageWithWidths(int page)
    • getOffsetXTotal

      protected int getOffsetXTotal()
    • extractRenderState

      public void extractRenderState(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int mouseX, int mouseY, float partialTicks)
      Specified by:
      extractRenderState in interface net.minecraft.client.gui.components.Renderable
      Overrides:
      extractRenderState in class net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<T extends org.cyclops.cyclopscore.inventory.container.ContainerExtended>
    • extractBackgroundSuper

      protected void extractBackgroundSuper(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int mouseX, int mouseY, float partialTicks)
    • extractBackground

      public void extractBackground(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int mouseX, int mouseY, float partialTicks)
      Overrides:
      extractBackground in class net.minecraft.client.gui.screens.Screen
    • extractLabels

      protected void extractLabels(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int x, int y)
      Overrides:
      extractLabels in class net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<T extends org.cyclops.cyclopscore.inventory.container.ContainerExtended>
    • drawTooltip

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

      public void blitMirrored(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, com.mojang.blaze3d.pipeline.RenderPipeline renderPipeline, net.minecraft.resources.Identifier atlasLocation, int x, int y, int u, int v, int width, int height, int textureWidth, int textureHeight, int color)
    • isPauseScreen

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

      public net.minecraft.client.gui.Font getFont()
      Overrides:
      getFont in class net.minecraft.client.gui.screens.Screen
    • 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.GuiGraphicsExtractor guiGraphics, String string, int x, int y, int width, float originalScale, int maxWidth, int color)
    • drawScaledCenteredString

      public void drawScaledCenteredString(net.minecraft.client.gui.GuiGraphicsExtractor 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.GuiGraphicsExtractor guiGraphics, String string, int x, int y, int width, float scale, int color)
    • drawScaledCenteredString

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

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

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

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

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

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

      public void extractTooltip(net.minecraft.client.gui.GuiGraphicsExtractor 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 org.cyclops.cyclopscore.inventory.container.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 mouseZ, double scrollDelta)
      Specified by:
      mouseScrolled in interface net.minecraft.client.gui.components.events.ContainerEventHandler
      Specified by:
      mouseScrolled in interface net.minecraft.client.gui.components.events.GuiEventListener
      Overrides:
      mouseScrolled in class net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<T extends org.cyclops.cyclopscore.inventory.container.ContainerExtended>