Class MerchantScreen
- java.lang.Object
-
- net.minecraft.client.gui.AbstractGui
-
- net.minecraft.client.gui.FocusableGui
-
- net.minecraft.client.gui.screen.Screen
-
- net.minecraft.client.gui.screen.inventory.ContainerScreen<MerchantContainer>
-
- net.minecraft.client.gui.screen.inventory.MerchantScreen
-
- All Implemented Interfaces:
IGuiEventListener,IHasContainer<MerchantContainer>,INestedGuiEventHandler,IRenderable,IScreen
public class MerchantScreen extends ContainerScreen<MerchantContainer>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) classMerchantScreen.TradeButton
-
Field Summary
Fields Modifier and Type Field Description private static ITextComponentDEPRECATED_TOOLTIPprivate booleanisDraggingprivate static ITextComponentLEVEL_SEPARATORprivate intscrollOffprivate intshopItemprivate MerchantScreen.TradeButton[]tradeOfferButtonsprivate static ITextComponentTRADES_LABELprivate static ResourceLocationVILLAGER_LOCATION-
Fields inherited from class net.minecraft.client.gui.screen.inventory.ContainerScreen
hoveredSlot, imageHeight, imageWidth, inventory, INVENTORY_LOCATION, inventoryLabelX, inventoryLabelY, isQuickCrafting, leftPos, menu, quickCraftSlots, slotColor, titleLabelX, titleLabelY, topPos
-
Fields inherited from class net.minecraft.client.gui.screen.Screen
buttons, children, font, height, itemRenderer, minecraft, passEvents, title, width
-
Fields inherited from class net.minecraft.client.gui.AbstractGui
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION
-
-
Constructor Summary
Constructors Constructor Description MerchantScreen(MerchantContainer p_i51080_1_, PlayerInventory p_i51080_2_, ITextComponent p_i51080_3_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private booleancanScroll(int p_214135_1_)protected voidinit()booleanmouseClicked(double p_231044_1_, double p_231044_3_, int p_231044_5_)booleanmouseDragged(double p_231045_1_, double p_231045_3_, int p_231045_5_, double p_231045_6_, double p_231045_8_)booleanmouseScrolled(double p_231043_1_, double p_231043_3_, double p_231043_5_)private voidpostButtonClick()voidrender(MatrixStack p_230430_1_, int p_230430_2_, int p_230430_3_, float p_230430_4_)private voidrenderAndDecorateCostA(MatrixStack p_238841_1_, ItemStack p_238841_2_, ItemStack p_238841_3_, int p_238841_4_, int p_238841_5_)protected voidrenderBg(MatrixStack p_230450_1_, float p_230450_2_, int p_230450_3_, int p_230450_4_)private voidrenderButtonArrows(MatrixStack p_238842_1_, MerchantOffer p_238842_2_, int p_238842_3_, int p_238842_4_)protected voidrenderLabels(MatrixStack p_230451_1_, int p_230451_2_, int p_230451_3_)private voidrenderProgressBar(MatrixStack p_238839_1_, int p_238839_2_, int p_238839_3_, MerchantOffer p_238839_4_)private voidrenderScroller(MatrixStack p_238840_1_, int p_238840_2_, int p_238840_3_, MerchantOffers p_238840_4_)-
Methods inherited from class net.minecraft.client.gui.screen.inventory.ContainerScreen
checkHotbarKeyPressed, getGuiLeft, getGuiTop, getMenu, getSlotColor, getSlotUnderMouse, getXSize, getYSize, hasClickedOutside, isHovering, isPauseScreen, keyPressed, mouseReleased, onClose, removed, renderTooltip, slotClicked, tick
-
Methods inherited from class net.minecraft.client.gui.screen.Screen
addButton, addWidget, children, getMinecraft, getNarrationMessage, getTitle, getTooltipFromItem, handleComponentClicked, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, onFilesDrop, renderBackground, renderBackground, renderComponentHoverEffect, renderComponentTooltip, renderDirtBackground, renderTooltip, renderTooltip, renderTooltip, renderToolTip, renderWrappedToolTip, resize, sendMessage, sendMessage, shouldCloseOnEsc, wrapScreenError
-
Methods inherited from class net.minecraft.client.gui.FocusableGui
getFocused, isDragging, setDragging, setFocused
-
Methods inherited from class net.minecraft.client.gui.AbstractGui
blit, blit, blit, blit, blit, blitOutlineBlack, drawCenteredString, drawCenteredString, drawString, drawString, fill, 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.IGuiEventListener
mouseMoved
-
Methods inherited from interface net.minecraft.client.gui.INestedGuiEventHandler
changeFocus, charTyped, getChildAt, keyReleased, magicalSpecialHackyFocus, setInitialFocus
-
-
-
-
Field Detail
-
VILLAGER_LOCATION
private static final ResourceLocation VILLAGER_LOCATION
-
TRADES_LABEL
private static final ITextComponent TRADES_LABEL
-
LEVEL_SEPARATOR
private static final ITextComponent LEVEL_SEPARATOR
-
DEPRECATED_TOOLTIP
private static final ITextComponent DEPRECATED_TOOLTIP
-
shopItem
private int shopItem
-
tradeOfferButtons
private final MerchantScreen.TradeButton[] tradeOfferButtons
-
scrollOff
private int scrollOff
-
isDragging
private boolean isDragging
-
-
Constructor Detail
-
MerchantScreen
public MerchantScreen(MerchantContainer p_i51080_1_, PlayerInventory p_i51080_2_, ITextComponent p_i51080_3_)
-
-
Method Detail
-
postButtonClick
private void postButtonClick()
-
init
protected void init()
- Overrides:
initin classContainerScreen<MerchantContainer>
-
renderLabels
protected void renderLabels(MatrixStack p_230451_1_, int p_230451_2_, int p_230451_3_)
- Overrides:
renderLabelsin classContainerScreen<MerchantContainer>
-
renderBg
protected void renderBg(MatrixStack p_230450_1_, float p_230450_2_, int p_230450_3_, int p_230450_4_)
- Specified by:
renderBgin classContainerScreen<MerchantContainer>
-
renderProgressBar
private void renderProgressBar(MatrixStack p_238839_1_, int p_238839_2_, int p_238839_3_, MerchantOffer p_238839_4_)
-
renderScroller
private void renderScroller(MatrixStack p_238840_1_, int p_238840_2_, int p_238840_3_, MerchantOffers p_238840_4_)
-
render
public void render(MatrixStack p_230430_1_, int p_230430_2_, int p_230430_3_, float p_230430_4_)
- Specified by:
renderin interfaceIRenderable- Overrides:
renderin classContainerScreen<MerchantContainer>
-
renderButtonArrows
private void renderButtonArrows(MatrixStack p_238842_1_, MerchantOffer p_238842_2_, int p_238842_3_, int p_238842_4_)
-
renderAndDecorateCostA
private void renderAndDecorateCostA(MatrixStack p_238841_1_, ItemStack p_238841_2_, ItemStack p_238841_3_, int p_238841_4_, int p_238841_5_)
-
canScroll
private boolean canScroll(int p_214135_1_)
-
mouseScrolled
public boolean mouseScrolled(double p_231043_1_, double p_231043_3_, double p_231043_5_)
-
mouseDragged
public boolean mouseDragged(double p_231045_1_, double p_231045_3_, int p_231045_5_, double p_231045_6_, double p_231045_8_)- Specified by:
mouseDraggedin interfaceIGuiEventListener- Specified by:
mouseDraggedin interfaceINestedGuiEventHandler- Overrides:
mouseDraggedin classContainerScreen<MerchantContainer>
-
mouseClicked
public boolean mouseClicked(double p_231044_1_, double p_231044_3_, int p_231044_5_)- Specified by:
mouseClickedin interfaceIGuiEventListener- Specified by:
mouseClickedin interfaceINestedGuiEventHandler- Overrides:
mouseClickedin classContainerScreen<MerchantContainer>
-
-