public class ShopkeeperScreen extends AbstractShopScreen
Modifier and Type | Field and Description |
---|---|
static ShopkeeperChat |
chat
The shopkeeper's dialogue.
|
static java.lang.String |
name
The shopkeeper's name.
|
allowMultiple, buyItems, buyStartIndex, floatQuantity, quantity, selectedItem, sellItems, sellStartIndex
Constructor and Description |
---|
ShopkeeperScreen(int trainerId)
Displays the shopkeeper GUI.
|
Modifier and Type | Method and Description |
---|---|
boolean |
charTyped(char key,
int keyCode) |
boolean |
isPauseScreen()
Returns true if this GUI should pause the game when it is displayed in single-player
|
boolean |
mouseClicked(double mouseX,
double mouseY,
int mouseButton) |
boolean |
mouseReleased(double mouseX,
double mouseY,
int state) |
boolean |
mouseScrolled(double mouseX,
double mouseY,
double delta) |
void |
onClose()
Closes the shop screen.
|
void |
render(com.mojang.blaze3d.matrix.MatrixStack matrix,
int mouseX,
int mouseY,
float f) |
protected void |
sendBuyPacket()
Sends a packet to the server when buying an item.
|
protected void |
sendSellPacket()
Sends a packet to the server when selling an item.
|
clickBuyMiniScreen, clickBuyScreen, isBuyMiniScreenVisible, renderBackground, renderBackground, renderBuyScreen, renderDirtBackground, renderMenu, tick
addButton, addWidget, children, getMinecraft, getNarrationMessage, getTitle, getTooltipFromItem, handleComponentClicked, hasAltDown, hasControlDown, hasShiftDown, init, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, keyPressed, onFilesDrop, removed, renderComponentHoverEffect, renderComponentTooltip, renderTooltip, renderTooltip, renderTooltip, renderToolTip, renderWrappedToolTip, resize, sendMessage, sendMessage, shouldCloseOnEsc, wrapScreenError
getFocused, isDragging, setDragging, setFocused
blit, blit, blit, blit, blit, blitOutlineBlack, drawCenteredString, drawCenteredString, drawString, drawString, fill, fillGradient, fillGradient, getBlitOffset, hLine, setBlitOffset, vLine
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static java.lang.String name
public static ShopkeeperChat chat
public ShopkeeperScreen(int trainerId)
trainerId
- The ID of the shopkeeper being interacted with.public boolean mouseScrolled(double mouseX, double mouseY, double delta)
mouseScrolled
in interface net.minecraft.client.gui.IGuiEventListener
mouseScrolled
in interface net.minecraft.client.gui.INestedGuiEventHandler
mouseScrolled
in class AbstractShopScreen
public boolean charTyped(char key, int keyCode)
public boolean mouseClicked(double mouseX, double mouseY, int mouseButton)
public boolean mouseReleased(double mouseX, double mouseY, int state)
public void onClose()
AbstractShopScreen
onClose
in class AbstractShopScreen
protected void sendBuyPacket()
AbstractShopScreen
sendBuyPacket
in class AbstractShopScreen
protected void sendSellPacket()
AbstractShopScreen
sendSellPacket
in class AbstractShopScreen
public void render(com.mojang.blaze3d.matrix.MatrixStack matrix, int mouseX, int mouseY, float f)
render
in interface net.minecraft.client.gui.IRenderable
render
in class net.minecraft.client.gui.screen.Screen
public boolean isPauseScreen()
isPauseScreen
in class AbstractShopScreen