Package net.minecraft.src

Examples of net.minecraft.src.InvTweaksObfuscation


      }
      else {
            this.drawString(minecraft.fontRenderer, this.displayString, this.xPosition, this.yPosition + (this.height - 8) / 2, 0x999999);
      }
       
        InvTweaksObfuscation obf = new InvTweaksObfuscation(minecraft);
       
        if (tooltipLines != null) {
            // Compute hover time
            if (isMouseOverButton(i, j)) {
                long systemTime = System.currentTimeMillis();
                if (prevSystemTime != 0) {
                    hoverTime += systemTime - prevSystemTime;
                }
                prevSystemTime = systemTime;
            }
            else {
                hoverTime = 0;
                prevSystemTime = 0;
            }
           
            // Draw tooltip if hover time is long enough
            if (hoverTime > InvTweaksConst.TOOLTIP_DELAY && tooltipLines != null) {
               
                FontRenderer fontRenderer = obf.getFontRenderer();

                // Compute tooltip params
                int x = i + 12, y = j - LINE_HEIGHT*tooltipLines.length;
                if (tooltipWidth == -1) {
                    for (String line : tooltipLines) {
                        tooltipWidth = Math.max(
                                obf.getStringWidth(fontRenderer, line),
                                tooltipWidth);
                    }
                }
                if (x + tooltipWidth > obf.getWindowWidth(obf.getCurrentScreen())) {
                    x = obf.getWindowWidth(obf.getCurrentScreen()) - tooltipWidth;
                }
               
                // Draw background
                drawGradientRect(x - 3, y - 3,
                        x + tooltipWidth + 3, y + LINE_HEIGHT*tooltipLines.length,
                        0xc0000000, 0xc0000000);
               
                // Draw lines
                int lineCount = 0;
                for (String line : tooltipLines) {
                    obf.drawStringWithShadow(fontRenderer,
                            line, x, y + (lineCount++)*LINE_HEIGHT, -1);
                }
            }
        }

View Full Code Here


    public void drawButton(Minecraft minecraft, int i, int j) {
      super.drawButton(minecraft, i, j);

        // Display string
        InvTweaksObfuscation obf = new InvTweaksObfuscation(minecraft);
        drawCenteredString(obf.getFontRenderer(),
                getDisplayString(),
                getXPosition() + 5,
                getYPosition() - 1,
                getTextColor(i, j));
    }
View Full Code Here

    /**
     * Displays inventory settings GUI
     */
    public boolean mousePressed(Minecraft minecraft, int i, int j) {
       
        InvTweaksObfuscation obf = new InvTweaksObfuscation(minecraft);
        InvTweaksConfig config = cfgManager.getConfig();
       
        if (super.mousePressed(minecraft, i, j)) {
            // Put hold item down if necessary
            InvTweaksContainerSectionManager containerMgr;
           
            try {
                containerMgr = new InvTweaksContainerSectionManager(
                        minecraft, InvTweaksContainerSection.INVENTORY);
                if (obf.getHeldStack() != null) {
                    try {
                        // Put hold item down
                        for (int k = containerMgr.getSize() - 1; k >= 0; k--) {
                            if (containerMgr.getItemStack(k) == null) {
                                containerMgr.leftClick(k);
                                break;
                            }
                        }
                    } catch (TimeoutException e) {
                        InvTweaks.logInGameErrorStatic("invtweaks.sort.releaseitem.error", e);
                    }
                }
            } catch (Exception e) {
              log.severe(e.getMessage());
            }
           
            // Refresh config
            cfgManager.makeSureConfigurationIsLoaded();

            // Display menu
            obf.displayGuiScreen(new InvTweaksGuiSettings(minecraft, obf.getCurrentScreen(), config));
            return true;
        } else {
            return false;
        }
    }
View Full Code Here

      ON = ": " + InvTweaksLocalization.get("invtweaks.settings.on");
      OFF = ": " + InvTweaksLocalization.get("invtweaks.settings.off");
      DISABLE_CI = ": " + InvTweaksLocalization.get("invtweaks.settings.disableci");
     
        this.mc = mc;
        this.obf = new InvTweaksObfuscation(mc);
        this.parentScreen = parentScreen;
        this.config = config;
    }
View Full Code Here

    private GuiScreen parentScreen;
    private InvTweaksConfig config;
   
    public InvTweaksGuiShortcutsHelp(Minecraft mc,
        GuiScreen parentScreen, InvTweaksConfig config) {
        this.obf = new InvTweaksObfuscation(mc);
        this.parentScreen = parentScreen;
        this.config = config;
    }
View Full Code Here

TOP

Related Classes of net.minecraft.src.InvTweaksObfuscation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.