Class LoomScreen
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<LoomMenu>
net.minecraft.client.gui.screens.inventory.LoomScreen
- All Implemented Interfaces:
ContainerEventHandler
,GuiEventListener
,Renderable
,TabOrderedElement
,MenuAccess<LoomMenu>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
Screen.NarratableSearchResult
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final ResourceLocation
private ItemStack
private static final ResourceLocation
private boolean
private static final ResourceLocation
private ItemStack
private static final ResourceLocation
private ModelPart
private boolean
private static final int
private static final ResourceLocation
private static final int
private static final int
private static final ResourceLocation
private static final ResourceLocation
private static final ResourceLocation
private static final int
private static final int
private ItemStack
private BannerPatternLayers
private static final ResourceLocation
private static final int
private static final int
private static final ResourceLocation
private static final int
private boolean
private float
private int
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, topPos
Fields 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, width
Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
protected boolean
hasClickedOutside
(double pMouseX, double pMouseY, int pGuiLeft, int pGuiTop, int pMouseButton) protected void
init()
boolean
mouseClicked
(double pMouseX, double pMouseY, int pButton) Called when a mouse button is clicked within the GUI element.boolean
mouseDragged
(double pMouseX, double pMouseY, int pButton, double pDragX, double pDragY) Called when the mouse is dragged within the GUI element.boolean
mouseScrolled
(double pMouseX, double pMouseY, double pScrollX, double pScrollY) void
render
(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick) Renders the graphical user interface (GUI) element.protected void
renderBg
(GuiGraphics pGuiGraphics, float pPartialTick, int pMouseX, int pMouseY) private void
renderPattern
(GuiGraphics pGuiGraphics, Holder<BannerPattern> pPatern, int pX, int pY) private int
Methods inherited from class net.minecraft.client.gui.screens.inventory.AbstractContainerScreen
checkHotbarKeyPressed, clearDraggingState, containerTick, getGuiLeft, getGuiTop, getMenu, getSlotColor, getSlotUnderMouse, getTooltipFromContainerItem, getXSize, getYSize, handleSlotStateChanged, isHovering, isPauseScreen, keyPressed, mouseReleased, onClose, removed, renderBackground, renderLabels, renderSlot, renderSlotContents, renderSlotHighlight, renderSlotHighlight, renderSlotHighlight, renderTooltip, slotClicked, tick
Methods 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, wrapScreenError
Methods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocused
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
charTyped, getChildAt, getCurrentFocusPath, isFocused, keyReleased, nextFocusPath, setFocused
Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMoved
Methods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Field Details
-
BANNER_SLOT_SPRITE
-
DYE_SLOT_SPRITE
-
PATTERN_SLOT_SPRITE
-
SCROLLER_SPRITE
-
SCROLLER_DISABLED_SPRITE
-
PATTERN_SELECTED_SPRITE
-
PATTERN_HIGHLIGHTED_SPRITE
-
PATTERN_SPRITE
-
ERROR_SPRITE
-
BG_LOCATION
-
PATTERN_COLUMNS
private static final int PATTERN_COLUMNS- See Also:
-
PATTERN_ROWS
private static final int PATTERN_ROWS- See Also:
-
SCROLLER_WIDTH
private static final int SCROLLER_WIDTH- See Also:
-
SCROLLER_HEIGHT
private static final int SCROLLER_HEIGHT- See Also:
-
PATTERN_IMAGE_SIZE
private static final int PATTERN_IMAGE_SIZE- See Also:
-
SCROLLER_FULL_HEIGHT
private static final int SCROLLER_FULL_HEIGHT- See Also:
-
PATTERNS_X
private static final int PATTERNS_X- See Also:
-
PATTERNS_Y
private static final int PATTERNS_Y- See Also:
-
flag
-
resultBannerPatterns
-
bannerStack
-
dyeStack
-
patternStack
-
displayPatterns
private boolean displayPatterns -
hasMaxPatterns
private boolean hasMaxPatterns -
scrollOffs
private float scrollOffs -
scrolling
private boolean scrolling -
startRow
private int startRow
-
-
Constructor Details
-
LoomScreen
-
-
Method Details
-
init
protected void init()- Overrides:
init
in classAbstractContainerScreen<LoomMenu>
-
render
Renders the graphical user interface (GUI) element.- Specified by:
render
in interfaceRenderable
- Overrides:
render
in classAbstractContainerScreen<LoomMenu>
- Parameters:
pGuiGraphics
- the GuiGraphics object used for rendering.pMouseX
- the x-coordinate of the mouse cursor.pMouseY
- the y-coordinate of the mouse cursor.pPartialTick
- the partial tick time.
-
totalRowCount
private int totalRowCount() -
renderBg
- Specified by:
renderBg
in classAbstractContainerScreen<LoomMenu>
-
renderPattern
-
mouseClicked
public boolean mouseClicked(double pMouseX, double pMouseY, int pButton) Called when a mouse button is clicked within the GUI element.- Specified by:
mouseClicked
in interfaceContainerEventHandler
- Specified by:
mouseClicked
in interfaceGuiEventListener
- Overrides:
mouseClicked
in classAbstractContainerScreen<LoomMenu>
- Parameters:
pMouseX
- the X coordinate of the mouse.pMouseY
- the Y coordinate of the mouse.pButton
- the button that was clicked.- Returns:
true
if the event is consumed,false
otherwise.
-
mouseDragged
public boolean mouseDragged(double pMouseX, double pMouseY, int pButton, double pDragX, double pDragY) Called when the mouse is dragged within the GUI element.- Specified by:
mouseDragged
in interfaceContainerEventHandler
- Specified by:
mouseDragged
in interfaceGuiEventListener
- Overrides:
mouseDragged
in classAbstractContainerScreen<LoomMenu>
- 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:
true
if the event is consumed,false
otherwise.
-
mouseScrolled
public boolean mouseScrolled(double pMouseX, double pMouseY, double pScrollX, double pScrollY) -
hasClickedOutside
protected boolean hasClickedOutside(double pMouseX, double pMouseY, int pGuiLeft, int pGuiTop, int pMouseButton) - Overrides:
hasClickedOutside
in classAbstractContainerScreen<LoomMenu>
-
containerChanged
private void containerChanged()
-