Class StonecutterScreen
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<StonecutterMenu>
net.minecraft.client.gui.screens.inventory.StonecutterScreen
- All Implemented Interfaces:
ContainerEventHandler,GuiEventListener,Renderable,TabOrderedElement,MenuAccess<StonecutterMenu>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
Screen.NarratableSearchResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final ResourceLocationprivate booleanprivate static final ResourceLocationprivate static final ResourceLocationprivate static final ResourceLocationprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final ResourceLocationprivate static final intprivate static final intprivate static final ResourceLocationprivate static final intprivate booleanIstrueif the player clicked on the scroll wheel in the GUI.private floatprivate intThe index of the first recipe to display.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, 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
ConstructorsConstructorDescriptionStonecutterScreen(StonecutterMenu menu, Inventory playerInventory, Component title) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidprotected intprivate booleanbooleanmouseClicked(double mouseX, double mouseY, int button) Called when a mouse button is clicked within the GUI element.booleanmouseDragged(double mouseX, double mouseY, int button, double dragX, double dragY) Called when the mouse is dragged within the GUI element.booleanmouseScrolled(double mouseX, double mouseY, double scrollX, double scrollY) voidrender(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) Renders the graphical user interface (GUI) element.protected voidrenderBg(GuiGraphics guiGraphics, float partialTick, int mouseX, int mouseY) private voidrenderButtons(GuiGraphics guiGraphics, int mouseX, int mouseY, int x, int y, int lastVisibleElementIndex) private voidrenderRecipes(GuiGraphics guiGraphics, int x, int y, int startIndex) protected voidrenderTooltip(GuiGraphics guiGraphics, int x, int y) Methods inherited from class net.minecraft.client.gui.screens.inventory.AbstractContainerScreen
checkHotbarKeyPressed, clearDraggingState, containerTick, getGuiLeft, getGuiTop, getMenu, getSlotColor, getSlotUnderMouse, getTooltipFromContainerItem, getXSize, getYSize, handleSlotStateChanged, hasClickedOutside, init, isHovering, isPauseScreen, keyPressed, mouseReleased, onClose, removed, renderBackground, renderLabels, renderSlot, renderSlotContents, renderSlotHighlight, renderSlotHighlight, renderSlotHighlight, 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
-
SCROLLER_SPRITE
-
SCROLLER_DISABLED_SPRITE
-
RECIPE_SELECTED_SPRITE
-
RECIPE_HIGHLIGHTED_SPRITE
-
RECIPE_SPRITE
-
BG_LOCATION
-
SCROLLER_WIDTH
private static final int SCROLLER_WIDTH- See Also:
-
SCROLLER_HEIGHT
private static final int SCROLLER_HEIGHT- See Also:
-
RECIPES_COLUMNS
private static final int RECIPES_COLUMNS- See Also:
-
RECIPES_ROWS
private static final int RECIPES_ROWS- See Also:
-
RECIPES_IMAGE_SIZE_WIDTH
private static final int RECIPES_IMAGE_SIZE_WIDTH- See Also:
-
RECIPES_IMAGE_SIZE_HEIGHT
private static final int RECIPES_IMAGE_SIZE_HEIGHT- See Also:
-
SCROLLER_FULL_HEIGHT
private static final int SCROLLER_FULL_HEIGHT- See Also:
-
RECIPES_X
private static final int RECIPES_X- See Also:
-
RECIPES_Y
private static final int RECIPES_Y- See Also:
-
scrollOffs
private float scrollOffs -
scrolling
private boolean scrollingIstrueif the player clicked on the scroll wheel in the GUI. -
startIndex
private int startIndexThe index of the first recipe to display. The number of recipes displayed at any time is 12 (4 recipes per row, and 3 rows). If the player scrolled down one row, this value would be 4 (representing the index of the first slot on the second row). -
displayRecipes
private boolean displayRecipes
-
-
Constructor Details
-
StonecutterScreen
-
-
Method Details
-
render
Renders the graphical user interface (GUI) element.- Specified by:
renderin interfaceRenderable- Overrides:
renderin classAbstractContainerScreen<StonecutterMenu>- Parameters:
guiGraphics- the GuiGraphics object used for rendering.mouseX- the x-coordinate of the mouse cursor.mouseY- the y-coordinate of the mouse cursor.partialTick- the partial tick time.
-
renderBg
- Specified by:
renderBgin classAbstractContainerScreen<StonecutterMenu>
-
renderTooltip
- Overrides:
renderTooltipin classAbstractContainerScreen<StonecutterMenu>
-
renderButtons
private void renderButtons(GuiGraphics guiGraphics, int mouseX, int mouseY, int x, int y, int lastVisibleElementIndex) -
renderRecipes
-
mouseClicked
public boolean mouseClicked(double mouseX, double mouseY, int button) Called when a mouse button is clicked within the GUI element.- Specified by:
mouseClickedin interfaceContainerEventHandler- Specified by:
mouseClickedin interfaceGuiEventListener- Overrides:
mouseClickedin classAbstractContainerScreen<StonecutterMenu>- Parameters:
mouseX- the X coordinate of the mouse.mouseY- the Y coordinate of the mouse.button- the button that was clicked.- Returns:
trueif the event is consumed,falseotherwise.
-
mouseDragged
public boolean mouseDragged(double mouseX, double mouseY, int button, double dragX, double dragY) Called when the mouse is dragged within the GUI element.- Specified by:
mouseDraggedin interfaceContainerEventHandler- Specified by:
mouseDraggedin interfaceGuiEventListener- Overrides:
mouseDraggedin classAbstractContainerScreen<StonecutterMenu>- Parameters:
mouseX- the X coordinate of the mouse.mouseY- the Y coordinate of the mouse.button- the button that is being dragged.dragX- the X distance of the drag.dragY- the Y distance of the drag.- Returns:
trueif the event is consumed,falseotherwise.
-
mouseScrolled
public boolean mouseScrolled(double mouseX, double mouseY, double scrollX, double scrollY) -
isScrollBarActive
private boolean isScrollBarActive() -
getOffscreenRows
protected int getOffscreenRows() -
containerChanged
private void containerChanged()
-