use of net.minecraft.client.gui.inventory.GuiContainerCreative in project Hyperium by HyperiumClient.
the class VanillaEnhancementsHud method onRenderArmor.
@InvokeEvent
public void onRenderArmor(GuiDrawScreenEvent e) {
if ((Settings.ARMOR_PROT_POTENTIONAL || Settings.ARMOR_PROJ_POTENTIONAL) && (e.getScreen() instanceof GuiInventory || e.getScreen() instanceof GuiContainerCreative)) {
ScaledResolution res = new ScaledResolution(mc);
String message = getArmorString();
mc.currentScreen.drawString(mc.fontRendererObj, message, 10, res.getScaledHeight() - 16, -1);
}
}
use of net.minecraft.client.gui.inventory.GuiContainerCreative in project Galacticraft by micdoodle8.
the class LayoutManager method onPreDraw.
@Override
public void onPreDraw(GuiContainer gui) {
if (// Reset the gui to the center of the screen, for potion effect offsets etc
!isHidden() && isEnabled() && gui instanceof InventoryEffectRenderer) {
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;
}
}
}
Aggregations