CCBlueX Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Modern Hotbar SRC

    Off-Topic
    5
    6
    293
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ClaceMeat
      ClaceMeat last edited by ClaceMeat

      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)
      1 Reply Last reply Reply Quote 0
      • notautismatall
        notautismatall last edited by

        What does it do?

        T 1 Reply Last reply Reply Quote 0
        • T
          Teals53 @notautismatall last edited by

          @notautismatall maybe changing your hotbar style

          Marvin 1 Reply Last reply Reply Quote 1
          • Marvin
            Marvin Moderator @Teals53 last edited by

            @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

            Litely T 2 Replies Last reply Reply Quote 0
            • Litely
              Litely @Marvin last edited by

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

              1 Reply Last reply Reply Quote 0
              • T
                Teals53 @Marvin last edited by

                @Marvin ??

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                About
                • Terms of Service
                • Privacy Policy
                • Status
                • Contact Us
                Downloads
                • Releases
                • Source code
                • License
                Docs
                • Tutorials
                • CustomHUD
                • AutoSettings
                • ScriptAPI
                Community
                • Forum
                • Guilded
                • YouTube
                • Twitter
                • D.Tube