Class MerchantScreen
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<MerchantMenu>
net.minecraft.client.gui.screens.inventory.MerchantScreen
- All Implemented Interfaces:
ContainerEventHandler,GuiEventListener,Renderable,TabOrderedElement,MenuAccess<MerchantMenu>
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
Screen.NarratableSearchResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final Componentprivate static final ResourceLocationprivate static final ResourceLocationprivate static final ResourceLocationprivate static final ResourceLocationprivate booleanprivate static final intprivate static final intprivate static final intprivate static final ResourceLocationprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final ResourceLocationprivate static final intprivate static final ResourceLocationprivate static final int(package private) intprivate static final intprivate static final intprivate intprivate static final intprivate static final intprivate static final ResourceLocationprivate static final ResourceLocationprivate static final intprivate static final intprivate static final intprivate final MerchantScreen.TradeOfferButton[]private static final Componentprivate static final 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, PANORAMA, renderables, screenExecutor, title, widthFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS -
Constructor Summary
ConstructorsConstructorDescriptionMerchantScreen(MerchantMenu p_99123_, Inventory p_99124_, Component p_99125_) -
Method Summary
Modifier and TypeMethodDescriptionprivate booleancanScroll(int p_99141_) protected voidinit()booleanmouseClicked(double p_99131_, double p_99132_, int p_99133_) booleanmouseDragged(double p_99135_, double p_99136_, int p_99137_, double p_99138_, double p_99139_) booleanmouseScrolled(double p_99127_, double p_99128_, double p_99129_, double p_295610_) private voidvoidrender(GuiGraphics p_283487_, int p_281994_, int p_282099_, float p_281815_) 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 voidrenderAndDecorateCostA(GuiGraphics p_281357_, ItemStack p_283466_, ItemStack p_282046_, int p_282403_, int p_283601_) protected voidrenderBg(GuiGraphics p_283072_, float p_281275_, int p_282312_, int p_282984_) private voidrenderButtonArrows(GuiGraphics p_283020_, MerchantOffer p_281926_, int p_282752_, int p_282179_) protected voidrenderLabels(GuiGraphics p_283337_, int p_282009_, int p_283691_) private voidrenderProgressBar(GuiGraphics p_281426_, int p_283008_, int p_283085_, MerchantOffer p_282094_) private voidrenderScroller(GuiGraphics p_283030_, int p_283154_, int p_281664_, MerchantOffers p_282877_) Methods inherited from class net.minecraft.client.gui.screens.inventory.AbstractContainerScreen
checkHotbarKeyPressed, clearDraggingState, containerTick, getGuiLeft, getGuiTop, getMenu, getSlotColor, getSlotUnderMouse, getTooltipFromContainerItem, getXSize, getYSize, handleSlotStateChanged, hasClickedOutside, isHovering, isPauseScreen, keyPressed, mouseReleased, onClose, removed, renderBackground, renderSlot, renderSlotContents, renderSlotHighlight, renderSlotHighlight, renderSlotHighlight, renderTooltip, slotClicked, tickMethods inherited from class net.minecraft.client.gui.screens.Screen
added, addRenderableOnly, addRenderableWidget, addWidget, advancePanoramaTime, 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, narrationEnabled, onFilesDrop, rebuildWidgets, removeWidget, renderBlurredBackground, renderMenuBackground, renderMenuBackground, renderMenuBackgroundTexture, renderPanorama, renderTransparentBackground, renderWithTooltip, repositionElements, resize, setInitialFocus, setInitialFocus, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldCloseOnEsc, shouldNarrateNavigation, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, 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
-
OUT_OF_STOCK_SPRITE
-
EXPERIENCE_BAR_BACKGROUND_SPRITE
-
EXPERIENCE_BAR_CURRENT_SPRITE
-
EXPERIENCE_BAR_RESULT_SPRITE
-
SCROLLER_SPRITE
-
SCROLLER_DISABLED_SPRITE
-
TRADE_ARROW_OUT_OF_STOCK_SPRITE
-
TRADE_ARROW_SPRITE
-
DISCOUNT_STRIKETHRUOGH_SPRITE
-
VILLAGER_LOCATION
-
TEXTURE_WIDTH
private static final int TEXTURE_WIDTH- See Also:
-
TEXTURE_HEIGHT
private static final int TEXTURE_HEIGHT- See Also:
-
MERCHANT_MENU_PART_X
private static final int MERCHANT_MENU_PART_X- See Also:
-
PROGRESS_BAR_X
private static final int PROGRESS_BAR_X- See Also:
-
PROGRESS_BAR_Y
private static final int PROGRESS_BAR_Y- See Also:
-
SELL_ITEM_1_X
private static final int SELL_ITEM_1_X- See Also:
-
SELL_ITEM_2_X
private static final int SELL_ITEM_2_X- See Also:
-
BUY_ITEM_X
private static final int BUY_ITEM_X- See Also:
-
LABEL_Y
private static final int LABEL_Y- See Also:
-
NUMBER_OF_OFFER_BUTTONS
private static final int NUMBER_OF_OFFER_BUTTONS- See Also:
-
TRADE_BUTTON_X
private static final int TRADE_BUTTON_X- See Also:
-
TRADE_BUTTON_HEIGHT
private static final int TRADE_BUTTON_HEIGHT- See Also:
-
TRADE_BUTTON_WIDTH
private static final int TRADE_BUTTON_WIDTH- See Also:
-
SCROLLER_HEIGHT
private static final int SCROLLER_HEIGHT- See Also:
-
SCROLLER_WIDTH
private static final int SCROLLER_WIDTH- See Also:
-
SCROLL_BAR_HEIGHT
private static final int SCROLL_BAR_HEIGHT- See Also:
-
SCROLL_BAR_TOP_POS_Y
private static final int SCROLL_BAR_TOP_POS_Y- See Also:
-
SCROLL_BAR_START_X
private static final int SCROLL_BAR_START_X- See Also:
-
TRADES_LABEL
-
DEPRECATED_TOOLTIP
-
shopItem
private int shopItem -
tradeOfferButtons
-
scrollOff
int scrollOff -
isDragging
private boolean isDragging
-
-
Constructor Details
-
MerchantScreen
-
-
Method Details
-
postButtonClick
private void postButtonClick() -
init
protected void init()- Overrides:
initin classAbstractContainerScreen<MerchantMenu>
-
renderLabels
- Overrides:
renderLabelsin classAbstractContainerScreen<MerchantMenu>
-
renderBg
- Specified by:
renderBgin classAbstractContainerScreen<MerchantMenu>
-
renderProgressBar
private void renderProgressBar(GuiGraphics p_281426_, int p_283008_, int p_283085_, MerchantOffer p_282094_) -
renderScroller
private void renderScroller(GuiGraphics p_283030_, int p_283154_, int p_281664_, MerchantOffers p_282877_) -
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 classAbstractContainerScreen<MerchantMenu>
-
renderButtonArrows
private void renderButtonArrows(GuiGraphics p_283020_, MerchantOffer p_281926_, int p_282752_, int p_282179_) -
renderAndDecorateCostA
private void renderAndDecorateCostA(GuiGraphics p_281357_, ItemStack p_283466_, ItemStack p_282046_, int p_282403_, int p_283601_) -
canScroll
private boolean canScroll(int p_99141_) -
mouseScrolled
public boolean mouseScrolled(double p_99127_, double p_99128_, double p_99129_, double p_295610_) -
mouseDragged
public boolean mouseDragged(double p_99135_, double p_99136_, int p_99137_, double p_99138_, double p_99139_) - Specified by:
mouseDraggedin interfaceContainerEventHandler- Specified by:
mouseDraggedin interfaceGuiEventListener- Overrides:
mouseDraggedin classAbstractContainerScreen<MerchantMenu>
-
mouseClicked
public boolean mouseClicked(double p_99131_, double p_99132_, int p_99133_) - Specified by:
mouseClickedin interfaceContainerEventHandler- Specified by:
mouseClickedin interfaceGuiEventListener- Overrides:
mouseClickedin classAbstractContainerScreen<MerchantMenu>
-