net.minecraft.client.renderer.InventoryEffectRenderer Java Examples

The following examples show how to use net.minecraft.client.renderer.InventoryEffectRenderer. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: LayoutManager.java    From NotEnoughItems with MIT License 5 votes vote down vote up
@Override
public void onPreDraw(GuiContainer gui) {
    if (!isHidden() && isEnabled() && gui instanceof InventoryEffectRenderer)//Reset the gui to the center of the screen, for potion effect offsets etc
    {
        gui.guiLeft = (gui.width - gui.xSize) / 2;
        gui.guiTop = (gui.height - gui.ySize) / 2;

        if (gui instanceof GuiContainerCreative && gui.buttonList.size() >= 2) {
            GuiButton button1 = (GuiButton) gui.buttonList.get(0);
            GuiButton button2 = (GuiButton) gui.buttonList.get(1);
            button1.xPosition = gui.guiLeft;
            button2.xPosition = gui.guiLeft + gui.xSize - 20;
        }
    }
}
 
Example #2
Source File: HyperiumInventoryEffectRenderer.java    From Hyperium with GNU Lesser General Public License v3.0 4 votes vote down vote up
public HyperiumInventoryEffectRenderer(InventoryEffectRenderer parent) {
    this.parent = parent;
}