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 classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
Screen.NarratableSearchResult
-
Field Summary
Modifier and TypeFieldDescriptionprivate static int
private static Component
private boolean
private static int
private static Component
private static int
private static int
private static int
private static int
private static int
private static int
private static int
private static int
private static int
(package private) int
private static int
private static int
private int
private static int
private static int
private static int
private static int
private static int
private MerchantScreen.TradeOfferButton[]
private static Component
private static ResourceLocation
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
font, height, itemRenderer, minecraft, passEvents, renderables, title, width
Fields inherited from class net.minecraft.client.gui.GuiComponent
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION
-
Constructor Summary
ConstructorDescriptionMerchantScreen(MerchantMenu p_99123_, Inventory p_99124_, Component p_99125_)
-
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
canScroll(int p_99141_)
protected void
init()
boolean
mouseClicked(double p_99131_, double p_99132_, int p_99133_)
boolean
mouseDragged(double p_99135_, double p_99136_, int p_99137_, double p_99138_, double p_99139_)
boolean
mouseScrolled(double p_99127_, double p_99128_, double p_99129_)
private void
void
private void
renderAndDecorateCostA(PoseStack p_99163_, ItemStack p_99164_, ItemStack p_99165_, int p_99166_, int p_99167_)
protected void
private void
renderButtonArrows(PoseStack p_99169_, MerchantOffer p_99170_, int p_99171_, int p_99172_)
protected void
renderLabels(PoseStack p_99185_, int p_99186_, int p_99187_)
private void
renderProgressBar(PoseStack p_99153_, int p_99154_, int p_99155_, MerchantOffer p_99156_)
private void
renderScroller(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, tick
Methods 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, wrapScreenError
Methods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocused
Methods 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, vLine
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
changeFocus, charTyped, getChildAt, keyReleased, magicalSpecialHackyFocus, setInitialFocus
Methods 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:
init
in classAbstractContainerScreen<MerchantMenu>
-
renderLabels
- Overrides:
renderLabels
in classAbstractContainerScreen<MerchantMenu>
-
renderBg
- Specified by:
renderBg
in 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:
render
in interfaceWidget
- Overrides:
render
in 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:
mouseDragged
in interfaceContainerEventHandler
- Specified by:
mouseDragged
in interfaceGuiEventListener
- Overrides:
mouseDragged
in classAbstractContainerScreen<MerchantMenu>
-
mouseClicked
public boolean mouseClicked(double p_99131_, double p_99132_, int p_99133_)- Specified by:
mouseClicked
in interfaceContainerEventHandler
- Specified by:
mouseClicked
in interfaceGuiEventListener
- Overrides:
mouseClicked
in classAbstractContainerScreen<MerchantMenu>
-