Class AdvancementsScreen
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.advancements.AdvancementsScreen
- All Implemented Interfaces:
AdvancementTree.Listener,ContainerEventHandler,GuiEventListener,Renderable,TabOrderedElement,ClientAdvancements.Listener
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
Screen.NarratableSearchResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ClientAdvancementsprivate static final intprivate static final intstatic final intstatic final intstatic final intstatic final intprivate booleanprivate final Screenprivate final HeaderAndFooterLayoutprivate static intprivate static final Componentprivate static final doubleprivate AdvancementTabprivate static intprivate final Map<AdvancementHolder, AdvancementTab> private static final Componentprivate static final Componentstatic final intstatic final intstatic final intprivate static final intprivate static final intprivate static final ResourceLocationprivate static final intprivate static final intstatic final intFields 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
ConstructorsConstructorDescriptionAdvancementsScreen(ClientAdvancements pAdvancements) AdvancementsScreen(ClientAdvancements pAdvancements, Screen pLastScreen) -
Method Summary
Modifier and TypeMethodDescriptiongetAdvancementWidget(AdvancementNode pAdvancement) private AdvancementTabgetTab(AdvancementNode pAdvancement) protected voidinit()booleankeyPressed(int pKeyCode, int pScanCode, int pModifiers) Called when a keyboard key is pressed within the GUI element.booleanmouseClicked(double pMouseX, double pMouseY, int pButton) Called when a mouse button is clicked within the GUI element.booleanmouseDragged(double pMouseX, double pMouseY, int pButton, double pDragX, double pDragY) Called when the mouse is dragged within the GUI element.booleanmouseScrolled(double p_295690_, double p_295286_, double p_295339_, double p_296270_) voidonAddAdvancementRoot(AdvancementNode p_301276_) voidonAddAdvancementTask(AdvancementNode p_301205_) voidvoidonClose()voidonRemoveAdvancementRoot(AdvancementNode p_301028_) voidonRemoveAdvancementTask(AdvancementNode p_301004_) voidonSelectedTabChanged(AdvancementHolder p_301084_) voidonUpdateAdvancementProgress(AdvancementNode p_301161_, AdvancementProgress p_97369_) voidremoved()voidrender(GuiGraphics p_282589_, int p_282255_, int p_283354_, float p_283123_) Neo: mixins targeting this method won't fire for container screens asAbstractContainerScreen.render(net.minecraft.client.gui.GuiGraphics, int, int, float)replicates this method in place of a super call to insert an eventprivate voidrenderInside(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, int pOffsetX, int pOffsetY) private voidrenderTooltips(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, int pOffsetX, int pOffsetY) voidrenderWindow(GuiGraphics pGuiGraphics, int pOffsetX, int pOffsetY) protected voidMethods inherited from class net.minecraft.client.gui.screens.Screen
added, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, changeFocus, children, clearFocus, clearTooltipForNextRenderPass, clearWidgets, fillCrashDetails, findNarratableWidget, getBackgroundMusic, getFont, getMinecraft, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, onFilesDrop, rebuildWidgets, removeWidget, renderBackground, renderBlurredBackground, renderMenuBackground, renderMenuBackground, renderMenuBackgroundTexture, renderPanorama, renderTransparentBackground, renderWithTooltip, resize, setInitialFocus, setInitialFocus, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldCloseOnEsc, shouldNarrateNavigation, showsActiveEffects, tick, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, updateNarratorStatusMethods 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, mouseReleased, nextFocusPath, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
getBorderForArrowNavigation, mouseMovedMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Field Details
-
WINDOW_LOCATION
-
WINDOW_WIDTH
public static final int WINDOW_WIDTH- See Also:
-
WINDOW_HEIGHT
public static final int WINDOW_HEIGHT- See Also:
-
WINDOW_INSIDE_X
private static final int WINDOW_INSIDE_X- See Also:
-
WINDOW_INSIDE_Y
private static final int WINDOW_INSIDE_Y- See Also:
-
WINDOW_INSIDE_WIDTH
public static final int WINDOW_INSIDE_WIDTH- See Also:
-
WINDOW_INSIDE_HEIGHT
public static final int WINDOW_INSIDE_HEIGHT- See Also:
-
WINDOW_TITLE_X
private static final int WINDOW_TITLE_X- See Also:
-
WINDOW_TITLE_Y
private static final int WINDOW_TITLE_Y- See Also:
-
BACKGROUND_TEXTURE_WIDTH
private static final int BACKGROUND_TEXTURE_WIDTH- See Also:
-
BACKGROUND_TEXTURE_HEIGHT
private static final int BACKGROUND_TEXTURE_HEIGHT- See Also:
-
BACKGROUND_TILE_WIDTH
public static final int BACKGROUND_TILE_WIDTH- See Also:
-
BACKGROUND_TILE_HEIGHT
public static final int BACKGROUND_TILE_HEIGHT- See Also:
-
BACKGROUND_TILE_COUNT_X
public static final int BACKGROUND_TILE_COUNT_X- See Also:
-
BACKGROUND_TILE_COUNT_Y
public static final int BACKGROUND_TILE_COUNT_Y- See Also:
-
SCROLL_SPEED
private static final double SCROLL_SPEED- See Also:
-
VERY_SAD_LABEL
-
NO_ADVANCEMENTS_LABEL
-
TITLE
-
layout
-
lastScreen
-
advancements
-
tabs
-
selectedTab
-
isScrolling
private boolean isScrolling -
tabPage
private static int tabPage -
maxPages
private static int maxPages
-
-
Constructor Details
-
AdvancementsScreen
-
AdvancementsScreen
-
-
Method Details
-
init
protected void init() -
repositionElements
protected void repositionElements()- Overrides:
repositionElementsin classScreen
-
onClose
public void onClose() -
removed
public void removed() -
mouseClicked
public boolean mouseClicked(double pMouseX, double pMouseY, int pButton) Description copied from interface:ContainerEventHandlerCalled when a mouse button is clicked within the GUI element.- Specified by:
mouseClickedin interfaceContainerEventHandler- Specified by:
mouseClickedin interfaceGuiEventListener- Parameters:
pMouseX- the X coordinate of the mouse.pMouseY- the Y coordinate of the mouse.pButton- the button that was clicked.- Returns:
trueif the event is consumed,falseotherwise.
-
keyPressed
public boolean keyPressed(int pKeyCode, int pScanCode, int pModifiers) Description copied from interface:ContainerEventHandlerCalled when a keyboard key is pressed within the GUI element.- Specified by:
keyPressedin interfaceContainerEventHandler- Specified by:
keyPressedin interfaceGuiEventListener- Overrides:
keyPressedin classScreen- Parameters:
pKeyCode- the key code of the pressed key.pScanCode- the scan code of the pressed key.pModifiers- the keyboard modifiers.- Returns:
trueif the event is consumed,falseotherwise.
-
render
Description copied from class:ScreenNeo: mixins targeting this method won't fire for container screens asAbstractContainerScreen.render(net.minecraft.client.gui.GuiGraphics, int, int, float)replicates this method in place of a super call to insert an event- Specified by:
renderin interfaceRenderable- Overrides:
renderin classScreen- Parameters:
p_282589_- the GuiGraphics object used for rendering.p_282255_- the x-coordinate of the mouse cursor.p_283354_- the y-coordinate of the mouse cursor.p_283123_- the partial tick time.
-
mouseDragged
public boolean mouseDragged(double pMouseX, double pMouseY, int pButton, double pDragX, double pDragY) Description copied from interface:ContainerEventHandlerCalled when the mouse is dragged within the GUI element.- Specified by:
mouseDraggedin interfaceContainerEventHandler- Specified by:
mouseDraggedin interfaceGuiEventListener- Parameters:
pMouseX- the X coordinate of the mouse.pMouseY- the Y coordinate of the mouse.pButton- the button that is being dragged.pDragX- the X distance of the drag.pDragY- the Y distance of the drag.- Returns:
trueif the event is consumed,falseotherwise.
-
mouseScrolled
public boolean mouseScrolled(double p_295690_, double p_295286_, double p_295339_, double p_296270_) - Specified by:
mouseScrolledin interfaceContainerEventHandler- Specified by:
mouseScrolledin interfaceGuiEventListener
-
renderInside
private void renderInside(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, int pOffsetX, int pOffsetY) -
renderWindow
-
renderTooltips
private void renderTooltips(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, int pOffsetX, int pOffsetY) -
onAddAdvancementRoot
- Specified by:
onAddAdvancementRootin interfaceAdvancementTree.Listener
-
onRemoveAdvancementRoot
- Specified by:
onRemoveAdvancementRootin interfaceAdvancementTree.Listener
-
onAddAdvancementTask
- Specified by:
onAddAdvancementTaskin interfaceAdvancementTree.Listener
-
onRemoveAdvancementTask
- Specified by:
onRemoveAdvancementTaskin interfaceAdvancementTree.Listener
-
onUpdateAdvancementProgress
- Specified by:
onUpdateAdvancementProgressin interfaceClientAdvancements.Listener
-
onSelectedTabChanged
- Specified by:
onSelectedTabChangedin interfaceClientAdvancements.Listener
-
onAdvancementsCleared
public void onAdvancementsCleared()- Specified by:
onAdvancementsClearedin interfaceAdvancementTree.Listener
-
getAdvancementWidget
-
getTab
-