public class GuiContainerManager
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.util.LinkedList<IContainerDrawHandler> |
drawHandlers |
static RenderItem |
drawItems |
static java.util.LinkedList<IContainerInputHandler> |
inputHandlers |
static java.util.LinkedList<IContainerObjectHandler> |
objectHandlers |
static java.util.LinkedList<IContainerSlotClickHandler> |
slotClickHandlers |
static java.util.LinkedList<IContainerTooltipHandler> |
tooltipHandlers |
net.minecraft.client.gui.inventory.GuiContainer |
window |
| Constructor and Description |
|---|
GuiContainerManager(net.minecraft.client.gui.inventory.GuiContainer screen) |
| Modifier and Type | Method and Description |
|---|---|
static void |
addDrawHandler(IContainerDrawHandler handler)
Register a new Drawing handler;
|
static void |
addInputHandler(IContainerInputHandler handler)
Register a new Input handler;
|
static void |
addObjectHandler(IContainerObjectHandler handler)
Register a new Object handler;
|
static void |
addSlotClickHandler(IContainerSlotClickHandler handler)
Care needs to be taken with this method.
|
static void |
addTooltipHandler(IContainerTooltipHandler handler)
Register a new Tooltip render handler;
|
static boolean |
checkMatrixStack() |
static java.lang.String |
concatenatedDisplayName(ItemStack itemstack,
boolean includeHandlers)
Concatenates the multiline display name into one line for easy searching using string and
Pattern functions. |
static void |
disableMatrixStackLogging() |
static void |
drawItem(int i,
int j,
ItemStack itemstack) |
static void |
drawItem(int i,
int j,
ItemStack itemstack,
FontRenderer fontRenderer) |
void |
drawSlotItem(Slot slot,
ItemStack stack,
int x,
int y,
java.lang.String quantity)
Delegate for changing item rendering for certain slots.
|
static void |
enable2DRender() |
static void |
enable3DRender() |
static void |
enableMatrixStackLogging() |
boolean |
firstKeyTyped(char keyChar,
int keyID) |
static FontRenderer |
getFontRenderer(ItemStack stack) |
static GuiContainerManager |
getManager() |
static GuiContainerManager |
getManager(net.minecraft.client.gui.inventory.GuiContainer gui) |
static Slot |
getSlotMouseOver(net.minecraft.client.gui.inventory.GuiContainer window) |
static ItemStack |
getStackMouseOver(net.minecraft.client.gui.inventory.GuiContainer window) |
void |
handleKeyboardInput() |
void |
handleMouseClick(Slot slot,
int slotIndex,
int button,
int modifier) |
void |
handleMouseWheel()
Called from handleMouseInput
|
void |
handleSlotClick(int slotIndex,
int button,
int modifiers)
Implementation for handleMouseClick
|
static java.util.List<java.lang.String> |
itemDisplayNameMultiline(ItemStack stack,
net.minecraft.client.gui.inventory.GuiContainer gui,
boolean includeHandlers)
Extra lines are often used for more information.
|
static java.lang.String |
itemDisplayNameShort(ItemStack itemstack)
The general name of this item.
|
void |
keyTyped(char c,
int k) |
boolean |
lastKeyTyped(int keyID,
char keyChar)
Override for keyTyped
|
void |
load() |
boolean |
mouseClicked(int mousex,
int mousey,
int button) |
void |
mouseDragged(int mousex,
int mousey,
int button,
long heldTime)
Called from mouseClickMove
|
void |
mouseScrolled(int scrolled) |
void |
mouseUp(int mousex,
int mousey,
int button) |
boolean |
objectUnderMouse(int mousex,
int mousey)
Returns true if there is an object of yours obscuring the slot that the mouse would otherwise be hovering over.
|
boolean |
overrideMouseUp(int mousex,
int mousey,
int button)
Override for mouseMovedOrUp
|
void |
preDraw()
Called at the start of drawScreen
|
void |
renderObjects(int mousex,
int mousey) |
void |
renderSlotOverlay(Slot slot) |
void |
renderSlotUnderlay(Slot slot) |
void |
renderToolTips(int mousex,
int mousey) |
static void |
restoreMatrixStack() |
static void |
setColouredItemRender(boolean enable) |
static boolean |
shouldShowTooltip(net.minecraft.client.gui.inventory.GuiContainer window) |
void |
updateScreen()
Called from updateScreen
|
public net.minecraft.client.gui.inventory.GuiContainer window
public static RenderItem drawItems
public static final java.util.LinkedList<IContainerTooltipHandler> tooltipHandlers
public static final java.util.LinkedList<IContainerInputHandler> inputHandlers
public static final java.util.LinkedList<IContainerDrawHandler> drawHandlers
public static final java.util.LinkedList<IContainerObjectHandler> objectHandlers
public static final java.util.LinkedList<IContainerSlotClickHandler> slotClickHandlers
public GuiContainerManager(net.minecraft.client.gui.inventory.GuiContainer screen)
public static GuiContainerManager getManager()
public static GuiContainerManager getManager(net.minecraft.client.gui.inventory.GuiContainer gui)
public static void addTooltipHandler(IContainerTooltipHandler handler)
handler - The handler to registerpublic static void addInputHandler(IContainerInputHandler handler)
handler - The handler to registerpublic static void addDrawHandler(IContainerDrawHandler handler)
handler - The handler to registerpublic static void addObjectHandler(IContainerObjectHandler handler)
handler - The handler to registerpublic static void addSlotClickHandler(IContainerSlotClickHandler handler)
handler - The handler to register.public static FontRenderer getFontRenderer(ItemStack stack)
public static java.util.List<java.lang.String> itemDisplayNameMultiline(ItemStack stack,
net.minecraft.client.gui.inventory.GuiContainer gui,
boolean includeHandlers)
stack - The item to get the name for.gui - An instance of the currentscreen passed to tooltip handlers. If null, only gui inspecific handlers should respondincludeHandlers - If true tooltip handlers will add to the item tippublic static java.lang.String itemDisplayNameShort(ItemStack itemstack)
itemstack - The ItemStack to get the name for.public static java.lang.String concatenatedDisplayName(ItemStack itemstack,
boolean includeHandlers)
Pattern functions.itemstack - The stack to get the name forpublic static void drawItem(int i,
int j,
ItemStack itemstack)
public static void drawItem(int i,
int j,
ItemStack itemstack,
FontRenderer fontRenderer)
public static void enableMatrixStackLogging()
public static void disableMatrixStackLogging()
public static boolean checkMatrixStack()
public static void restoreMatrixStack()
public static void setColouredItemRender(boolean enable)
public static void enable3DRender()
public static void enable2DRender()
public static ItemStack getStackMouseOver(net.minecraft.client.gui.inventory.GuiContainer window)
public static Slot getSlotMouseOver(net.minecraft.client.gui.inventory.GuiContainer window)
public void load()
public void updateScreen()
public boolean lastKeyTyped(int keyID,
char keyChar)
public boolean firstKeyTyped(char keyChar,
int keyID)
public boolean mouseClicked(int mousex,
int mousey,
int button)
public void mouseScrolled(int scrolled)
public boolean overrideMouseUp(int mousex,
int mousey,
int button)
public void mouseUp(int mousex,
int mousey,
int button)
public void mouseDragged(int mousex,
int mousey,
int button,
long heldTime)
public void preDraw()
public void renderObjects(int mousex,
int mousey)
public void renderToolTips(int mousex,
int mousey)
public static boolean shouldShowTooltip(net.minecraft.client.gui.inventory.GuiContainer window)
public void renderSlotUnderlay(Slot slot)
public void renderSlotOverlay(Slot slot)
public boolean objectUnderMouse(int mousex,
int mousey)
public void handleMouseClick(Slot slot,
int slotIndex,
int button,
int modifier)
public void handleKeyboardInput()
public void keyTyped(char c,
int k)
public void drawSlotItem(Slot slot,
ItemStack stack,
int x,
int y,
java.lang.String quantity)
public void handleSlotClick(int slotIndex,
int button,
int modifiers)
public void handleMouseWheel()