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 final int
private static final Component
private boolean
private static final int
private static final Component
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
(package private) int
private static final int
private static final int
private int
private static final int
private static final int
private static final int
private static final int
private static final int
private final MerchantScreen.TradeOfferButton[]
private static final Component
private static final 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
Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
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, clearDraggingState, 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, hideWidgets, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, narrationEnabled, onFilesDrop, rebuildWidgets, removeWidget, renderBackground, renderBackground, renderComponentHoverEffect, renderComponentTooltip, renderComponentTooltip, renderComponentTooltip, renderComponentTooltip, renderDirtBackground, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderTooltip, resize, 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, disableScissor, drawCenteredString, drawCenteredString, drawCenteredString, drawString, drawString, drawString, enableScissor, 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:
-
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
-
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>
-