src/main/java/codes/biscuit/skyblockaddons/listeners/RenderListener.java
/**
     * Displays the power orb display in a compact way with only the amount of seconds to the right of the icon.
     *
     *  --
     * |  | XXs
     *  --
     */
Displays the power orb display in a compact way with only the amount of seconds to the right of the icon.


Displays the power orb display in a compact way with only the amount of seconds to the right of the icon .
private void drawCompactPowerOrbStatus(Minecraft mc, float scale, ButtonLocation buttonLocation, PowerOrb powerOrb, int seconds) {
        float x = main.getConfigValues().getActualX(Feature.POWER_ORB_STATUS_DISPLAY);
        float y = main.getConfigValues().getActualY(Feature.POWER_ORB_STATUS_DISPLAY);
        String secondsString = String.format("§e%ss", seconds);
        int spacing = 1;
        int iconSize = MinecraftReflection.FontRenderer.getFontHeight() * 3; 
        int width = iconSize + spacing + MinecraftReflection.FontRenderer.getStringWidth(secondsString);
        x -= Math.round(width * scale / 2);
        y -= Math.round(iconSize * scale / 2);
        x /= scale;
        y /= scale;
        int intX = Math.round(x);
        int intY = Math.round(y);
        if (buttonLocation != null) {
            int boxXOne = intX - 4;
            int boxXTwo = intX + width + 4;
            int boxYOne = intY - 4;
            int boxYTwo = intY + iconSize + 4;
            buttonLocation.checkHoveredAndDrawBox(boxXOne, boxXTwo, boxYOne, boxYTwo, scale);
            GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        }
        GlStateManager.disableDepth();
        GlStateManager.enableBlend();
        mc.getTextureManager().bindTexture(powerOrb.resourceLocation);
        GlStateManager.color(1, 1, 1, 1F);
        Gui.drawModalRectWithCustomSizedTexture(intX, intY, 0, 0, iconSize, iconSize, iconSize, iconSize);
        GlStateManager.disableBlend();
        GlStateManager.enableDepth();
        main.getUtils().drawTextWithStyle(secondsString, intX + iconSize, intY + (iconSize / 2) - (MinecraftReflection.FontRenderer.getFontHeight() / 2), ChatFormatting.WHITE.getColor(255).getRGB());
    }
private void drawCompactPowerOrbStatus ( Minecraft mc , float scale , ButtonLocation buttonLocation , PowerOrb powerOrb , int seconds ) { float x = main . getConfigValues ( ) . getActualX ( Feature . POWER_ORB_STATUS_DISPLAY ) ; float y = main . getConfigValues ( ) . getActualY ( Feature . POWER_ORB_STATUS_DISPLAY ) ; String secondsString = String . format ( "§e%ss", econds) ; int spacing = 1 ; int iconSize = MinecraftReflection . FontRenderer . getFontHeight ( ) * 3 ; int width = iconSize + spacing + MinecraftReflection . FontRenderer . getStringWidth ( secondsString ) ; x -= Math . round ( width * scale / 2 ) ; y -= Math . round ( iconSize * scale / 2 ) ; x /= scale ; y /= scale ; int intX = Math . round ( x ) ; int intY = Math . round ( y ) ; if ( buttonLocation != null ) { int boxXOne = intX - 4 ; int boxXTwo = intX + width + 4 ; int boxYOne = intY - 4 ; int boxYTwo = intY + iconSize + 4 ; buttonLocation . checkHoveredAndDrawBox ( boxXOne , boxXTwo , boxYOne , boxYTwo , scale ) ; GlStateManager . color ( 1.0F , 1.0F , 1.0F , 1.0F ) ; } GlStateManager . disableDepth ( ) ; GlStateManager . enableBlend ( ) ; mc . getTextureManager ( ) . bindTexture ( powerOrb . resourceLocation ) ; GlStateManager . color ( 1 , 1 , 1 , 1F ) ; Gui . drawModalRectWithCustomSizedTexture ( intX , intY , 0 , 0 , iconSize , iconSize , iconSize , iconSize ) ; GlStateManager . disableBlend ( ) ; GlStateManager . enableDepth ( ) ; main . getUtils ( ) . drawTextWithStyle ( secondsString , intX + iconSize , intY + ( iconSize / 2 ) - ( MinecraftReflection . FontRenderer . getFontHeight ( ) / 2 ) , ChatFormatting . WHITE . getColor ( 255 ) . getRGB ( ) ) ; }
Displays the power orb display in a compact way with only the amount of seconds to the right of the icon.
Displays the power orb display in a compact way with only the amount of seconds to the right of the icon .
// 3 because it looked the best // iconSize also acts as height