001package net.minecraft.scoreboard; 002 003import java.util.Comparator; 004import java.util.List; 005 006public class Score 007{ 008 public static final Comparator field_96658_a = new ScoreComparator(); 009 private final Scoreboard theScoreboard; 010 private final ScoreObjective field_96657_c; 011 private final String field_96654_d; 012 private int field_96655_e; 013 014 public Score(Scoreboard par1Scoreboard, ScoreObjective par2ScoreObjective, String par3Str) 015 { 016 this.theScoreboard = par1Scoreboard; 017 this.field_96657_c = par2ScoreObjective; 018 this.field_96654_d = par3Str; 019 } 020 021 public void func_96649_a(int par1) 022 { 023 if (this.field_96657_c.getCriteria().isReadOnly()) 024 { 025 throw new IllegalStateException("Cannot modify read-only score"); 026 } 027 else 028 { 029 this.func_96647_c(this.func_96652_c() + par1); 030 } 031 } 032 033 public void func_96646_b(int par1) 034 { 035 if (this.field_96657_c.getCriteria().isReadOnly()) 036 { 037 throw new IllegalStateException("Cannot modify read-only score"); 038 } 039 else 040 { 041 this.func_96647_c(this.func_96652_c() - par1); 042 } 043 } 044 045 public void func_96648_a() 046 { 047 if (this.field_96657_c.getCriteria().isReadOnly()) 048 { 049 throw new IllegalStateException("Cannot modify read-only score"); 050 } 051 else 052 { 053 this.func_96649_a(1); 054 } 055 } 056 057 public int func_96652_c() 058 { 059 return this.field_96655_e; 060 } 061 062 public void func_96647_c(int par1) 063 { 064 int j = this.field_96655_e; 065 this.field_96655_e = par1; 066 067 if (j != par1) 068 { 069 this.func_96650_f().func_96536_a(this); 070 } 071 } 072 073 public ScoreObjective func_96645_d() 074 { 075 return this.field_96657_c; 076 } 077 078 public String func_96653_e() 079 { 080 return this.field_96654_d; 081 } 082 083 public Scoreboard func_96650_f() 084 { 085 return this.theScoreboard; 086 } 087 088 public void func_96651_a(List par1List) 089 { 090 this.func_96647_c(this.field_96657_c.getCriteria().func_96635_a(par1List)); 091 } 092}