Java 类net.minecraft.client.mco.McoServer 实例源码

项目:Resilience-Client-Source    文件:GuiScreenOnlineServers.java   
public void func_146688_g()
{
    this.buttonList.add(this.field_146710_z = new GuiButton(1, this.width / 2 - 154, this.height - 52, 100, 20, I18n.format("mco.selectServer.play", new Object[0])));
    String var1 = this.field_146694_D > 0 ? I18n.format("mco.selectServer.create", new Object[0]) : I18n.format("mco.selectServer.buy", new Object[0]);
    this.buttonList.add(this.field_146712_x = new GuiButton(2, this.width / 2 - 48, this.height - 52, 100, 20, var1));
    this.buttonList.add(this.field_146704_w = new GuiButton(3, this.width / 2 + 58, this.height - 52, 100, 20, I18n.format("mco.selectServer.configure", new Object[0])));
    this.buttonList.add(this.field_146711_y = new GuiButtonLink(4, this.width / 2 - 154, this.height - 28, 154, 20, I18n.format("mco.selectServer.moreinfo", new Object[0])));
    this.buttonList.add(new GuiButton(0, this.width / 2 + 6, this.height - 28, 153, 20, I18n.format("gui.cancel", new Object[0])));
    McoServer var2 = this.func_146691_a(this.field_146705_v);
    this.field_146710_z.enabled = var2 != null && var2.field_148808_d.equals(McoServer.State.OPEN.name()) && !var2.field_148819_h;
    this.field_146704_w.enabled = var2 != null && !var2.field_148808_d.equals(McoServer.State.ADMIN_LOCK.name());

    if (var2 != null && !var2.field_148809_e.equals(this.mc.getSession().getUsername()))
    {
        this.field_146704_w.displayString = I18n.format("mco.selectServer.leave", new Object[0]);
    }
}
项目:Resilience-Client-Source    文件:GuiScreenOnlineServers.java   
private void func_146667_u()
{
    McoServer var1 = this.func_146691_a(this.field_146705_v);

    if (var1 != null)
    {
        if (this.mc.getSession().getUsername().equals(var1.field_148809_e))
        {
            McoServer var2 = this.func_146677_c(var1.field_148812_a);

            if (var2 != null)
            {
                this.func_146669_s();
                this.mc.displayGuiScreen(new GuiScreenConfigureWorld(this, var2));
            }
        }
        else
        {
            String var4 = I18n.format("mco.configure.world.leave.question.line1", new Object[0]);
            String var3 = I18n.format("mco.configure.world.leave.question.line2", new Object[0]);
            this.mc.displayGuiScreen(new GuiScreenConfirmation(this, GuiScreenConfirmation.ConfirmationType.Info, var4, var3, 3));
        }
    }
}
项目:Resilience-Client-Source    文件:GuiScreenOnlineServers.java   
private void func_146685_v()
{
    int var1 = this.func_146672_b(this.field_146705_v);

    if (this.field_146700_C.size() - 1 == var1)
    {
        --var1;
    }

    if (this.field_146700_C.size() == 0)
    {
        var1 = -1;
    }

    if (var1 >= 0 && var1 < this.field_146700_C.size())
    {
        this.field_146705_v = ((McoServer)this.field_146700_C.get(var1)).field_148812_a;
    }
}
项目:Resilience-Client-Source    文件:GuiScreenOnlineServers.java   
private McoServer func_146677_c(long p_146677_1_)
{
    Session var3 = this.mc.getSession();
    McoClient var4 = new McoClient(var3.getSessionID(), var3.getUsername(), "1.7.2", Minecraft.getMinecraft().getProxy());

    try
    {
        return var4.func_148709_a(p_146677_1_);
    }
    catch (ExceptionMcoService var6)
    {
        logger.error("Couldn\'t get own world");
    }
    catch (IOException var7)
    {
        logger.error("Couldn\'t parse response getting own world");
    }

    return null;
}
项目:Resilience-Client-Source    文件:GuiScreenOnlineServers.java   
protected void func_148352_a(int p_148352_1_, boolean p_148352_2_)
{
    if (p_148352_1_ < GuiScreenOnlineServers.this.field_146700_C.size())
    {
        McoServer var3 = (McoServer)GuiScreenOnlineServers.this.field_146700_C.get(p_148352_1_);
        GuiScreenOnlineServers.this.field_146705_v = var3.field_148812_a;

        if (!GuiScreenOnlineServers.this.mc.getSession().getUsername().equals(var3.field_148809_e))
        {
            GuiScreenOnlineServers.this.field_146704_w.displayString = I18n.format("mco.selectServer.leave", new Object[0]);
        }
        else
        {
            GuiScreenOnlineServers.this.field_146704_w.displayString = I18n.format("mco.selectServer.configure", new Object[0]);
        }

        GuiScreenOnlineServers.this.field_146704_w.enabled = !var3.field_148808_d.equals(McoServer.State.ADMIN_LOCK.name());
        GuiScreenOnlineServers.this.field_146710_z.enabled = var3.field_148808_d.equals(McoServer.State.OPEN.name()) && !var3.field_148819_h;

        if (p_148352_2_ && GuiScreenOnlineServers.this.field_146710_z.enabled)
        {
            GuiScreenOnlineServers.this.func_146656_d(GuiScreenOnlineServers.this.field_146705_v);
        }
    }
}
项目:RuneCraftery    文件:McoServerList.java   
private synchronized void func_96426_a(List p_96426_1_) {
   int var2 = 0;
   Iterator var3 = this.field_140060_d.iterator();

   while(var3.hasNext()) {
      McoServer var4 = (McoServer)var3.next();
      if(p_96426_1_.remove(var4)) {
         ++var2;
      }
   }

   if(var2 == 0) {
      this.field_140060_d.clear();
   }

   this.field_98255_d = p_96426_1_;
   this.field_140059_g = true;
}
项目:RuneCraftery    文件:McoServerListUpdateTaskComparator.java   
public int func_140068_a(McoServer p_140068_1_, McoServer p_140068_2_) {
   if(p_140068_1_.field_96405_e.equals(p_140068_2_.field_96405_e)) {
      return p_140068_1_.field_96408_a < p_140068_2_.field_96408_a?1:(p_140068_1_.field_96408_a > p_140068_2_.field_96408_a?-1:0);
   } else if(p_140068_1_.field_96405_e.equals(this.field_140069_b)) {
      return -1;
   } else if(p_140068_2_.field_96405_e.equals(this.field_140069_b)) {
      return 1;
   } else {
      if(p_140068_1_.field_96404_d.equals("CLOSED") || p_140068_2_.field_96404_d.equals("CLOSED")) {
         if(p_140068_1_.field_96404_d.equals("CLOSED")) {
            return 1;
         }

         if(p_140068_2_.field_96404_d.equals("CLOSED")) {
            return 0;
         }
      }

      return p_140068_1_.field_96408_a < p_140068_2_.field_96408_a?1:(p_140068_1_.field_96408_a > p_140068_2_.field_96408_a?-1:0);
   }
}
项目:RuneCraftery    文件:ValueObjectList.java   
public static ValueObjectList func_98161_a(String p_98161_0_) {
   ValueObjectList var1 = new ValueObjectList();
   var1.field_96430_d = new ArrayList();

   try {
      JsonRootNode var2 = (new JdomParser()).parse(p_98161_0_);
      if(var2.isArrayNode(new Object[]{"servers"})) {
         Iterator var3 = var2.getArrayNode(new Object[]{"servers"}).iterator();

         while(var3.hasNext()) {
            JsonNode var4 = (JsonNode)var3.next();
            var1.field_96430_d.add(McoServer.func_98163_a(var4));
         }
      }
   } catch (InvalidSyntaxException var5) {
      ;
   } catch (IllegalArgumentException var6) {
      ;
   }

   return var1;
}
项目:RuneCraftery    文件:GuiScreenOnlineServers.java   
private void func_140019_s() {
   McoServer var1 = this.func_140030_b(this.field_96189_n);
   if(var1 != null) {
      if(this.field_73882_e.func_110432_I().func_111285_a().equals(var1.field_96405_e)) {
         McoServer var2 = this.func_98086_a(var1.field_96408_a);
         if(var2 != null) {
            field_96194_t.func_98248_d();
            this.field_73882_e.func_71373_a(new GuiScreenConfigureWorld(this, var2));
         }
      } else {
         String var4 = I18n.func_135053_a("mco.configure.world.leave.question.line1");
         String var3 = I18n.func_135053_a("mco.configure.world.leave.question.line2");
         this.field_73882_e.func_71373_a(new GuiScreenConfirmation(this, GuiScreenConfirmationType.Info, var4, var3, 3));
      }
   }

}
项目:RuneCraftery    文件:GuiSlotOnlineServerList.java   
protected void func_77213_a(int p_77213_1_, boolean p_77213_2_) {
   if(p_77213_1_ < GuiScreenOnlineServers.func_140013_c(this.field_96294_a).size()) {
      McoServer var3 = (McoServer)GuiScreenOnlineServers.func_140013_c(this.field_96294_a).get(p_77213_1_);
      GuiScreenOnlineServers.func_140036_b(this.field_96294_a, var3.field_96408_a);
      if(!GuiScreenOnlineServers.func_140015_g(this.field_96294_a).func_110432_I().func_111285_a().equals(var3.field_96405_e)) {
         GuiScreenOnlineServers.func_140038_h(this.field_96294_a).field_73744_e = I18n.func_135053_a("mco.selectServer.leave");
      } else {
         GuiScreenOnlineServers.func_140038_h(this.field_96294_a).field_73744_e = I18n.func_135053_a("mco.selectServer.configure");
      }

      GuiScreenOnlineServers.func_140033_i(this.field_96294_a).field_73742_g = var3.field_96404_d.equals("OPEN") && !var3.field_98166_h;
      if(p_77213_2_ && GuiScreenOnlineServers.func_140033_i(this.field_96294_a).field_73742_g) {
         GuiScreenOnlineServers.func_140008_c(this.field_96294_a, GuiScreenOnlineServers.func_140041_a(this.field_96294_a));
      }

   }
}
项目:RuneCraftery    文件:GuiSlotOnlineServerList.java   
private void func_96292_b(int p_96292_1_, int p_96292_2_, int p_96292_3_, int p_96292_4_, Tessellator p_96292_5_) {
   McoServer var6 = (McoServer)GuiScreenOnlineServers.func_140013_c(this.field_96294_a).get(p_96292_1_);
   this.field_96294_a.func_73731_b(GuiScreenOnlineServers.func_140023_k(this.field_96294_a), var6.func_96398_b(), p_96292_2_ + 2, p_96292_3_ + 1, 16777215);
   short var7 = 207;
   byte var8 = 1;
   if(var6.field_98166_h) {
      GuiScreenOnlineServers.func_104031_c(this.field_96294_a, p_96292_2_ + var7, p_96292_3_ + var8, this.field_104094_d, this.field_104095_e);
   } else if(var6.field_96404_d.equals("CLOSED")) {
      GuiScreenOnlineServers.func_140035_b(this.field_96294_a, p_96292_2_ + var7, p_96292_3_ + var8, this.field_104094_d, this.field_104095_e);
   } else if(var6.field_96405_e.equals(GuiScreenOnlineServers.func_140014_l(this.field_96294_a).func_110432_I().func_111285_a()) && var6.field_104063_i < 7) {
      this.func_96293_a(p_96292_1_, p_96292_2_ - 14, p_96292_3_, var6);
      GuiScreenOnlineServers.func_140031_a(this.field_96294_a, p_96292_2_ + var7, p_96292_3_ + var8, this.field_104094_d, this.field_104095_e, var6.field_104063_i);
   } else if(var6.field_96404_d.equals("OPEN")) {
      GuiScreenOnlineServers.func_140020_c(this.field_96294_a, p_96292_2_ + var7, p_96292_3_ + var8, this.field_104094_d, this.field_104095_e);
      this.func_96293_a(p_96292_1_, p_96292_2_ - 14, p_96292_3_, var6);
   }

   this.field_96294_a.func_73731_b(GuiScreenOnlineServers.func_140039_m(this.field_96294_a), var6.func_96397_a(), p_96292_2_ + 2, p_96292_3_ + 12, 7105644);
   this.field_96294_a.func_73731_b(GuiScreenOnlineServers.func_98079_k(this.field_96294_a), var6.field_96405_e, p_96292_2_ + 2, p_96292_3_ + 12 + 11, 5000268);
}
项目:RuneCraftery    文件:GuiSlotOnlineServerList.java   
private void func_96293_a(int p_96293_1_, int p_96293_2_, int p_96293_3_, McoServer p_96293_4_) {
   if(p_96293_4_.field_96403_g != null) {
      synchronized(GuiScreenOnlineServers.func_140029_i()) {
         if(GuiScreenOnlineServers.func_140018_j() < 5 && (!p_96293_4_.field_96411_l || p_96293_4_.field_102022_m)) {
            (new ThreadConnectToOnlineServer(this, p_96293_4_)).start();
         }
      }

      if(p_96293_4_.field_96414_k != null) {
         this.field_96294_a.func_73731_b(GuiScreenOnlineServers.func_110402_q(this.field_96294_a), p_96293_4_.field_96414_k, p_96293_2_ + 215 - GuiScreenOnlineServers.func_140010_p(this.field_96294_a).func_78256_a(p_96293_4_.field_96414_k), p_96293_3_ + 1, 8421504);
      }

      GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
      GuiScreenOnlineServers.func_142023_q(this.field_96294_a).func_110434_K().func_110577_a(Gui.field_110324_m);
   }
}
项目:RuneCraftery    文件:ThreadOnlineScreen.java   
public void run() {
   try {
      McoServer var1 = GuiScreenOnlineServers.func_140011_a(this.field_98173_a, GuiScreenOnlineServers.func_140041_a(this.field_98173_a));
      if(var1 != null) {
         McoClient var2 = new McoClient(GuiScreenOnlineServers.func_98075_b(this.field_98173_a).func_110432_I());
         GuiScreenOnlineServers.func_140040_h().func_140058_a(var1);
         GuiScreenOnlineServers.func_140013_c(this.field_98173_a).remove(var1);
         var2.func_140055_c(var1.field_96408_a);
         GuiScreenOnlineServers.func_140040_h().func_140058_a(var1);
         GuiScreenOnlineServers.func_140013_c(this.field_98173_a).remove(var1);
         GuiScreenOnlineServers.func_140017_d(this.field_98173_a);
      }
   } catch (ExceptionMcoService var3) {
      GuiScreenOnlineServers.func_98076_f(this.field_98173_a).func_98033_al().func_98232_c(var3.toString());
   }

}
项目:RuneCraftery    文件:GuiScreenOnlineServers.java   
public void func_96178_g()
{
    this.buttonList.add(this.field_96196_r = new GuiButton(1, this.width / 2 - 154, this.height - 52, 100, 20, I18n.getString("mco.selectServer.play")));
    this.buttonList.add(this.field_96198_p = new GuiButton(2, this.width / 2 - 48, this.height - 52, 100, 20, I18n.getString("mco.selectServer.create")));
    this.buttonList.add(this.field_96190_o = new GuiButton(3, this.width / 2 + 58, this.height - 52, 100, 20, I18n.getString("mco.selectServer.configure")));
    this.buttonList.add(this.field_96197_q = new GuiButtonLink(4, this.width / 2 - 154, this.height - 28, 154, 20, I18n.getString("mco.selectServer.moreinfo")));
    this.buttonList.add(new GuiButton(0, this.width / 2 + 6, this.height - 28, 153, 20, I18n.getString("gui.cancel")));
    McoServer mcoserver = this.func_140030_b(this.field_96189_n);
    this.field_96196_r.enabled = mcoserver != null && mcoserver.field_96404_d.equals("OPEN") && !mcoserver.field_98166_h;
    this.field_96198_p.enabled = this.field_96199_x > 0;

    if (mcoserver != null && !mcoserver.field_96405_e.equals(this.mc.getSession().getUsername()))
    {
        this.field_96190_o.displayString = I18n.getString("mco.selectServer.leave");
    }
}
项目:RuneCraftery    文件:GuiScreenOnlineServers.java   
private void func_140019_s()
{
    McoServer mcoserver = this.func_140030_b(this.field_96189_n);

    if (mcoserver != null)
    {
        if (this.mc.getSession().getUsername().equals(mcoserver.field_96405_e))
        {
            McoServer mcoserver1 = this.func_98086_a(mcoserver.field_96408_a);

            if (mcoserver1 != null)
            {
                field_96194_t.func_98248_d();
                this.mc.displayGuiScreen(new GuiScreenConfigureWorld(this, mcoserver1));
            }
        }
        else
        {
            String s = I18n.getString("mco.configure.world.leave.question.line1");
            String s1 = I18n.getString("mco.configure.world.leave.question.line2");
            this.mc.displayGuiScreen(new GuiScreenConfirmation(this, GuiScreenConfirmationType.Info, s, s1, 3));
        }
    }
}
项目:RuneCraftery    文件:GuiScreenOnlineServers.java   
private void func_140012_t()
{
    int i = this.func_140009_c(this.field_96189_n);

    if (this.field_96192_v.size() - 1 == i)
    {
        --i;
    }

    if (this.field_96192_v.size() == 0)
    {
        i = -1;
    }

    if (i >= 0 && i < this.field_96192_v.size())
    {
        this.field_96189_n = ((McoServer)this.field_96192_v.get(i)).field_96408_a;
    }
}
项目:RuneCraftery    文件:GuiScreenOnlineServers.java   
private McoServer func_98086_a(long par1)
{
    McoClient mcoclient = new McoClient(this.mc.getSession());

    try
    {
        return mcoclient.func_98176_a(par1);
    }
    catch (ExceptionMcoService exceptionmcoservice)
    {
        this.mc.getLogAgent().logSevere(exceptionmcoservice.toString());
    }
    catch (IOException ioexception)
    {
        this.mc.getLogAgent().logWarning("Realms: could not parse response");
    }

    return null;
}
项目:RuneCraftery    文件:GuiSlotOnlineServerList.java   
/**
 * the element in the slot that was clicked, boolean for wether it was double clicked or not
 */
protected void elementClicked(int par1, boolean par2)
{
    if (par1 < GuiScreenOnlineServers.func_140013_c(this.field_96294_a).size())
    {
        McoServer mcoserver = (McoServer)GuiScreenOnlineServers.func_140013_c(this.field_96294_a).get(par1);
        GuiScreenOnlineServers.func_140036_b(this.field_96294_a, mcoserver.field_96408_a);

        if (!GuiScreenOnlineServers.func_140015_g(this.field_96294_a).getSession().getUsername().equals(mcoserver.field_96405_e))
        {
            GuiScreenOnlineServers.func_140038_h(this.field_96294_a).displayString = I18n.getString("mco.selectServer.leave");
        }
        else
        {
            GuiScreenOnlineServers.func_140038_h(this.field_96294_a).displayString = I18n.getString("mco.selectServer.configure");
        }

        GuiScreenOnlineServers.func_140033_i(this.field_96294_a).enabled = mcoserver.field_96404_d.equals("OPEN") && !mcoserver.field_98166_h;

        if (par2 && GuiScreenOnlineServers.func_140033_i(this.field_96294_a).enabled)
        {
            GuiScreenOnlineServers.func_140008_c(this.field_96294_a, GuiScreenOnlineServers.func_140041_a(this.field_96294_a));
        }
    }
}
项目:RuneCraftery    文件:GuiSlotOnlineServerList.java   
private void func_96293_a(int par1, int par2, int par3, McoServer par4McoServer)
{
    if (par4McoServer.field_96403_g != null)
    {
        synchronized (GuiScreenOnlineServers.func_140029_i())
        {
            if (GuiScreenOnlineServers.func_140018_j() < 5 && (!par4McoServer.field_96411_l || par4McoServer.field_102022_m))
            {
                (new ThreadConnectToOnlineServer(this, par4McoServer)).start();
            }
        }

        if (par4McoServer.field_96414_k != null)
        {
            this.field_96294_a.drawString(GuiScreenOnlineServers.func_110402_q(this.field_96294_a), par4McoServer.field_96414_k, par2 + 215 - GuiScreenOnlineServers.func_140010_p(this.field_96294_a).getStringWidth(par4McoServer.field_96414_k), par3 + 1, 8421504);
        }

        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        GuiScreenOnlineServers.func_142023_q(this.field_96294_a).getTextureManager().bindTexture(Gui.icons);
    }
}
项目:RuneCraftery    文件:ThreadOnlineScreen.java   
public void run()
{
    try
    {
        McoServer mcoserver = GuiScreenOnlineServers.func_140011_a(this.field_98173_a, GuiScreenOnlineServers.func_140041_a(this.field_98173_a));

        if (mcoserver != null)
        {
            McoClient mcoclient = new McoClient(GuiScreenOnlineServers.func_98075_b(this.field_98173_a).getSession());
            GuiScreenOnlineServers.func_140040_h().func_140058_a(mcoserver);
            GuiScreenOnlineServers.func_140013_c(this.field_98173_a).remove(mcoserver);
            mcoclient.func_140055_c(mcoserver.field_96408_a);
            GuiScreenOnlineServers.func_140040_h().func_140058_a(mcoserver);
            GuiScreenOnlineServers.func_140013_c(this.field_98173_a).remove(mcoserver);
            GuiScreenOnlineServers.func_140017_d(this.field_98173_a);
        }
    }
    catch (ExceptionMcoService exceptionmcoservice)
    {
        GuiScreenOnlineServers.func_98076_f(this.field_98173_a).getLogAgent().logSevere(exceptionmcoservice.toString());
    }
}
项目:BetterNutritionMod    文件:GuiScreenOnlineServers.java   
public void func_96178_g()
{
    this.buttonList.add(this.field_96196_r = new GuiButton(1, this.width / 2 - 154, this.height - 52, 100, 20, I18n.getString("mco.selectServer.play")));
    this.buttonList.add(this.field_96198_p = new GuiButton(2, this.width / 2 - 48, this.height - 52, 100, 20, I18n.getString("mco.selectServer.create")));
    this.buttonList.add(this.field_96190_o = new GuiButton(3, this.width / 2 + 58, this.height - 52, 100, 20, I18n.getString("mco.selectServer.configure")));
    this.buttonList.add(this.field_96197_q = new GuiButtonLink(4, this.width / 2 - 154, this.height - 28, 154, 20, I18n.getString("mco.selectServer.moreinfo")));
    this.buttonList.add(new GuiButton(0, this.width / 2 + 6, this.height - 28, 153, 20, I18n.getString("gui.cancel")));
    McoServer mcoserver = this.func_140030_b(this.field_96189_n);
    this.field_96196_r.enabled = mcoserver != null && mcoserver.field_96404_d.equals("OPEN") && !mcoserver.field_98166_h;
    this.field_96198_p.enabled = this.field_96199_x > 0;

    if (mcoserver != null && !mcoserver.field_96405_e.equals(this.mc.getSession().getUsername()))
    {
        this.field_96190_o.displayString = I18n.getString("mco.selectServer.leave");
    }
}
项目:BetterNutritionMod    文件:GuiScreenOnlineServers.java   
private void func_140019_s()
{
    McoServer mcoserver = this.func_140030_b(this.field_96189_n);

    if (mcoserver != null)
    {
        if (this.mc.getSession().getUsername().equals(mcoserver.field_96405_e))
        {
            McoServer mcoserver1 = this.func_98086_a(mcoserver.field_96408_a);

            if (mcoserver1 != null)
            {
                field_96194_t.func_98248_d();
                this.mc.displayGuiScreen(new GuiScreenConfigureWorld(this, mcoserver1));
            }
        }
        else
        {
            String s = I18n.getString("mco.configure.world.leave.question.line1");
            String s1 = I18n.getString("mco.configure.world.leave.question.line2");
            this.mc.displayGuiScreen(new GuiScreenConfirmation(this, GuiScreenConfirmationType.Info, s, s1, 3));
        }
    }
}
项目:BetterNutritionMod    文件:GuiScreenOnlineServers.java   
private void func_140012_t()
{
    int i = this.func_140009_c(this.field_96189_n);

    if (this.field_96192_v.size() - 1 == i)
    {
        --i;
    }

    if (this.field_96192_v.size() == 0)
    {
        i = -1;
    }

    if (i >= 0 && i < this.field_96192_v.size())
    {
        this.field_96189_n = ((McoServer)this.field_96192_v.get(i)).field_96408_a;
    }
}
项目:BetterNutritionMod    文件:GuiScreenOnlineServers.java   
private McoServer func_98086_a(long par1)
{
    McoClient mcoclient = new McoClient(this.mc.getSession());

    try
    {
        return mcoclient.func_98176_a(par1);
    }
    catch (ExceptionMcoService exceptionmcoservice)
    {
        this.mc.getLogAgent().logSevere(exceptionmcoservice.toString());
    }
    catch (IOException ioexception)
    {
        this.mc.getLogAgent().logWarning("Realms: could not parse response");
    }

    return null;
}
项目:BetterNutritionMod    文件:GuiSlotOnlineServerList.java   
/**
 * the element in the slot that was clicked, boolean for wether it was double clicked or not
 */
protected void elementClicked(int par1, boolean par2)
{
    if (par1 < GuiScreenOnlineServers.func_140013_c(this.field_96294_a).size())
    {
        McoServer mcoserver = (McoServer)GuiScreenOnlineServers.func_140013_c(this.field_96294_a).get(par1);
        GuiScreenOnlineServers.func_140036_b(this.field_96294_a, mcoserver.field_96408_a);

        if (!GuiScreenOnlineServers.func_140015_g(this.field_96294_a).getSession().getUsername().equals(mcoserver.field_96405_e))
        {
            GuiScreenOnlineServers.func_140038_h(this.field_96294_a).displayString = I18n.getString("mco.selectServer.leave");
        }
        else
        {
            GuiScreenOnlineServers.func_140038_h(this.field_96294_a).displayString = I18n.getString("mco.selectServer.configure");
        }

        GuiScreenOnlineServers.func_140033_i(this.field_96294_a).enabled = mcoserver.field_96404_d.equals("OPEN") && !mcoserver.field_98166_h;

        if (par2 && GuiScreenOnlineServers.func_140033_i(this.field_96294_a).enabled)
        {
            GuiScreenOnlineServers.func_140008_c(this.field_96294_a, GuiScreenOnlineServers.func_140041_a(this.field_96294_a));
        }
    }
}
项目:BetterNutritionMod    文件:GuiSlotOnlineServerList.java   
private void func_96293_a(int par1, int par2, int par3, McoServer par4McoServer)
{
    if (par4McoServer.field_96403_g != null)
    {
        synchronized (GuiScreenOnlineServers.func_140029_i())
        {
            if (GuiScreenOnlineServers.func_140018_j() < 5 && (!par4McoServer.field_96411_l || par4McoServer.field_102022_m))
            {
                (new ThreadConnectToOnlineServer(this, par4McoServer)).start();
            }
        }

        if (par4McoServer.field_96414_k != null)
        {
            this.field_96294_a.drawString(GuiScreenOnlineServers.func_110402_q(this.field_96294_a), par4McoServer.field_96414_k, par2 + 215 - GuiScreenOnlineServers.func_140010_p(this.field_96294_a).getStringWidth(par4McoServer.field_96414_k), par3 + 1, 8421504);
        }

        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        GuiScreenOnlineServers.func_142023_q(this.field_96294_a).getTextureManager().bindTexture(Gui.icons);
    }
}
项目:BetterNutritionMod    文件:ThreadOnlineScreen.java   
public void run()
{
    try
    {
        McoServer mcoserver = GuiScreenOnlineServers.func_140011_a(this.field_98173_a, GuiScreenOnlineServers.func_140041_a(this.field_98173_a));

        if (mcoserver != null)
        {
            McoClient mcoclient = new McoClient(GuiScreenOnlineServers.func_98075_b(this.field_98173_a).getSession());
            GuiScreenOnlineServers.func_140040_h().func_140058_a(mcoserver);
            GuiScreenOnlineServers.func_140013_c(this.field_98173_a).remove(mcoserver);
            mcoclient.func_140055_c(mcoserver.field_96408_a);
            GuiScreenOnlineServers.func_140040_h().func_140058_a(mcoserver);
            GuiScreenOnlineServers.func_140013_c(this.field_98173_a).remove(mcoserver);
            GuiScreenOnlineServers.func_140017_d(this.field_98173_a);
        }
    }
    catch (ExceptionMcoService exceptionmcoservice)
    {
        GuiScreenOnlineServers.func_98076_f(this.field_98173_a).getLogAgent().logSevere(exceptionmcoservice.toString());
    }
}
项目:Resilience-Client-Source    文件:GuiScreenOnlineServers.java   
/**
 * Called from the main game loop to update the screen.
 */
public void updateScreen()
{
    super.updateScreen();
    ++this.field_146696_E;

    if (field_146703_i.func_148472_a())
    {
        List var1 = field_146703_i.func_148473_c();
        Iterator var2 = var1.iterator();

        while (var2.hasNext())
        {
            McoServer var3 = (McoServer)var2.next();
            Iterator var4 = this.field_146700_C.iterator();

            while (var4.hasNext())
            {
                McoServer var5 = (McoServer)var4.next();

                if (var3.field_148812_a == var5.field_148812_a)
                {
                    var3.func_148799_a(var5);
                    break;
                }
            }
        }

        this.field_146694_D = field_146703_i.func_148469_e();
        this.field_146700_C = var1;
        field_146703_i.func_148479_b();
    }

    this.field_146712_x.displayString = this.field_146694_D > 0 ? I18n.format("mco.selectServer.create", new Object[0]) : I18n.format("mco.selectServer.buy", new Object[0]);
}
项目:Resilience-Client-Source    文件:GuiScreenOnlineServers.java   
private int func_146672_b(long p_146672_1_)
{
    for (int var3 = 0; var3 < this.field_146700_C.size(); ++var3)
    {
        if (((McoServer)this.field_146700_C.get(var3)).field_148812_a == p_146672_1_)
        {
            return var3;
        }
    }

    return -1;
}
项目:Resilience-Client-Source    文件:GuiScreenOnlineServers.java   
public void confirmClicked(boolean par1, int par2)
{
    if (par2 == 3 && par1)
    {
        (new Thread("MCO Configure Requester #" + field_146701_a.incrementAndGet())
        {
            private static final String __OBFID = "CL_00000793";
            public void run()
            {
                try
                {
                    McoServer var1 = GuiScreenOnlineServers.this.func_146691_a(GuiScreenOnlineServers.this.field_146705_v);

                    if (var1 != null)
                    {
                        Session var2 = GuiScreenOnlineServers.this.mc.getSession();
                        McoClient var3 = new McoClient(var2.getSessionID(), var2.getUsername(), "1.7.2", Minecraft.getMinecraft().getProxy());
                        GuiScreenOnlineServers.field_146703_i.func_148470_a(var1);
                        GuiScreenOnlineServers.this.field_146700_C.remove(var1);
                        var3.func_148698_c(var1.field_148812_a);
                        GuiScreenOnlineServers.field_146703_i.func_148470_a(var1);
                        GuiScreenOnlineServers.this.field_146700_C.remove(var1);
                        GuiScreenOnlineServers.this.func_146685_v();
                    }
                }
                catch (ExceptionMcoService var4)
                {
                    GuiScreenOnlineServers.logger.error("Couldn\'t configure world");
                }
            }
        }).start();
    }
    else if (par2 == 4 && par1)
    {
        this.field_146711_y.func_146138_a("http://realms.minecraft.net/");
    }

    this.mc.displayGuiScreen(this);
}
项目:Resilience-Client-Source    文件:GuiScreenOnlineServers.java   
private void func_146656_d(long p_146656_1_)
{
    McoServer var3 = this.func_146691_a(p_146656_1_);

    if (var3 != null)
    {
        this.func_146669_s();
        GuiScreenLongRunningTask var4 = new GuiScreenLongRunningTask(this.mc, this, new TaskOnlineConnect(this, var3));
        var4.func_146902_g();
        this.mc.displayGuiScreen(var4);
    }
}
项目:Resilience-Client-Source    文件:GuiScreenOnlineServers.java   
protected boolean func_148349_b(int p_148349_1_)
{
    try
    {
        return p_148349_1_ >= 0 && p_148349_1_ < GuiScreenOnlineServers.this.field_146700_C.size() && ((McoServer)GuiScreenOnlineServers.this.field_146700_C.get(p_148349_1_)).field_148809_e.toLowerCase().equals(GuiScreenOnlineServers.this.mc.getSession().getUsername());
    }
    catch (Exception var3)
    {
        return false;
    }
}
项目:Resilience-Client-Source    文件:GuiScreenOnlineServers.java   
private void func_148389_a(int p_148389_1_, int p_148389_2_, int p_148389_3_, McoServer p_148389_4_)
{
    if (p_148389_4_.field_148807_g != null)
    {
        if (p_148389_4_.field_148816_m != null)
        {
            GuiScreenOnlineServers.this.drawString(GuiScreenOnlineServers.this.fontRendererObj, p_148389_4_.field_148816_m, p_148389_2_ + 215 - GuiScreenOnlineServers.this.fontRendererObj.getStringWidth(p_148389_4_.field_148816_m), p_148389_3_ + 1, 8421504);
        }

        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        GuiScreenOnlineServers.this.mc.getTextureManager().bindTexture(Gui.icons);
    }
}
项目:RuneCraftery    文件:GuiScreenOnlineServers.java   
public void func_96178_g() {
   this.field_73887_h.add(this.field_96196_r = new GuiButton(1, this.field_73880_f / 2 - 154, this.field_73881_g - 52, 100, 20, I18n.func_135053_a("mco.selectServer.play")));
   this.field_73887_h.add(this.field_96198_p = new GuiButton(2, this.field_73880_f / 2 - 48, this.field_73881_g - 52, 100, 20, I18n.func_135053_a("mco.selectServer.create")));
   this.field_73887_h.add(this.field_96190_o = new GuiButton(3, this.field_73880_f / 2 + 58, this.field_73881_g - 52, 100, 20, I18n.func_135053_a("mco.selectServer.configure")));
   this.field_73887_h.add(this.field_96197_q = new GuiButtonLink(4, this.field_73880_f / 2 - 154, this.field_73881_g - 28, 154, 20, I18n.func_135053_a("mco.selectServer.moreinfo")));
   this.field_73887_h.add(new GuiButton(0, this.field_73880_f / 2 + 6, this.field_73881_g - 28, 153, 20, I18n.func_135053_a("gui.cancel")));
   McoServer var1 = this.func_140030_b(this.field_96189_n);
   this.field_96196_r.field_73742_g = var1 != null && var1.field_96404_d.equals("OPEN") && !var1.field_98166_h;
   this.field_96198_p.field_73742_g = this.field_96199_x > 0;
   if(var1 != null && !var1.field_96405_e.equals(this.field_73882_e.func_110432_I().func_111285_a())) {
      this.field_96190_o.field_73744_e = I18n.func_135053_a("mco.selectServer.leave");
   }

}
项目:RuneCraftery    文件:GuiScreenOnlineServers.java   
public void func_73876_c() {
   super.func_73876_c();
   ++this.field_104044_y;
   if(field_96194_t.func_130127_a()) {
      List var1 = field_96194_t.func_98252_c();
      Iterator var2 = var1.iterator();

      while(var2.hasNext()) {
         McoServer var3 = (McoServer)var2.next();
         Iterator var4 = this.field_96192_v.iterator();

         while(var4.hasNext()) {
            McoServer var5 = (McoServer)var4.next();
            if(var3.field_96408_a == var5.field_96408_a) {
               var3.func_96401_a(var5);
               if(this.field_102019_y != null && this.field_102019_y.longValue() == var3.field_96408_a) {
                  this.field_102019_y = null;
                  var3.field_96411_l = false;
               }
               break;
            }
         }
      }

      this.field_96199_x = field_96194_t.func_140056_e();
      this.field_96192_v = var1;
      field_96194_t.func_98250_b();
   }

   this.field_96198_p.field_73742_g = this.field_96199_x > 0;
}
项目:RuneCraftery    文件:GuiScreenOnlineServers.java   
private int func_140009_c(long p_140009_1_) {
   for(int var3 = 0; var3 < this.field_96192_v.size(); ++var3) {
      if(((McoServer)this.field_96192_v.get(var3)).field_96408_a == p_140009_1_) {
         return var3;
      }
   }

   return -1;
}
项目:RuneCraftery    文件:GuiScreenOnlineServers.java   
private void func_140012_t() {
   int var1 = this.func_140009_c(this.field_96189_n);
   if(this.field_96192_v.size() - 1 == var1) {
      --var1;
   }

   if(this.field_96192_v.size() == 0) {
      var1 = -1;
   }

   if(var1 >= 0 && var1 < this.field_96192_v.size()) {
      this.field_96189_n = ((McoServer)this.field_96192_v.get(var1)).field_96408_a;
   }

}
项目:RuneCraftery    文件:GuiScreenOnlineServers.java   
private McoServer func_98086_a(long p_98086_1_) {
   McoClient var3 = new McoClient(this.field_73882_e.func_110432_I());

   try {
      return var3.func_98176_a(p_98086_1_);
   } catch (ExceptionMcoService var5) {
      this.field_73882_e.func_98033_al().func_98232_c(var5.toString());
   } catch (IOException var6) {
      this.field_73882_e.func_98033_al().func_98236_b("Realms: could not parse response");
   }

   return null;
}
项目:RuneCraftery    文件:GuiScreenOnlineServers.java   
private void func_140032_e(long p_140032_1_) {
   McoServer var3 = this.func_140030_b(p_140032_1_);
   if(var3 != null) {
      field_96194_t.func_98248_d();
      GuiScreenLongRunningTask var4 = new GuiScreenLongRunningTask(this.field_73882_e, this, new TaskOnlineConnect(this, var3));
      var4.func_98117_g();
      this.field_73882_e.func_71373_a(var4);
   }

}
项目:RuneCraftery    文件:GuiSlotOnlineServerList.java   
protected boolean func_104086_b(int p_104086_1_) {
   try {
      return p_104086_1_ >= 0 && p_104086_1_ < GuiScreenOnlineServers.func_140013_c(this.field_96294_a).size() && ((McoServer)GuiScreenOnlineServers.func_140013_c(this.field_96294_a).get(p_104086_1_)).field_96405_e.toLowerCase().equals(GuiScreenOnlineServers.func_104032_j(this.field_96294_a).func_110432_I().func_111285_a());
   } catch (Exception var3) {
      return false;
   }
}