Modern Hotbar SRC



  • Hello,

    Today's publication I a modern hotbar for all skids among you.
    There are 2 modes - 1x wide & 1x compact.

    In both modes, no strings have been added, instead this is conceivable.

    Tutorial:

    1. Opens the class "GuiIngame.java"
      (Eclipse: CTRL + SHIFT + R / IntelliJ: CTRL + N)

    2. Navigates to the "func_180479_a" function
      (for those with better mappings it should be possible to consult the mappings (.xml file))

    width Hotbar

    Code:
    
    ScaledResolution s = new ScaledResolution(Wrapper.mc, Wrapper.mc.displayWidth, Wrapper.mc.displayHeight);
    RenderUtils.drawOldRect(0, s.getScaledHeight() - 23, s.getScaledWidth(), s.getScaledHeight(), new Color(0, 0, 0, 180).hashCode());
    
    if (Wrapper.mc.thePlayer.inventory.currentItem == 0) {
        RenderUtils.drawOldRect((s.getScaledWidth() / 2) - 91 + Wrapper.mc.thePlayer.inventory.currentItem * 20, s.getScaledHeight() - 23, (s.getScaledWidth() / 2) + 91 - 20 * 8, s.getScaledHeight(), -1);
    } else {
        RenderUtils.drawOldRect((s.getScaledWidth() / 2) - 91 + Wrapper.mc.thePlayer.inventory.currentItem * 20, s.getScaledHeight() - 23, (s.getScaledWidth() / 2) + 91 - 20 * (8 - Wrapper.mc.thePlayer.inventory.currentItem), s.getScaledHeight(), -1);
    }
    
    EntityPlayer var3 = (EntityPlayer) this.mc.func_175606_aa();
    RenderHelper.enableGUIStandardItemLighting();
    
    for (int var6 = 0; var6 < 9; ++var6) {
        int var7 = p_180479_1_.getScaledWidth() / 2 - 90 + var6 * 20 + 2;
        int var8 = p_180479_1_.getScaledHeight() - 16 - 3;
        this.func_175184_a(var6, var7, var8, p_180479_2_, var3);
    }
    
    RenderHelper.disableStandardItemLighting();
    GlStateManager.disableRescaleNormal();
    GlStateManager.disableBlend();
    
    

    Smal Hotbar

    ScaledResolution s = new ScaledResolution(Wrapper.mc, Wrapper.mc.displayWidth, Wrapper.mc.displayHeight);
    RenderUtils.drawOldRect((s.getScaledWidth() / 2) - 91, s.getScaledHeight() - 23, (s.getScaledWidth() / 2) + 91, s.getScaledHeight(), new Color(0, 0, 0, 180).hashCode());
    
    if (Wrapper.mc.thePlayer.inventory.currentItem == 0) {
        RenderUtils.drawOldRect((s.getScaledWidth() / 2) - 91 + Wrapper.mc.thePlayer.inventory.currentItem * 20, s.getScaledHeight() - 23, (s.getScaledWidth() / 2) + 91 - 20 * 8, s.getScaledHeight(), -1);
    } else {
        RenderUtils.drawOldRect((s.getScaledWidth() / 2) - 91 + Wrapper.mc.thePlayer.inventory.currentItem * 20, s.getScaledHeight() - 23, (s.getScaledWidth() / 2) + 91 - 20 * (8 - Wrapper.mc.thePlayer.inventory.currentItem), s.getScaledHeight(), -1);
    }
    
    EntityPlayer var3 = (EntityPlayer) this.mc.func_175606_aa();
    RenderHelper.enableGUIStandardItemLighting();
    
    for (int var6 = 0; var6 < 9; ++var6) {
        int var7 = p_180479_1_.getScaledWidth() / 2 - 90 + var6 * 20 + 2;
        int var8 = p_180479_1_.getScaledHeight() - 16 - 3;
        this.func_175184_a(var6, var7, var8, p_180479_2_, var3);
    }
    
    RenderHelper.disableStandardItemLighting();
    GlStateManager.disableRescaleNormal();
    GlStateManager.disableBlend();
    

    3.Replaces the code with the code from the respective spoiler
    (save the original code; would recommend a SettingsManager to be able to switch between designs if necessary)

    1. Starts the client and checks that everything is working properly.
      (Hot swap possible with existing session, but without guarantee)


  • What does it do?



  • @notautismatall maybe changing your hotbar style


  • Moderator

    @Teals53 said in Modern Hotbar SRC:

    @notautismatall maybe changing your hotbar style

    no shit sherlock, but they probably wanted a screenshot of what exactly the hotbar will look like



  • no shit sherlock, but they probably wanted a screenshot of what exactly the hotbar will look like



  • @Marvin ??


Log in to reply