Exemplo n.º 1
0
  private void func_180475_a(ScoreObjective p_180475_1_, ScaledResolution p_180475_2_) {
    Scoreboard var3 = p_180475_1_.getScoreboard();
    Collection var4 = var3.getSortedScores(p_180475_1_);
    ArrayList var5 =
        Lists.newArrayList(
            Iterables.filter(
                var4,
                new Predicate() {
                  private static final String __OBFID = "CL_00001958";

                  public boolean func_178903_a(Score p_178903_1_) {
                    return p_178903_1_.getPlayerName() != null
                        && !p_178903_1_.getPlayerName().startsWith("#");
                  }

                  public boolean apply(Object p_apply_1_) {
                    return this.func_178903_a((Score) p_apply_1_);
                  }
                }));
    ArrayList var21;

    if (var5.size() > 15) {
      var21 = Lists.newArrayList(Iterables.skip(var5, var4.size() - 15));
    } else {
      var21 = var5;
    }

    int var6 = this.func_175179_f().getStringWidth(p_180475_1_.getDisplayName());
    String var10;

    for (Iterator var7 = var21.iterator();
        var7.hasNext();
        var6 = Math.max(var6, this.func_175179_f().getStringWidth(var10))) {
      Score var8 = (Score) var7.next();
      ScorePlayerTeam var9 = var3.getPlayersTeam(var8.getPlayerName());
      var10 =
          ScorePlayerTeam.formatPlayerName(var9, var8.getPlayerName())
              + ": "
              + EnumChatFormatting.RED
              + var8.getScorePoints();
    }

    int var22 = var21.size() * this.func_175179_f().FONT_HEIGHT;
    int var23 = p_180475_2_.getScaledHeight() / 2 + var22 / 3;
    byte var24 = 3;
    int var25 = p_180475_2_.getScaledWidth() - var6 - var24;
    int var11 = 0;
    Iterator var12 = var21.iterator();

    while (var12.hasNext()) {
      Score var13 = (Score) var12.next();
      ++var11;
      ScorePlayerTeam var14 = var3.getPlayersTeam(var13.getPlayerName());
      String var15 = ScorePlayerTeam.formatPlayerName(var14, var13.getPlayerName());
      String var16 = EnumChatFormatting.RED + "" + var13.getScorePoints();
      int var18 = var23 - var11 * this.func_175179_f().FONT_HEIGHT;
      int var19 = p_180475_2_.getScaledWidth() - var24 + 2;
      drawRect(var25 - 2, var18, var19, var18 + this.func_175179_f().FONT_HEIGHT, 1342177280);
      this.func_175179_f().drawString(var15, var25, var18, 553648127);
      this.func_175179_f()
          .drawString(var16, var19 - this.func_175179_f().getStringWidth(var16), var18, 553648127);

      if (var11 == var21.size()) {
        String var20 = p_180475_1_.getDisplayName();
        drawRect(
            var25 - 2, var18 - this.func_175179_f().FONT_HEIGHT - 1, var19, var18 - 1, 1610612736);
        drawRect(var25 - 2, var18 - 1, var19, var18, 1342177280);
        this.func_175179_f()
            .drawString(
                var20,
                var25 + var6 / 2 - this.func_175179_f().getStringWidth(var20) / 2,
                var18 - this.func_175179_f().FONT_HEIGHT,
                553648127);
      }
    }
  }
 public Packet206SetObjective(ScoreObjective p_i1470_1_, int p_i1470_2_) {
   this.field_96484_a = p_i1470_1_.func_96679_b();
   this.field_96482_b = p_i1470_1_.func_96678_d();
   this.field_96483_c = p_i1470_2_;
 }
Exemplo n.º 3
0
 public S3CPacketUpdateScore(String nameIn, ScoreObjective objectiveIn) {
   this.name = nameIn;
   this.objective = objectiveIn.getName();
   this.value = 0;
   this.action = S3CPacketUpdateScore.Action.REMOVE;
 }