public class GuiMerchant extends GuiContainer
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
GuiMerchant.MerchantButton |
| Modifier and Type | Field and Description |
|---|---|
private IChatComponent |
chatComponent
The chat component utilized by this GuiMerchant instance.
|
private static org.apache.logging.log4j.Logger |
logger |
private IMerchant |
merchant
The current IMerchant instance in use for this specific merchant.
|
private static ResourceLocation |
MERCHANT_GUI_TEXTURE
The GUI texture for the villager merchant GUI.
|
private GuiMerchant.MerchantButton |
nextButton
The button which proceeds to the next available merchant recipe.
|
private GuiMerchant.MerchantButton |
previousButton
Returns to the previous Merchant recipe if one is applicable.
|
private int |
selectedMerchantRecipe
The integer value corresponding to the currently selected merchant recipe.
|
dragSplitting, dragSplittingSlots, guiLeft, guiTop, inventoryBackground, inventorySlots, xSize, ySizeallowUserInput, buttonList, fontRendererObj, height, itemRender, labelList, mc, widthicons, optionsBackground, statIcons, zLevel| Constructor and Description |
|---|
GuiMerchant(InventoryPlayer p_i45500_1_,
IMerchant p_i45500_2_,
World worldIn) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
actionPerformed(GuiButton button)
Called by the controls from the buttonList when activated.
|
protected void |
drawGuiContainerBackgroundLayer(float partialTicks,
int mouseX,
int mouseY)
Args : renderPartialTicks, mouseX, mouseY
|
protected void |
drawGuiContainerForegroundLayer(int mouseX,
int mouseY)
Draw the foreground layer for the GuiContainer (everything in front of the items).
|
void |
drawScreen(int mouseX,
int mouseY,
float partialTicks)
Draws the screen and all the components in it.
|
IMerchant |
getMerchant() |
void |
initGui()
Adds the buttons (and other controls) to the screen in question.
|
void |
updateScreen()
Called from the main game loop to update the screen.
|
checkHotbarKeys, doesGuiPauseGame, handleMouseClick, isPointInRegion, keyTyped, mouseClicked, mouseClickMove, mouseReleased, onGuiClosedconfirmClicked, drawBackground, drawCreativeTabHoveringText, drawDefaultBackground, drawHoveringText, drawWorldBackground, getClipboardString, handleComponentClick, handleComponentHover, handleInput, handleKeyboardInput, handleMouseInput, isAltKeyDown, isCtrlKeyDown, isKeyComboCtrlA, isKeyComboCtrlC, isKeyComboCtrlV, isKeyComboCtrlX, isShiftKeyDown, onResize, renderToolTip, sendChatMessage, sendChatMessage, setClipboardString, setText, setWorldAndResolutiondrawCenteredString, drawGradientRect, drawHorizontalLine, drawModalRectWithCustomSizedTexture, drawRect, drawScaledCustomSizeModalRect, drawString, drawTexturedModalRect, drawTexturedModalRect, drawTexturedModalRect, drawVerticalLineprivate static final org.apache.logging.log4j.Logger logger
private static final ResourceLocation MERCHANT_GUI_TEXTURE
private IMerchant merchant
private GuiMerchant.MerchantButton nextButton
private GuiMerchant.MerchantButton previousButton
private int selectedMerchantRecipe
private IChatComponent chatComponent
public GuiMerchant(InventoryPlayer p_i45500_1_, IMerchant p_i45500_2_, World worldIn)
public void initGui()
initGui in class GuiContainerprotected void drawGuiContainerForegroundLayer(int mouseX,
int mouseY)
drawGuiContainerForegroundLayer in class GuiContainerpublic void updateScreen()
updateScreen in class GuiContainerprotected void actionPerformed(GuiButton button) throws java.io.IOException
actionPerformed in class GuiScreenjava.io.IOExceptionprotected void drawGuiContainerBackgroundLayer(float partialTicks,
int mouseX,
int mouseY)
drawGuiContainerBackgroundLayer in class GuiContainerpublic void drawScreen(int mouseX,
int mouseY,
float partialTicks)
drawScreen in class GuiContainerpublic IMerchant getMerchant()