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 Screen
Screen.NarratableSearchResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Identifierprivate booleanprivate static final Identifierprivate static final Identifierprivate static final Identifierprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final Identifierprivate static final intprivate static final intprivate static final Identifierprivate 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 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, slotColor, titleLabelX, titleLabelY, topPosFields inherited from class 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
ConstructorsConstructorDescriptionStonecutterScreen(StonecutterMenu menu, Inventory inventory, Component title) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidprotected intprivate booleanbooleanmouseClicked(MouseButtonEvent event, boolean doubleClick) booleanmouseDragged(MouseButtonEvent event, double dx, double dy) booleanmouseReleased(MouseButtonEvent event) booleanmouseScrolled(double x, double y, double scrollX, double scrollY) protected voidrenderBg(GuiGraphics graphics, float a, int xm, int ym) private voidrenderButtons(GuiGraphics graphics, int xm, int ym, int x, int y, int endIndex) private voidrenderRecipes(GuiGraphics graphics, int x, int y, int endIndex) protected voidrenderTooltip(GuiGraphics graphics, int mouseX, int mouseY) Methods inherited from class AbstractContainerScreen
addItemSlotMouseAction, checkHotbarKeyPressed, clearDraggingState, containerTick, getGuiLeft, getGuiTop, getMenu, getSlotColor, getSlotUnderMouse, getTooltipFromContainerItem, getXSize, getYSize, handleSlotStateChanged, hasClickedOutside, init, isHovering, isInGameUi, isPauseScreen, keyPressed, onClose, onMouseClickAction, removed, render, renderBackground, renderCarriedItem, renderContents, renderLabels, renderSlot, renderSlotContents, renderSlots, renderSnapbackItem, slotClicked, tickMethods inherited from class Screen
added, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, canInterruptWithAnotherScreen, changeFocus, children, clearFocus, clearWidgets, clickCommandAction, clickUrlAction, defaultHandleClickEvent, defaultHandleGameClickEvent, fadeWidgets, fillCrashDetails, findNarratableWidget, getBackgroundMusic, getFont, getMinecraft, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleDelayedNarration, init, insertText, isAllowedInPortal, isMouseOver, isValidCharacterForName, onFilesDrop, panoramaShouldSpin, rebuildWidgets, removeWidget, renderBlurredBackground, renderMenuBackground, renderMenuBackground, renderMenuBackgroundTexture, renderPanorama, renderTransparentBackground, renderWithTooltipAndSubtitles, repositionElements, resize, setInitialFocus, setInitialFocus, shouldCloseOnEsc, shouldNarrateNavigation, showsActiveEffects, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, updateNarratorStatusMethods inherited from class AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocusedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ContainerEventHandler
charTyped, getBorderForArrowNavigation, getChildAt, getCurrentFocusPath, isFocused, keyReleased, nextFocusPath, setFocusedMethods inherited from interface GuiEventListener
mouseMoved, shouldTakeFocusAfterInteractionMethods inherited from interface 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
-
renderBg
- Specified by:
renderBgin classAbstractContainerScreen<StonecutterMenu>
-
renderTooltip
- Overrides:
renderTooltipin classAbstractContainerScreen<StonecutterMenu>
-
renderButtons
-
renderRecipes
-
mouseClicked
- Specified by:
mouseClickedin interfaceContainerEventHandler- Specified by:
mouseClickedin interfaceGuiEventListener- Overrides:
mouseClickedin classAbstractContainerScreen<StonecutterMenu>
-
mouseDragged
- Specified by:
mouseDraggedin interfaceContainerEventHandler- Specified by:
mouseDraggedin interfaceGuiEventListener- Overrides:
mouseDraggedin classAbstractContainerScreen<StonecutterMenu>
-
mouseReleased
- Specified by:
mouseReleasedin interfaceContainerEventHandler- Specified by:
mouseReleasedin interfaceGuiEventListener- Overrides:
mouseReleasedin classAbstractContainerScreen<StonecutterMenu>
-
mouseScrolled
public boolean mouseScrolled(double x, double y, double scrollX, double scrollY) - Specified by:
mouseScrolledin interfaceContainerEventHandler- Specified by:
mouseScrolledin interfaceGuiEventListener- Overrides:
mouseScrolledin classAbstractContainerScreen<StonecutterMenu>
-
isScrollBarActive
private boolean isScrollBarActive() -
getOffscreenRows
protected int getOffscreenRows() -
containerChanged
private void containerChanged()
-