Class MerchantScreen
java.lang.Object
net.minecraft.client.gui.GuiComponent
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,Widget,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 intprivate static Componentprivate booleanprivate static intprivate static Componentprivate static intprivate static intprivate static intprivate static intprivate static intprivate static intprivate static intprivate static intprivate static int(package private) intprivate static intprivate static intprivate intprivate static intprivate static intprivate static intprivate static intprivate static intprivate MerchantScreen.TradeOfferButton[]private static Componentprivate static 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
font, height, itemRenderer, minecraft, passEvents, renderables, title, widthFields inherited from class net.minecraft.client.gui.GuiComponent
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION -
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_)private voidvoidprivate voidrenderAndDecorateCostA(PoseStack p_99163_, ItemStack p_99164_, ItemStack p_99165_, int p_99166_, int p_99167_)protected voidprivate voidrenderButtonArrows(PoseStack p_99169_, MerchantOffer p_99170_, int p_99171_, int p_99172_)protected voidrenderLabels(PoseStack p_99185_, int p_99186_, int p_99187_)private voidrenderProgressBar(PoseStack p_99153_, int p_99154_, int p_99155_, MerchantOffer p_99156_)private voidrenderScroller(PoseStack p_99158_, int p_99159_, int p_99160_, MerchantOffers p_99161_)Methods inherited from class net.minecraft.client.gui.screens.inventory.AbstractContainerScreen
checkHotbarKeyPressed, containerTick, getGuiLeft, getGuiTop, getMenu, getSlotColor, getSlotUnderMouse, getXSize, getYSize, hasClickedOutside, isHovering, isPauseScreen, keyPressed, mouseReleased, onClose, removed, renderSlotHighlight, renderSlotHighlight, renderTooltip, slotClicked, tickMethods inherited from class net.minecraft.client.gui.screens.Screen
addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, children, clearWidgets, findNarratableWidget, getMinecraft, getNarrationMessage, getTitle, getTooltipFromItem, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, narrationEnabled, onFilesDrop, removeWidget, renderBackground, renderBackground, renderComponentHoverEffect, renderComponentTooltip, renderComponentTooltip, renderComponentTooltip, renderComponentTooltip, renderComponentToolTip, renderDirtBackground, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderToolTip, resize, sendMessage, sendMessage, shouldCloseOnEsc, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, wrapScreenErrorMethods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocusedMethods inherited from class net.minecraft.client.gui.GuiComponent
blit, blit, blit, blit, blit, blitOutlineBlack, drawCenteredString, drawCenteredString, drawCenteredString, drawString, drawString, drawString, fill, fillGradient, fillGradient, fillGradient, getBlitOffset, hLine, setBlitOffset, vLineMethods 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
changeFocus, charTyped, getChildAt, keyReleased, magicalSpecialHackyFocus, setInitialFocusMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMoved
-
Field Details
-
VILLAGER_LOCATION
-
TEXTURE_WIDTH
private static final int TEXTURE_WIDTH- See Also:
- Constant Field Values
-
TEXTURE_HEIGHT
private static final int TEXTURE_HEIGHT- See Also:
- Constant Field Values
-
MERCHANT_MENU_PART_X
private static final int MERCHANT_MENU_PART_X- See Also:
- Constant Field Values
-
PROGRESS_BAR_X
private static final int PROGRESS_BAR_X- See Also:
- Constant Field Values
-
PROGRESS_BAR_Y
private static final int PROGRESS_BAR_Y- See Also:
- Constant Field Values
-
SELL_ITEM_1_X
private static final int SELL_ITEM_1_X- See Also:
- Constant Field Values
-
SELL_ITEM_2_X
private static final int SELL_ITEM_2_X- See Also:
- Constant Field Values
-
BUY_ITEM_X
private static final int BUY_ITEM_X- See Also:
- Constant Field Values
-
LABEL_Y
private static final int LABEL_Y- See Also:
- Constant Field Values
-
NUMBER_OF_OFFER_BUTTONS
private static final int NUMBER_OF_OFFER_BUTTONS- See Also:
- Constant Field Values
-
TRADE_BUTTON_X
private static final int TRADE_BUTTON_X- See Also:
- Constant Field Values
-
TRADE_BUTTON_HEIGHT
private static final int TRADE_BUTTON_HEIGHT- See Also:
- Constant Field Values
-
TRADE_BUTTON_WIDTH
private static final int TRADE_BUTTON_WIDTH- See Also:
- Constant Field Values
-
SCROLLER_HEIGHT
private static final int SCROLLER_HEIGHT- See Also:
- Constant Field Values
-
SCROLLER_WIDTH
private static final int SCROLLER_WIDTH- See Also:
- Constant Field Values
-
SCROLL_BAR_HEIGHT
private static final int SCROLL_BAR_HEIGHT- See Also:
- Constant Field Values
-
SCROLL_BAR_TOP_POS_Y
private static final int SCROLL_BAR_TOP_POS_Y- See Also:
- Constant Field Values
-
SCROLL_BAR_START_X
private static final int SCROLL_BAR_START_X- See Also:
- Constant Field Values
-
TRADES_LABEL
-
LEVEL_SEPARATOR
-
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(PoseStack p_99153_, int p_99154_, int p_99155_, MerchantOffer p_99156_) -
renderScroller
private void renderScroller(PoseStack p_99158_, int p_99159_, int p_99160_, MerchantOffers p_99161_) -
render
- Specified by:
renderin interfaceWidget- Overrides:
renderin classAbstractContainerScreen<MerchantMenu>
-
renderButtonArrows
private void renderButtonArrows(PoseStack p_99169_, MerchantOffer p_99170_, int p_99171_, int p_99172_) -
renderAndDecorateCostA
-
canScroll
private boolean canScroll(int p_99141_) -
mouseScrolled
public boolean mouseScrolled(double p_99127_, double p_99128_, double p_99129_) -
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>
-