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
FieldsModifier and TypeFieldDescriptionprotected org.cyclops.cyclopscore.infobook.ScreenInfoBook.NextPageButtonprotected org.cyclops.cyclopscore.infobook.ScreenInfoBook.NextPageButtonprotected org.cyclops.cyclopscore.infobook.ScreenInfoBook.NextPageButtonprotected org.cyclops.cyclopscore.infobook.ScreenInfoBook.NextPageButtonprotected org.cyclops.cyclopscore.infobook.ScreenInfoBook.NextPageButtonprotected final IInfoBookprotected final net.minecraft.resources.IdentifierFields 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, topPosFields 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
ConstructorsConstructorDescriptionScreenInfoBook(T container, net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.network.chat.Component title, IInfoBook infoBook) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidblitMirrored(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.IdentifiervoidvoiddrawArrowRight(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int x, int y) voiddrawHorizontalRule(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int x, int y) voiddrawOuterBorder(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int x, int y, int width, int height) voiddrawOuterBorder(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int x, int y, int width, int height, float r, float g, float b, float alpha) voiddrawScaledCenteredString(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, String string, int x, int y, int width, float scale, int color) voiddrawScaledCenteredString(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, String string, int x, int y, int width, float scale, int color, boolean shadow) voiddrawScaledCenteredString(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, String string, int x, int y, int width, float originalScale, int maxWidth, int color) voiddrawScaledCenteredString(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, String string, int x, int y, int width, float originalScale, int maxWidth, int color, boolean shadow) voiddrawTextBanner(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int x, int y) voiddrawTooltip(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int mx, int my, net.minecraft.network.chat.Component component) voidextractBackground(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int mouseX, int mouseY, float partialTicks) protected voidextractBackgroundSuper(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int mouseX, int mouseY, float partialTicks) protected voidextractLabels(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int x, int y) voidextractRenderState(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int mouseX, int mouseY, float partialTicks) voidextractTooltip(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, net.minecraft.world.item.ItemStack itemStack, int x, int y) intnet.minecraft.client.gui.FontgetFont()protected intprotected intprotected abstract intprotected abstract intprotected voidgetNextSections(List<InfoSection> sections) protected abstract intgetOffsetXForPageBase(int page) protected intgetOffsetXForPageWithWidths(int page) protected intprotected intgetPages()protected abstract intprotected intprotected voidgetPreviousSections(List<InfoSection> sections) protected intprotected intintgetTick()intvoidinit()booleanbooleanmouseScrolled(double mouseX, double mouseY, double mouseZ, double scrollDelta) abstract voidplayPageFlipSound(net.minecraft.client.sounds.SoundManager soundHandler) abstract voidplayPagesFlipSound(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, tickMethods 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, updateNarratorStatusMethods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocusedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
charTyped, getBorderForArrowNavigation, getChildAt, getCurrentFocusPath, isFocused, keyReleased, nextFocusPath, preeditUpdated, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMoved, shouldTakeFocusAfterInteractionMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Field Details
-
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
-
-
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:
initin classnet.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:
extractRenderStatein interfacenet.minecraft.client.gui.components.Renderable- Overrides:
extractRenderStatein classnet.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:
extractBackgroundin classnet.minecraft.client.gui.screens.Screen
-
extractLabels
protected void extractLabels(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int x, int y) - Overrides:
extractLabelsin classnet.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:
isPauseScreenin classnet.minecraft.client.gui.screens.inventory.AbstractContainerScreen<T extends org.cyclops.cyclopscore.inventory.container.ContainerExtended>
-
getFont
public net.minecraft.client.gui.Font getFont()- Overrides:
getFontin classnet.minecraft.client.gui.screens.Screen
-
getBannerWidth
public int getBannerWidth() -
getPreviousSections
-
getNextSections
-
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:
containerTickin classnet.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:
mouseScrolledin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler- Specified by:
mouseScrolledin interfacenet.minecraft.client.gui.components.events.GuiEventListener- Overrides:
mouseScrolledin classnet.minecraft.client.gui.screens.inventory.AbstractContainerScreen<T extends org.cyclops.cyclopscore.inventory.container.ContainerExtended>
-