gt:           Gui.drawRect(var11, var8 - 1, var11 + 1, var8 + 1 + 
context: package co.uk.hexeption.opiates.utils;
  
  import org.lwjgl.opengl.GL11;
  
  import net.minecraft.client.gui.FontRenderer;
  import net.minecraft.client.gui.Gui;
  import net.minecraft.client.gui.GuiScreen;
  import net.minecraft.client.renderer.Tessellator;
  import net.minecraft.client.renderer.VertexBuffer;
  import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
  import net.minecraft.util.ChatAllowedCharacters;
  
  public class GuiPasswordField
    extends Gui
  {
    private final FontRenderer field_146211_a;
    private final int field_146209_f;
    private final int field_146210_g;
    private final int field_146218_h;
    private final int field_146219_i;
    private String field_146216_j = "";
    private int field_146217_k = 32;
    private int field_146214_l;
    private boolean field_146215_m = true;
    private boolean field_146212_n = true;
    private boolean field_146213_o;
    private boolean field_146226_p = true;
    private int field_146225_q;
    private int field_146224_r;
    private int field_146223_s;
    private int field_146222_t = 14737632;
    private int field_146221_u = 7368816;
    private boolean field_146220_v = true;
    
    public GuiPasswordField(FontRenderer par1FontRenderer, int par2, int par3, int par4, int par5)
    {
      this.field_146211_a = par1FontRenderer;
      this.field_146209_f = par2;
      this.field_146210_g = par3;
      this.field_146218_h = par4;
      this.field_146219_i = par5;
    }
    
    public void updateCursorCounter()
    {
      this.field_146214_l += 1;
    }
    
    public void setText(String p_146180_1_)
    {
      if (p_146180_1_.length() > this.field_146217_k) {
        this.field_146216_j = p_146180_1_.substring(0, this.field_146217_k);
      } else {
        this.field_146216_j = p_146180_1_;
      }
      func_146202_e();
    }
    
    public String getText()
    {
      return this.field_146216_j;
    }
    
    public String func_146207_c()
    {
      int var1 = 
        this.field_146224_r < this.field_146223_s ? this.field_146224_r : this.field_146223_s;
      int var2 = 
        this.field_146224_r < this.field_146223_s ? this.field_146223_s : this.field_146224_r;
      return this.field_146216_j.substring(var1, var2);
    }
    
    public void func_146191_b(String p_146191_1_)
    {
      String var2 = "";
      String var3 = 
        ChatAllowedCharacters.filterAllowedCharacters(p_146191_1_);
      int var4 = 
        this.field_146224_r < this.field_146223_s ? this.field_146224_r : this.field_146223_s;
      int var5 = 
        this.field_146224_r < this.field_146223_s ? this.field_146223_s : this.field_146224_r;
      int var6 = 
        this.field_146217_k - this.field_146216_j.length() - (var4 - this.field_146223_s);
      if (this.field_146216_j.length() > 0) {
        var2 = var2 + this.field_146216_j.substring(0, var4);
      }
      int var8;
      if (var6 < var3.length())
      {
        var2 = var2 + var3.substring(0, var6);
        var8 = var6;
      }
      else
      {
        var2 = var2 + var3;
        var8 = var3.length();
      }
      if ((this.field_146216_j.length() > 0) && (var5 < this.field_146216_j.length())) {
        var2 = var2 + this.field_146216_j.substring(var5);
      }
      this.field_146216_j = var2;
      func_146182_d(var4 - this.field_146223_s + var8);
    }
    
    public void func_146177_a(int p_146177_1_)
    {
      if (this.field_146216_j.length() != 0) {
        if (this.field_146223_s != this.field_146224_r) {
          func_146191_b("");
        } else {
          func_146175_b(func_146187_c(p_146177_1_) - this.field_146224_r);
        }
      }
    }
    
    public void func_146175_b(int p_146175_1_)
    {
      if (this.field_146216_j.length() != 0) {
        if (this.field_146223_s != this.field_146224_r)
        {
          func_146191_b("");
        }
        else
        {
          boolean var2 = p_146175_1_ < 0;
          int var3 = var2 ? this.field_146224_r + p_146175_1_ : this.field_146224_r;
          int var4 = var2 ? this.field_146224_r : this.field_146224_r + p_146175_1_;
          String var5 = "";
          if (var3 >= 0) {
            var5 = this.field_146216_j.substring(0, var3);
          }
          if (var4 < this.field_146216_j.length()) {
            var5 = var5 + this.field_146216_j.substring(var4);
          }
          this.field_146216_j = var5;
          if (var2) {
            func_146182_d(p_146175_1_);
          }
        }
      }
    }
    
    public int func_146187_c(int p_146187_1_)
    {
      return func_146183_a(p_146187_1_, func_146198_h());
    }
    
    public int func_146183_a(int p_146183_1_, int p_146183_2_)
    {
      return func_146197_a(p_146183_1_, func_146198_h(), true);
    }
    
    public int func_146197_a(int p_146197_1_, int p_146197_2_, boolean p_146197_3_)
    {
      int var4 = p_146197_2_;
      boolean var5 = p_146197_1_ < 0;
      int var6 = Math.abs(p_146197_1_);
      for (int var7 = 0; var7 < var6; var7++) {
        if (var5)
        {
          for (;;)
          {
            var4--;
            if ((p_146197_3_) && (var4 > 0)) {
              if (this.field_146216_j.charAt(var4 - 1) != ' ') {
                break;
              }
            }
          }
          do
          {
            var4--;
            if (var4 <= 0) {
              break;
            }
          } while (this.field_146216_j.charAt(var4 - 1) != ' ');
        }
        else
        {
          int var8 = this.field_146216_j.length();
          var4 = this.field_146216_j.indexOf(' ', var4);
          if (var4 == -1) {
            var4 = var8;
          } else {
            while ((p_146197_3_) && (var4 < var8) && 
              (this.field_146216_j.charAt(var4) == ' ')) {
              var4++;
            }
          }
        }
      }
      return var4;
    }
    
    public void func_146182_d(int p_146182_1_)
    {
      func_146190_e(this.field_146223_s + p_146182_1_);
    }
    
    public void func_146190_e(int p_146190_1_)
    {
      this.field_146224_r = p_146190_1_;
      int var2 = this.field_146216_j.length();
      if (this.field_146224_r < 0) {
        this.field_146224_r = 0;
      }
      if (this.field_146224_r > var2) {
        this.field_146224_r = var2;
      }
      func_146199_i(this.field_146224_r);
    }
    
    public void func_146196_d()
    {
      func_146190_e(0);
    }
    
    public void func_146202_e()
    {
      func_146190_e(this.field_146216_j.length());
    }
    
    public boolean textboxKeyTyped(char p_146201_1_, int p_146201_2_)
    {
      if (!this.field_146213_o) {
        return false;
      }
      switch (p_146201_1_)
      {
      case '\001': 
        func_146202_e();
        func_146199_i(0);
        return true;
      case '\003': 
        GuiScreen.setClipboardString(func_146207_c());
        return true;
      case '\026': 
        if (this.field_146226_p) {
          func_146191_b(GuiScreen.getClipboardString());
        }
        return true;
      case '\030': 
        GuiScreen.setClipboardString(func_146207_c());
        if (this.field_146226_p) {
          func_146191_b("");
        }
        return true;
      }
      switch (p_146201_2_)
      {
      case 14: 
        if (GuiScreen.isCtrlKeyDown())
        {
          if (this.field_146226_p) {
            func_146177_a(-1);
          }
        }
        else if (this.field_146226_p) {
          func_146175_b(-1);
        }
        return true;
      case 199: 
        if (GuiScreen.isShiftKeyDown()) {
          func_146199_i(0);
        } else {
          func_146196_d();
        }
        return true;
      case 203: 
        if (GuiScreen.isShiftKeyDown())
        {
          if (GuiScreen.isCtrlKeyDown()) {
            func_146199_i(func_146183_a(-1, 
              func_146186_n()));
          } else {
            func_146199_i(func_146186_n() - 1);
          }
        }
        else if (GuiScreen.isCtrlKeyDown()) {
          func_146190_e(func_146187_c(-1));
        } else {
          func_146182_d(-1);
        }
        return true;
      case 205: 
        if (GuiScreen.isShiftKeyDown())
        {
          if (GuiScreen.isCtrlKeyDown()) {
            func_146199_i(func_146183_a(1, 
              func_146186_n()));
          } else {
            func_146199_i(func_146186_n() + 1);
          }
        }
        else if (GuiScreen.isCtrlKeyDown()) {
          func_146190_e(func_146187_c(1));
        } else {
          func_146182_d(1);
        }
        return true;
      case 207: 
        if (GuiScreen.isShiftKeyDown()) {
          func_146199_i(this.field_146216_j.length());
        } else {
          func_146202_e();
        }
        return true;
      case 211: 
        if (GuiScreen.isCtrlKeyDown())
        {
          if (this.field_146226_p) {
            func_146177_a(1);
          }
        }
        else if (this.field_146226_p) {
          func_146175_b(1);
        }
        return true;
      }
      if (ChatAllowedCharacters.isAllowedCharacter(p_146201_1_))
      {
        if (this.field_146226_p) {
          func_146191_b(
            Character.toString(p_146201_1_));
        }
        return true;
      }
      return false;
    }
    
    public void mouseClicked(int p_146192_1_, int p_146192_2_, int p_146192_3_)
    {
      boolean var4 = 
        (p_146192_1_ >= this.field_146209_f) && 
        (p_146192_1_ < this.field_146209_f + this.field_146218_h) && 
        (p_146192_2_ >= this.field_146210_g) && (
        p_146192_2_ < this.field_146210_g + this.field_146219_i);
      if (this.field_146212_n) {
        setFocused(var4);
      }
      if ((this.field_146213_o) && (p_146192_3_ == 0))
      {
        int var5 = p_146192_1_ - this.field_146209_f;
        if (this.field_146215_m) {
          var5 -= 4;
        }
        String var6 = 
          this.field_146211_a.trimStringToWidth(
          this.field_146216_j.substring(this.field_146225_q), func_146200_o());
        func_146190_e(this.field_146211_a.trimStringToWidth(var6, var5).length() + 
          this.field_146225_q);
      }
    }
    
    public void drawTextBox()
    {
      if (func_146176_q())
      {
        if (func_146181_i())
        {
          drawRect(this.field_146209_f - 1, this.field_146210_g - 1, this.field_146209_f + 
            this.field_146218_h + 1, this.field_146210_g + this.field_146219_i + 1, 
            -6250336);
          drawRect(this.field_146209_f, this.field_146210_g, this.field_146209_f + 
            this.field_146218_h, this.field_146210_g + this.field_146219_i, 
            -16777216);
        }
        int var1 = this.field_146226_p ? this.field_146222_t : this.field_146221_u;
        int var2 = this.field_146224_r - this.field_146225_q;
        int var3 = this.field_146223_s - this.field_146225_q;
        String var4 = 
          this.field_146211_a.trimStringToWidth(
          this.field_146216_j.substring(this.field_146225_q), func_146200_o());
        boolean var5 = (var2 >= 0) && (var2 <= var4.length());
        boolean var6 = 
          (this.field_146213_o) && (this.field_146214_l / 6 % 2 == 0) && (var5);
        int var7 = this.field_146215_m ? this.field_146209_f + 4 : this.field_146209_f;
        int var8 = 
          this.field_146215_m ? this.field_146210_g + (this.field_146219_i - 8) / 2 : 
          this.field_146210_g;
        int var9 = var7;
        if (var3 > var4.length()) {
          var3 = var4.length();
        }
        if (var4.length() > 0)
        {
          String var10 = var5 ? var4.substring(0, var2) : var4;
          String stars = "";
          for (int i = 0; i < var10.length(); i++) {
            stars = stars.concat("*");
          }
          var9 = 
          
            this.field_146211_a.drawString(stars, var7, var8, var1);
        }
        boolean var13 = 
          (this.field_146224_r < this.field_146216_j.length()) || (
          this.field_146216_j.length() >= func_146208_g());
        int var11 = var9;
        if (!var5)
        {
          var11 = var2 > 0 ? var7 + this.field_146218_h : var7;
        }
        else if (var13)
        {
          var11 = var9 - 1;
          var9--;
        }
        if ((var4.length() > 0) && (var5) && (var2 < var4.length()))
        {
          String stars = "";
          for (int i = 0; i < var4.substring(var2).length(); i++) {
            stars = stars.concat("*");
          }
          this.field_146211_a.drawString(stars, var9, var8, var1);
        }
        if (var6) {
          if (var13) {
  