Package org.cyclops.cyclopscore.infobook
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
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.ResourceLocationFields 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, topPosFields inherited from class net.minecraft.client.gui.screens.Screen
CUBE_MAP, font, FOOTER_SEPARATOR, HEADER_SEPARATOR, height, INWORLD_FOOTER_SEPARATOR, INWORLD_HEADER_SEPARATOR, MENU_BACKGROUND, minecraft, narratorButton, PANORAMA, renderables, screenExecutor, title, widthFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS -
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(int x, int y, int u, int v, int width, int height) protected abstract net.minecraft.resources.ResourceLocationvoidvoiddrawArrowRight(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y) voiddrawHorizontalRule(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y) voiddrawOuterBorder(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y, int width, int height) voiddrawOuterBorder(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y, int width, int height, float r, float g, float b, float alpha) voiddrawScaledCenteredString(net.minecraft.client.gui.GuiGraphics guiGraphics, String string, int x, int y, int width, float scale, int color) voiddrawScaledCenteredString(net.minecraft.client.gui.GuiGraphics guiGraphics, String string, int x, int y, int width, float scale, int color, boolean shadow) voiddrawScaledCenteredString(net.minecraft.client.gui.GuiGraphics guiGraphics, String string, int x, int y, int width, float originalScale, int maxWidth, int color) voiddrawScaledCenteredString(net.minecraft.client.gui.GuiGraphics guiGraphics, String string, int x, int y, int width, float originalScale, int maxWidth, int color, boolean shadow) voiddrawTextBanner(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y) voiddrawTooltip(net.minecraft.client.gui.GuiGraphics guiGraphics, int mx, int my, net.minecraft.network.chat.Component lines) 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) voidrender(net.minecraft.client.gui.GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks) voidrenderBackground(net.minecraft.client.gui.GuiGraphics p_295206_, int p_295457_, int p_294596_, float p_296351_) protected voidrenderBackgroundSuper(net.minecraft.client.gui.GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks) protected voidrenderBg(net.minecraft.client.gui.GuiGraphics guiGraphics, float partialTicks, int mouseX, int mouseY) protected voidrenderLabels(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y) voidrenderTooltip(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, handleSlotStateChanged, hasClickedOutside, isHovering, isHovering, keyPressed, mouseClicked, mouseDragged, mouseReleased, onClose, removed, renderSlot, renderSlotContents, renderSlotHighlight, renderSlotHighlight, renderSlotHighlight, renderTooltip, slotClicked, tickMethods inherited from class net.minecraft.client.gui.screens.Screen
added, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, changeFocus, children, clearFocus, clearTooltipForNextRenderPass, clearWidgets, findNarratableWidget, getBackgroundMusic, getMinecraft, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, onFilesDrop, rebuildWidgets, removeWidget, renderBlurredBackground, renderMenuBackground, renderMenuBackground, renderMenuBackgroundTexture, renderPanorama, renderTransparentBackground, renderWithTooltip, repositionElements, resize, setInitialFocus, setInitialFocus, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldCloseOnEsc, shouldNarrateNavigation, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, updateNarratorStatus, wrapScreenErrorMethods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocusedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
charTyped, getChildAt, getCurrentFocusPath, isFocused, keyReleased, nextFocusPath, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMovedMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Field Details
-
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
-
-
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:
initin classnet.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:
renderin interfacenet.minecraft.client.gui.components.Renderable- Overrides:
renderin classnet.minecraft.client.gui.screens.inventory.AbstractContainerScreen<T extends ContainerExtended>
-
renderBackgroundSuper
protected void renderBackgroundSuper(net.minecraft.client.gui.GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks) -
renderBackground
public void renderBackground(net.minecraft.client.gui.GuiGraphics p_295206_, int p_295457_, int p_294596_, float p_296351_) - Overrides:
renderBackgroundin classnet.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:
renderBgin classnet.minecraft.client.gui.screens.inventory.AbstractContainerScreen<T extends ContainerExtended>
-
renderLabels
protected void renderLabels(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y) - Overrides:
renderLabelsin classnet.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:
isPauseScreenin classnet.minecraft.client.gui.screens.inventory.AbstractContainerScreen<T extends ContainerExtended>
-
getFont
public net.minecraft.client.gui.Font getFont() -
getBannerWidth
public int getBannerWidth() -
getPreviousSections
-
getNextSections
-
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:
containerTickin classnet.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 mouseZ, double scrollDelta)
-