Ejemplo n.º 1
0
 public boolean getAcceptsTextures() {
   if (!this.mc.gameSettings.serverTextures) {
     return false;
   } else {
     ServerData var1 = this.mc.getServerData();
     return var1 == null ? false : var1.getAcceptsTextures();
   }
 }
Ejemplo n.º 2
0
 public boolean func_77300_f() {
   if (!this.mc.gameSettings.serverTextures) {
     return false;
   } else {
     ServerData var1 = this.mc.getServerData();
     return var1 == null ? true : var1.func_78840_c();
   }
 }
  public void func_73878_a(boolean p_73878_1_, int p_73878_2_) {
    if (this.field_74036_r) {
      this.field_74036_r = false;
      if (p_73878_1_) {
        this.field_74030_m.func_78851_b(p_73878_2_);
        this.field_74030_m.func_78855_b();
        this.field_74028_n = -1;
      }

      this.field_73882_e.func_71373_a(this);
    } else if (this.field_74033_u) {
      this.field_74033_u = false;
      if (p_73878_1_) {
        this.func_74002_a(this.field_74031_w);
      } else {
        this.field_73882_e.func_71373_a(this);
      }
    } else if (this.field_74035_s) {
      this.field_74035_s = false;
      if (p_73878_1_) {
        this.field_74030_m.func_78849_a(this.field_74031_w);
        this.field_74030_m.func_78855_b();
        this.field_74028_n = -1;
      }

      this.field_73882_e.func_71373_a(this);
    } else if (this.field_74034_t) {
      this.field_74034_t = false;
      if (p_73878_1_) {
        ServerData var3 = this.field_74030_m.func_78850_a(this.field_74028_n);
        var3.field_78847_a = this.field_74031_w.field_78847_a;
        var3.field_78845_b = this.field_74031_w.field_78845_b;
        this.field_74030_m.func_78855_b();
      }

      this.field_73882_e.func_71373_a(this);
    }
  }
  private void func_74017_b(ServerData p_74017_1_) throws IOException {
    ServerAddress var2 = ServerAddress.func_78860_a(p_74017_1_.field_78845_b);
    Socket var3 = null;
    DataInputStream var4 = null;
    DataOutputStream var5 = null;

    try {
      var3 = new Socket();
      var3.setSoTimeout(3000);
      var3.setTcpNoDelay(true);
      var3.setTrafficClass(18);
      var3.connect(new InetSocketAddress(var2.func_78861_a(), var2.func_78864_b()), 3000);
      var4 = new DataInputStream(var3.getInputStream());
      var5 = new DataOutputStream(var3.getOutputStream());
      var5.write(254);
      if (var4.read() != 255) {
        throw new IOException("Bad message");
      }

      String var6 = Packet.func_73282_a(var4, 256);
      char[] var7 = var6.toCharArray();

      for (int var8 = 0; var8 < var7.length; ++var8) {
        if (var7[var8] != 167 && ChatAllowedCharacters.field_71568_a.indexOf(var7[var8]) < 0) {
          var7[var8] = 63;
        }
      }

      var6 = new String(var7);
      String[] var27 = var6.split("\u00a7");
      var6 = var27[0];
      int var9 = -1;
      int var10 = -1;

      try {
        var9 = Integer.parseInt(var27[1]);
        var10 = Integer.parseInt(var27[2]);
      } catch (Exception var25) {;
      }

      p_74017_1_.field_78843_d = "\u00a77" + var6;
      if (var9 >= 0 && var10 > 0) {
        p_74017_1_.field_78846_c = "\u00a77" + var9 + "\u00a78/\u00a77" + var10;
      } else {
        p_74017_1_.field_78846_c = "\u00a78???";
      }
    } finally {
      try {
        if (var4 != null) {
          var4.close();
        }
      } catch (Throwable var24) {;
      }

      try {
        if (var5 != null) {
          var5.close();
        }
      } catch (Throwable var23) {;
      }

      try {
        if (var3 != null) {
          var3.close();
        }
      } catch (Throwable var22) {;
      }
    }
  }