Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

1.5.1

  • Loading branch information...
commit 4f6bc387b1c8c33230050d4a6f93da7b3262aa52 1 parent 8d2955c
Travis Watkins amaranth authored
Showing with 739 additions and 547 deletions.
  1. +1 −1  net/minecraft/server/BanList.java
  2. +2 −0  net/minecraft/server/BlockChest.java
  3. +2 −0  net/minecraft/server/BlockDispenser.java
  4. +2 −2 net/minecraft/server/BlockDropper.java
  5. +2 −0  net/minecraft/server/BlockFurnace.java
  6. +2 −0  net/minecraft/server/BlockHopper.java
  7. +22 −13 net/minecraft/server/ChunkCache.java
  8. +58 −58 net/minecraft/server/CommandScoreboard.java
  9. +1 −1  net/minecraft/server/ContainerAnvil.java
  10. +23 −0 net/minecraft/server/CrashReportEffectAmbient.java
  11. +23 −0 net/minecraft/server/CrashReportEffectAmplifier.java
  12. +23 −0 net/minecraft/server/CrashReportEffectDuration.java
  13. +23 −0 net/minecraft/server/CrashReportEffectID.java
  14. +23 −0 net/minecraft/server/CrashReportEffectName.java
  15. +23 −0 net/minecraft/server/CrashReportEffectSplash.java
  16. +1 −1  net/minecraft/server/CrashReportVersion.java
  17. +1 −1  net/minecraft/server/DedicatedServer.java
  18. +0 −18 net/minecraft/server/DedicatedServerConnectionThread.java
  19. +8 −8 net/minecraft/server/Entity.java
  20. +1 −1  net/minecraft/server/EntityEnderDragon.java
  21. +7 −7 net/minecraft/server/EntityHuman.java
  22. +20 −6 net/minecraft/server/EntityLiving.java
  23. +2 −2 net/minecraft/server/EntityMinecartHopper.java
  24. +5 −5 net/minecraft/server/EntityPlayer.java
  25. +1 −1  net/minecraft/server/EntitySquid.java
  26. +16 −7 net/minecraft/server/EntityTracker.java
  27. +12 −10 net/minecraft/server/EntityTrackerEntry.java
  28. +3 −0  net/minecraft/server/IEmptyInterface.java
  29. +0 −22 net/minecraft/server/IObjective.java
  30. +22 −0 net/minecraft/server/IScoreboardCriteria.java
  31. +4 −2 net/minecraft/server/IWorldInventory.java
  32. +1 −1  net/minecraft/server/MinecraftServer.java
  33. +4 −0 net/minecraft/server/MobEffect.java
  34. +1 −1  net/minecraft/server/MojangStatisticsGenerator.java
  35. +2 −2 net/minecraft/server/Packet206SetScoreboardObjective.java
  36. +3 −3 net/minecraft/server/Packet207SetScoreboardScore.java
  37. +1 −1  net/minecraft/server/Packet208SetScoreboardDisplayObjective.java
  38. +7 −7 net/minecraft/server/Packet209SetScoreboardTeam.java
  39. +7 −7 net/minecraft/server/PlayerList.java
  40. +84 −84 net/minecraft/server/Scoreboard.java
  41. +25 −0 net/minecraft/server/ScoreboardBaseCriteria.java
  42. +0 −25 net/minecraft/server/ScoreboardBaseObjective.java
  43. +1 −1  net/minecraft/server/ScoreboardComparator.java
  44. +4 −4 net/minecraft/server/{ScoreboardHealthObjective.java → ScoreboardHealthCriteria.java}
  45. +8 −8 net/minecraft/server/ScoreboardObjective.java
  46. +33 −33 net/minecraft/server/ScoreboardSaveData.java
  47. +23 −23 net/minecraft/server/ScoreboardScore.java
  48. +30 −30 net/minecraft/server/ScoreboardServer.java
  49. +22 −22 net/minecraft/server/ScoreboardTeam.java
  50. +22 −16 net/minecraft/server/TileEntityBrewingStand.java
  51. +17 −10 net/minecraft/server/TileEntityFurnace.java
  52. +104 −100 net/minecraft/server/TileEntityHopper.java
  53. +7 −3 net/minecraft/server/World.java
2  net/minecraft/server/BanList.java
View
@@ -105,7 +105,7 @@ public void save(boolean flag) {
PrintWriter printwriter = new PrintWriter(new FileWriter(this.b, false));
if (flag) {
- printwriter.println("# Updated " + (new SimpleDateFormat()).format(new Date()) + " by Minecraft " + "1.5");
+ printwriter.println("# Updated " + (new SimpleDateFormat()).format(new Date()) + " by Minecraft " + "1.5.1");
printwriter.println("# victim name | ban date | banned by | banned until | reason");
printwriter.println();
}
2  net/minecraft/server/BlockChest.java
View
@@ -269,6 +269,8 @@ public void remove(World world, int i, int j, int k, int l, int i1) {
}
}
}
+
+ world.m(i, j, k, l);
}
super.remove(world, i, j, k, l, i1);
2  net/minecraft/server/BlockDispenser.java
View
@@ -156,6 +156,8 @@ public void remove(World world, int i, int j, int k, int l, int i1) {
}
}
}
+
+ world.m(i, j, k, l);
}
super.remove(world, i, j, k, l, i1);
4 net/minecraft/server/BlockDropper.java
View
@@ -28,11 +28,11 @@ protected void dispense(World world, int i, int j, int k) {
} else {
ItemStack itemstack = tileentitydispenser.getItem(l);
int i1 = world.getData(i, j, k) & 7;
- IInventory iinventory = TileEntityHopper.b(world, (double) (i + Facing.b[i1]), (double) (j + Facing.c[i1]), (double) (k + Facing.d[i1]));
+ IInventory iinventory = TileEntityHopper.getInventoryAt(world, (double) (i + Facing.b[i1]), (double) (j + Facing.c[i1]), (double) (k + Facing.d[i1]));
ItemStack itemstack1;
if (iinventory != null) {
- itemstack1 = TileEntityHopper.a(iinventory, itemstack.cloneItemStack().a(1), Facing.OPPOSITE_FACING[i1]);
+ itemstack1 = TileEntityHopper.addItem(iinventory, itemstack.cloneItemStack().a(1), Facing.OPPOSITE_FACING[i1]);
if (itemstack1 == null) {
itemstack1 = itemstack.cloneItemStack();
if (--itemstack1.count == 0) {
2  net/minecraft/server/BlockFurnace.java
View
@@ -147,6 +147,8 @@ public void remove(World world, int i, int j, int k, int l, int i1) {
}
}
}
+
+ world.m(i, j, k, l);
}
}
2  net/minecraft/server/BlockHopper.java
View
@@ -125,6 +125,8 @@ public void remove(World world, int i, int j, int k, int l, int i1) {
}
}
}
+
+ world.m(i, j, k, l);
}
super.remove(world, i, j, k, l, i1);
35 net/minecraft/server/ChunkCache.java
View
@@ -8,25 +8,34 @@
private boolean d;
private World e;
- public ChunkCache(World world, int i, int j, int k, int l, int i1, int j1) {
+ public ChunkCache(World world, int i, int j, int k, int l, int i1, int j1, int k1) {
this.e = world;
- this.a = i >> 4;
- this.b = k >> 4;
- int k1 = l >> 4;
- int l1 = j1 >> 4;
+ this.a = i - k1 >> 4;
+ this.b = k - k1 >> 4;
+ int l1 = l + k1 >> 4;
+ int i2 = j1 + k1 >> 4;
- this.c = new Chunk[k1 - this.a + 1][l1 - this.b + 1];
+ this.c = new Chunk[l1 - this.a + 1][i2 - this.b + 1];
this.d = true;
- for (int i2 = this.a; i2 <= k1; ++i2) {
- for (int j2 = this.b; j2 <= l1; ++j2) {
- Chunk chunk = world.getChunkAt(i2, j2);
+ int j2;
+ int k2;
+ Chunk chunk;
+ for (j2 = this.a; j2 <= l1; ++j2) {
+ for (k2 = this.b; k2 <= i2; ++k2) {
+ chunk = world.getChunkAt(j2, k2);
if (chunk != null) {
- this.c[i2 - this.a][j2 - this.b] = chunk;
- if (!chunk.c(j, i1)) {
- this.d = false;
- }
+ this.c[j2 - this.a][k2 - this.b] = chunk;
+ }
+ }
+ }
+
+ for (j2 = i >> 4; j2 <= l >> 4; ++j2) {
+ for (k2 = k >> 4; k2 <= j1 >> 4; ++k2) {
+ chunk = this.c[j2 - this.a][k2 - this.b];
+ if (chunk != null && !chunk.c(j, i1)) {
+ this.d = false;
}
}
}
116 net/minecraft/server/CommandScoreboard.java
View
@@ -166,11 +166,11 @@ protected Scoreboard d() {
protected ScoreboardObjective a(String s, boolean flag) {
Scoreboard scoreboard = this.d();
- ScoreboardObjective scoreboardobjective = scoreboard.b(s);
+ ScoreboardObjective scoreboardobjective = scoreboard.getObjective(s);
if (scoreboardobjective == null) {
throw new CommandException("commands.scoreboard.objectiveNotFound", new Object[] { s});
- } else if (flag && scoreboardobjective.c().b()) {
+ } else if (flag && scoreboardobjective.getCriteria().isReadOnly()) {
throw new CommandException("commands.scoreboard.objectiveReadOnly", new Object[] { s});
} else {
return scoreboardobjective;
@@ -179,7 +179,7 @@ protected ScoreboardObjective a(String s, boolean flag) {
protected ScoreboardTeam a(String s) {
Scoreboard scoreboard = this.d();
- ScoreboardTeam scoreboardteam = scoreboard.e(s);
+ ScoreboardTeam scoreboardteam = scoreboard.getTeam(s);
if (scoreboardteam == null) {
throw new CommandException("commands.scoreboard.teamNotFound", new Object[] { s});
@@ -192,18 +192,18 @@ protected void b(ICommandListener icommandlistener, String[] astring, int i) {
String s = astring[i++];
String s1 = astring[i++];
Scoreboard scoreboard = this.d();
- IObjective iobjective = (IObjective) IObjective.a.get(s1);
+ IScoreboardCriteria iscoreboardcriteria = (IScoreboardCriteria) IScoreboardCriteria.a.get(s1);
- if (iobjective == null) {
- String[] astring1 = (String[]) IObjective.a.keySet().toArray(new String[0]);
+ if (iscoreboardcriteria == null) {
+ String[] astring1 = (String[]) IScoreboardCriteria.a.keySet().toArray(new String[0]);
throw new ExceptionUsage("commands.scoreboard.objectives.add.wrongType", new Object[] { a(astring1)});
- } else if (scoreboard.b(s) != null) {
+ } else if (scoreboard.getObjective(s) != null) {
throw new CommandException("commands.scoreboard.objectives.add.alreadyExists", new Object[] { s});
} else if (s.length() > 16) {
throw new ExceptionInvalidSyntax("commands.scoreboard.objectives.add.tooLong", new Object[] { s, Integer.valueOf(16)});
} else {
- ScoreboardObjective scoreboardobjective = scoreboard.a(s, iobjective);
+ ScoreboardObjective scoreboardobjective = scoreboard.registerObjective(s, iscoreboardcriteria);
if (astring.length > i) {
String s2 = a(icommandlistener, astring, i);
@@ -213,7 +213,7 @@ protected void b(ICommandListener icommandlistener, String[] astring, int i) {
}
if (s2.length() > 0) {
- scoreboardobjective.a(s2);
+ scoreboardobjective.setDisplayName(s2);
}
}
@@ -225,12 +225,12 @@ protected void c(ICommandListener icommandlistener, String[] astring, int i) {
String s = astring[i++];
Scoreboard scoreboard = this.d();
- if (scoreboard.e(s) != null) {
+ if (scoreboard.getTeam(s) != null) {
throw new CommandException("commands.scoreboard.teams.add.alreadyExists", new Object[] { s});
} else if (s.length() > 16) {
throw new ExceptionInvalidSyntax("commands.scoreboard.teams.add.tooLong", new Object[] { s, Integer.valueOf(16)});
} else {
- ScoreboardTeam scoreboardteam = scoreboard.f(s);
+ ScoreboardTeam scoreboardteam = scoreboard.createTeam(s);
if (astring.length > i) {
String s1 = a(icommandlistener, astring, i);
@@ -240,7 +240,7 @@ protected void c(ICommandListener icommandlistener, String[] astring, int i) {
}
if (s1.length() > 0) {
- scoreboardteam.a(s1);
+ scoreboardteam.setDisplayName(s1);
}
}
@@ -272,23 +272,23 @@ protected void d(ICommandListener icommandlistener, String[] astring, int i) {
throw new ExceptionUsage("commands.scoreboard.teams.option.noValue", new Object[] { s, a(EnumChatFormat.a(true, false))});
}
- scoreboardteam.b(enumchatformat.toString());
- scoreboardteam.c(EnumChatFormat.RESET.toString());
+ scoreboardteam.setPrefix(enumchatformat.toString());
+ scoreboardteam.setSuffix(EnumChatFormat.RESET.toString());
} else if (s.equalsIgnoreCase("friendlyfire")) {
if (!s1.equalsIgnoreCase("true") && !s1.equalsIgnoreCase("false")) {
throw new ExceptionUsage("commands.scoreboard.teams.option.noValue", new Object[] { s, a(Arrays.asList(new String[] { "true", "false"}))});
}
- scoreboardteam.a(s1.equalsIgnoreCase("true"));
+ scoreboardteam.setAllowFriendlyFire(s1.equalsIgnoreCase("true"));
} else if (s.equalsIgnoreCase("seeFriendlyInvisibles")) {
if (!s1.equalsIgnoreCase("true") && !s1.equalsIgnoreCase("false")) {
throw new ExceptionUsage("commands.scoreboard.teams.option.noValue", new Object[] { s, a(Arrays.asList(new String[] { "true", "false"}))});
}
- scoreboardteam.b(s1.equalsIgnoreCase("true"));
+ scoreboardteam.setCanSeeFriendlyInvisibles(s1.equalsIgnoreCase("true"));
}
- a(icommandlistener, "commands.scoreboard.teams.option.success", new Object[] { s, scoreboardteam.b(), s1});
+ a(icommandlistener, "commands.scoreboard.teams.option.success", new Object[] { s, scoreboardteam.getName(), s1});
}
}
@@ -296,8 +296,8 @@ protected void e(ICommandListener icommandlistener, String[] astring, int i) {
Scoreboard scoreboard = this.d();
ScoreboardTeam scoreboardteam = this.a(astring[i++]);
- scoreboard.d(scoreboardteam);
- a(icommandlistener, "commands.scoreboard.teams.remove.success", new Object[] { scoreboardteam.b()});
+ scoreboard.removeTeam(scoreboardteam);
+ a(icommandlistener, "commands.scoreboard.teams.remove.success", new Object[] { scoreboardteam.getName()});
}
protected void f(ICommandListener icommandlistener, String[] astring, int i) {
@@ -305,16 +305,16 @@ protected void f(ICommandListener icommandlistener, String[] astring, int i) {
if (astring.length > i) {
ScoreboardTeam scoreboardteam = this.a(astring[i++]);
- Collection collection = scoreboardteam.d();
+ Collection collection = scoreboardteam.getPlayerNameSet();
if (collection.size() <= 0) {
- throw new CommandException("commands.scoreboard.teams.list.player.empty", new Object[] { scoreboardteam.b()});
+ throw new CommandException("commands.scoreboard.teams.list.player.empty", new Object[] { scoreboardteam.getName()});
}
- icommandlistener.sendMessage(EnumChatFormat.DARK_GREEN + icommandlistener.a("commands.scoreboard.teams.list.player.count", new Object[] { Integer.valueOf(collection.size()), scoreboardteam.b()}));
+ icommandlistener.sendMessage(EnumChatFormat.DARK_GREEN + icommandlistener.a("commands.scoreboard.teams.list.player.count", new Object[] { Integer.valueOf(collection.size()), scoreboardteam.getName()}));
icommandlistener.sendMessage(a(collection.toArray()));
} else {
- Collection collection1 = scoreboard.g();
+ Collection collection1 = scoreboard.getTeams();
if (collection1.size() <= 0) {
throw new CommandException("commands.scoreboard.teams.list.empty", new Object[0]);
@@ -326,31 +326,31 @@ protected void f(ICommandListener icommandlistener, String[] astring, int i) {
while (iterator.hasNext()) {
ScoreboardTeam scoreboardteam1 = (ScoreboardTeam) iterator.next();
- icommandlistener.sendMessage(icommandlistener.a("commands.scoreboard.teams.list.entry", new Object[] { scoreboardteam1.b(), scoreboardteam1.c(), Integer.valueOf(scoreboardteam1.d().size())}));
+ icommandlistener.sendMessage(icommandlistener.a("commands.scoreboard.teams.list.entry", new Object[] { scoreboardteam1.getName(), scoreboardteam1.getDisplayName(), Integer.valueOf(scoreboardteam1.getPlayerNameSet().size())}));
}
}
}
protected void g(ICommandListener icommandlistener, String[] astring, int i) {
Scoreboard scoreboard = this.d();
- ScoreboardTeam scoreboardteam = scoreboard.e(astring[i++]);
+ ScoreboardTeam scoreboardteam = scoreboard.getTeam(astring[i++]);
HashSet hashset = new HashSet();
String s;
if (icommandlistener instanceof EntityHuman && i == astring.length) {
s = c(icommandlistener).getLocalizedName();
- scoreboard.a(s, scoreboardteam);
+ scoreboard.addPlayerToTeam(s, scoreboardteam);
hashset.add(s);
} else {
while (i < astring.length) {
s = d(icommandlistener, astring[i++]);
- scoreboard.a(s, scoreboardteam);
+ scoreboard.addPlayerToTeam(s, scoreboardteam);
hashset.add(s);
}
}
if (!hashset.isEmpty()) {
- a(icommandlistener, "commands.scoreboard.teams.join.success", new Object[] { Integer.valueOf(hashset.size()), scoreboardteam.b(), a(hashset.toArray(new String[0]))});
+ a(icommandlistener, "commands.scoreboard.teams.join.success", new Object[] { Integer.valueOf(hashset.size()), scoreboardteam.getName(), a(hashset.toArray(new String[0]))});
}
}
@@ -362,7 +362,7 @@ protected void h(ICommandListener icommandlistener, String[] astring, int i) {
if (icommandlistener instanceof EntityHuman && i == astring.length) {
s = c(icommandlistener).getLocalizedName();
- if (scoreboard.g(s)) {
+ if (scoreboard.removePlayerFromTeam(s)) {
hashset.add(s);
} else {
hashset1.add(s);
@@ -370,7 +370,7 @@ protected void h(ICommandListener icommandlistener, String[] astring, int i) {
} else {
while (i < astring.length) {
s = d(icommandlistener, astring[i++]);
- if (scoreboard.g(s)) {
+ if (scoreboard.removePlayerFromTeam(s)) {
hashset.add(s);
} else {
hashset1.add(s);
@@ -390,20 +390,20 @@ protected void h(ICommandListener icommandlistener, String[] astring, int i) {
protected void i(ICommandListener icommandlistener, String[] astring, int i) {
Scoreboard scoreboard = this.d();
ScoreboardTeam scoreboardteam = this.a(astring[i++]);
- ArrayList arraylist = new ArrayList(scoreboardteam.d());
+ ArrayList arraylist = new ArrayList(scoreboardteam.getPlayerNameSet());
if (arraylist.isEmpty()) {
- throw new CommandException("commands.scoreboard.teams.empty.alreadyEmpty", new Object[] { scoreboardteam.b()});
+ throw new CommandException("commands.scoreboard.teams.empty.alreadyEmpty", new Object[] { scoreboardteam.getName()});
} else {
Iterator iterator = arraylist.iterator();
while (iterator.hasNext()) {
String s = (String) iterator.next();
- scoreboard.b(s, scoreboardteam);
+ scoreboard.removePlayerFromTeam(s, scoreboardteam);
}
- a(icommandlistener, "commands.scoreboard.teams.empty.success", new Object[] { Integer.valueOf(arraylist.size()), scoreboardteam.b()});
+ a(icommandlistener, "commands.scoreboard.teams.empty.success", new Object[] { Integer.valueOf(arraylist.size()), scoreboardteam.getName()});
}
}
@@ -411,13 +411,13 @@ protected void e(ICommandListener icommandlistener, String s) {
Scoreboard scoreboard = this.d();
ScoreboardObjective scoreboardobjective = this.a(s, false);
- scoreboard.k(scoreboardobjective);
+ scoreboard.unregisterObjective(scoreboardobjective);
a(icommandlistener, "commands.scoreboard.objectives.remove.success", new Object[] { s});
}
protected void d(ICommandListener icommandlistener) {
Scoreboard scoreboard = this.d();
- Collection collection = scoreboard.c();
+ Collection collection = scoreboard.getObjectives();
if (collection.size() <= 0) {
throw new CommandException("commands.scoreboard.objectives.list.empty", new Object[0]);
@@ -428,7 +428,7 @@ protected void d(ICommandListener icommandlistener) {
while (iterator.hasNext()) {
ScoreboardObjective scoreboardobjective = (ScoreboardObjective) iterator.next();
- icommandlistener.sendMessage(icommandlistener.a("commands.scoreboard.objectives.list.entry", new Object[] { scoreboardobjective.b(), scoreboardobjective.d(), scoreboardobjective.c().a()}));
+ icommandlistener.sendMessage(icommandlistener.a("commands.scoreboard.objectives.list.entry", new Object[] { scoreboardobjective.getName(), scoreboardobjective.getDisplayName(), scoreboardobjective.getCriteria().getName()}));
}
}
}
@@ -436,7 +436,7 @@ protected void d(ICommandListener icommandlistener) {
protected void j(ICommandListener icommandlistener, String[] astring, int i) {
Scoreboard scoreboard = this.d();
String s = astring[i++];
- int j = Scoreboard.j(s);
+ int j = Scoreboard.getSlotForName(s);
ScoreboardObjective scoreboardobjective = null;
if (astring.length == 4) {
@@ -446,11 +446,11 @@ protected void j(ICommandListener icommandlistener, String[] astring, int i) {
if (j < 0) {
throw new CommandException("commands.scoreboard.objectives.setdisplay.invalidSlot", new Object[] { s});
} else {
- scoreboard.a(j, scoreboardobjective);
+ scoreboard.setDisplaySlot(j, scoreboardobjective);
if (scoreboardobjective != null) {
- a(icommandlistener, "commands.scoreboard.objectives.setdisplay.successSet", new Object[] { Scoreboard.b(j), scoreboardobjective.b()});
+ a(icommandlistener, "commands.scoreboard.objectives.setdisplay.successSet", new Object[] { Scoreboard.getSlotName(j), scoreboardobjective.getName()});
} else {
- a(icommandlistener, "commands.scoreboard.objectives.setdisplay.successCleared", new Object[] { Scoreboard.b(j)});
+ a(icommandlistener, "commands.scoreboard.objectives.setdisplay.successCleared", new Object[] { Scoreboard.getSlotName(j)});
}
}
}
@@ -460,7 +460,7 @@ protected void k(ICommandListener icommandlistener, String[] astring, int i) {
if (astring.length > i) {
String s = d(icommandlistener, astring[i++]);
- Map map = scoreboard.d(s);
+ Map map = scoreboard.getPlayerObjectives(s);
if (map.size() <= 0) {
throw new CommandException("commands.scoreboard.players.list.player.empty", new Object[] { s});
@@ -472,10 +472,10 @@ protected void k(ICommandListener icommandlistener, String[] astring, int i) {
while (iterator.hasNext()) {
ScoreboardScore scoreboardscore = (ScoreboardScore) iterator.next();
- icommandlistener.sendMessage(icommandlistener.a("commands.scoreboard.players.list.player.entry", new Object[] { Integer.valueOf(scoreboardscore.c()), scoreboardscore.d().d(), scoreboardscore.d().b()}));
+ icommandlistener.sendMessage(icommandlistener.a("commands.scoreboard.players.list.player.entry", new Object[] { Integer.valueOf(scoreboardscore.getScore()), scoreboardscore.getObjective().getDisplayName(), scoreboardscore.getObjective().getName()}));
}
} else {
- Collection collection = scoreboard.d();
+ Collection collection = scoreboard.getPlayers();
if (collection.size() <= 0) {
throw new CommandException("commands.scoreboard.players.list.empty", new Object[0]);
@@ -492,24 +492,24 @@ protected void l(ICommandListener icommandlistener, String[] astring, int i) {
ScoreboardObjective scoreboardobjective = this.a(astring[i++], true);
int j = s.equalsIgnoreCase("set") ? a(icommandlistener, astring[i++]) : a(icommandlistener, astring[i++], 1);
Scoreboard scoreboard = this.d();
- ScoreboardScore scoreboardscore = scoreboard.a(s1, scoreboardobjective);
+ ScoreboardScore scoreboardscore = scoreboard.getPlayerScoreForObjective(s1, scoreboardobjective);
if (s.equalsIgnoreCase("set")) {
- scoreboardscore.c(j);
+ scoreboardscore.setScore(j);
} else if (s.equalsIgnoreCase("add")) {
- scoreboardscore.a(j);
+ scoreboardscore.addScore(j);
} else {
- scoreboardscore.b(j);
+ scoreboardscore.removeScore(j);
}
- a(icommandlistener, "commands.scoreboard.players.set.success", new Object[] { scoreboardobjective.b(), s1, Integer.valueOf(scoreboardscore.c())});
+ a(icommandlistener, "commands.scoreboard.players.set.success", new Object[] { scoreboardobjective.getName(), s1, Integer.valueOf(scoreboardscore.getScore())});
}
protected void m(ICommandListener icommandlistener, String[] astring, int i) {
Scoreboard scoreboard = this.d();
String s = d(icommandlistener, astring[i++]);
- scoreboard.c(s);
+ scoreboard.resetPlayerScores(s);
a(icommandlistener, "commands.scoreboard.players.reset.success", new Object[] { s});
}
@@ -524,7 +524,7 @@ public List a(ICommandListener icommandlistener, String[] astring) {
if (astring[1].equalsIgnoreCase("add")) {
if (astring.length == 4) {
- return a(astring, IObjective.a.keySet());
+ return a(astring, IScoreboardCriteria.a.keySet());
}
} else if (astring[1].equalsIgnoreCase("remove")) {
if (astring.length == 3) {
@@ -546,7 +546,7 @@ public List a(ICommandListener icommandlistener, String[] astring) {
if (!astring[1].equalsIgnoreCase("set") && !astring[1].equalsIgnoreCase("add") && !astring[1].equalsIgnoreCase("remove")) {
if ((astring[1].equalsIgnoreCase("reset") || astring[1].equalsIgnoreCase("list")) && astring.length == 3) {
- return a(astring, this.d().d());
+ return a(astring, this.d().getPlayers());
}
} else {
if (astring.length == 3) {
@@ -564,7 +564,7 @@ public List a(ICommandListener icommandlistener, String[] astring) {
if (astring[1].equalsIgnoreCase("join")) {
if (astring.length == 3) {
- return a(astring, this.d().f());
+ return a(astring, this.d().getTeamNames());
}
if (astring.length >= 4) {
@@ -578,7 +578,7 @@ public List a(ICommandListener icommandlistener, String[] astring) {
if (!astring[1].equalsIgnoreCase("empty") && !astring[1].equalsIgnoreCase("list") && !astring[1].equalsIgnoreCase("remove")) {
if (astring[1].equalsIgnoreCase("option")) {
if (astring.length == 3) {
- return a(astring, this.d().f());
+ return a(astring, this.d().getTeamNames());
}
if (astring.length == 4) {
@@ -596,7 +596,7 @@ public List a(ICommandListener icommandlistener, String[] astring) {
}
}
} else if (astring.length == 3) {
- return a(astring, this.d().f());
+ return a(astring, this.d().getTeamNames());
}
}
}
@@ -606,15 +606,15 @@ public List a(ICommandListener icommandlistener, String[] astring) {
}
protected List a(boolean flag) {
- Collection collection = this.d().c();
+ Collection collection = this.d().getObjectives();
ArrayList arraylist = new ArrayList();
Iterator iterator = collection.iterator();
while (iterator.hasNext()) {
ScoreboardObjective scoreboardobjective = (ScoreboardObjective) iterator.next();
- if (!flag || !scoreboardobjective.c().b()) {
- arraylist.add(scoreboardobjective.b());
+ if (!flag || !scoreboardobjective.getCriteria().isReadOnly()) {
+ arraylist.add(scoreboardobjective.getName());
}
}
2  net/minecraft/server/ContainerAnvil.java
View
@@ -137,7 +137,7 @@ public void e() {
int k2 = l1 - k1;
boolean flag1 = enchantment.canEnchant(itemstack);
- if (this.n.abilities.canInstantlyBuild) {
+ if (this.n.abilities.canInstantlyBuild || itemstack.id == ItemEnchantedBook.ENCHANTED_BOOK.id) {
flag1 = true;
}
23 net/minecraft/server/CrashReportEffectAmbient.java
View
@@ -0,0 +1,23 @@
+package net.minecraft.server;
+
+import java.util.concurrent.Callable;
+
+class CrashReportEffectAmbient implements Callable {
+
+ final MobEffect a;
+
+ final EntityLiving b;
+
+ CrashReportEffectAmbient(EntityLiving entityliving, MobEffect mobeffect) {
+ this.b = entityliving;
+ this.a = mobeffect;
+ }
+
+ public String a() {
+ return this.a.isAmbient() + "";
+ }
+
+ public Object call() {
+ return this.a();
+ }
+}
23 net/minecraft/server/CrashReportEffectAmplifier.java
View
@@ -0,0 +1,23 @@
+package net.minecraft.server;
+
+import java.util.concurrent.Callable;
+
+class CrashReportEffectAmplifier implements Callable {
+
+ final MobEffect a;
+
+ final EntityLiving b;
+
+ CrashReportEffectAmplifier(EntityLiving entityliving, MobEffect mobeffect) {
+ this.b = entityliving;
+ this.a = mobeffect;
+ }
+
+ public String a() {
+ return this.a.getAmplifier() + "";
+ }
+
+ public Object call() {
+ return this.a();
+ }
+}
23 net/minecraft/server/CrashReportEffectDuration.java
View
@@ -0,0 +1,23 @@
+package net.minecraft.server;
+
+import java.util.concurrent.Callable;
+
+class CrashReportEffectDuration implements Callable {
+
+ final MobEffect a;
+
+ final EntityLiving b;
+
+ CrashReportEffectDuration(EntityLiving entityliving, MobEffect mobeffect) {
+ this.b = entityliving;
+ this.a = mobeffect;
+ }
+
+ public String a() {
+ return this.a.getDuration() + "";
+ }
+
+ public Object call() {
+ return this.a();
+ }
+}
23 net/minecraft/server/CrashReportEffectID.java
View
@@ -0,0 +1,23 @@
+package net.minecraft.server;
+
+import java.util.concurrent.Callable;
+
+class CrashReportEffectID implements Callable {
+
+ final MobEffect a;
+
+ final EntityLiving b;
+
+ CrashReportEffectID(EntityLiving entityliving, MobEffect mobeffect) {
+ this.b = entityliving;
+ this.a = mobeffect;
+ }
+
+ public String a() {
+ return this.a.getEffectId() + "";
+ }
+
+ public Object call() {
+ return this.a();
+ }
+}
23 net/minecraft/server/CrashReportEffectName.java
View
@@ -0,0 +1,23 @@
+package net.minecraft.server;
+
+import java.util.concurrent.Callable;
+
+class CrashReportEffectName implements Callable {
+
+ final MobEffect a;
+
+ final EntityLiving b;
+
+ CrashReportEffectName(EntityLiving entityliving, MobEffect mobeffect) {
+ this.b = entityliving;
+ this.a = mobeffect;
+ }
+
+ public String a() {
+ return MobEffectList.byId[this.a.getEffectId()].a();
+ }
+
+ public Object call() {
+ return this.a();
+ }
+}
23 net/minecraft/server/CrashReportEffectSplash.java
View
@@ -0,0 +1,23 @@
+package net.minecraft.server;
+
+import java.util.concurrent.Callable;
+
+class CrashReportEffectSplash implements Callable {
+
+ final MobEffect a;
+
+ final EntityLiving b;
+
+ CrashReportEffectSplash(EntityLiving entityliving, MobEffect mobeffect) {
+ this.b = entityliving;
+ this.a = mobeffect;
+ }
+
+ public String a() {
+ return this.a.isSplash() + "";
+ }
+
+ public Object call() {
+ return this.a();
+ }
+}
2  net/minecraft/server/CrashReportVersion.java
View
@@ -11,7 +11,7 @@
}
public String a() {
- return "1.5";
+ return "1.5.1";
}
public Object call() {
2  net/minecraft/server/DedicatedServer.java
View
@@ -32,7 +32,7 @@ protected boolean init() {
threadcommandreader.setDaemon(true);
threadcommandreader.start();
- this.getLogger().info("Starting minecraft server version 1.5");
+ this.getLogger().info("Starting minecraft server version 1.5.1");
if (Runtime.getRuntime().maxMemory() / 1024L / 1024L < 512L) {
this.getLogger().warning("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\"");
}
18 net/minecraft/server/DedicatedServerConnectionThread.java
View
@@ -55,20 +55,6 @@ public void run() {
while (this.e.a) {
try {
Socket socket = this.d.accept();
- InetAddress inetaddress = socket.getInetAddress();
- long i = System.currentTimeMillis();
- HashMap hashmap = this.b;
-
- synchronized (this.b) {
- if (this.b.containsKey(inetaddress) && !b(inetaddress) && i - ((Long) this.b.get(inetaddress)).longValue() < 4000L) {
- this.b.put(inetaddress, Long.valueOf(i));
- socket.close();
- continue;
- }
-
- this.b.put(inetaddress, Long.valueOf(i));
- }
-
PendingConnection pendingconnection = new PendingConnection(this.e.d(), socket, "Connection #" + this.c++);
this.a(pendingconnection);
@@ -92,10 +78,6 @@ private void a(PendingConnection pendingconnection) {
}
}
- private static boolean b(InetAddress inetaddress) {
- return "127.0.0.1".equals(inetaddress.getHostAddress());
- }
-
public void a(InetAddress inetaddress) {
if (inetaddress != null) {
HashMap hashmap = this.b;
16 net/minecraft/server/Entity.java
View
@@ -56,7 +56,7 @@
public int ticksLived;
public int maxFireTicks;
private int fireTicks;
- protected boolean ae;
+ protected boolean inWater;
public int noDamageTicks;
private boolean justCreated;
protected boolean fireProof;
@@ -104,7 +104,7 @@ public Entity(World world) {
this.ticksLived = 0;
this.maxFireTicks = 1;
this.fireTicks = 0;
- this.ae = false;
+ this.inWater = false;
this.noDamageTicks = 0;
this.justCreated = true;
this.fireProof = false;
@@ -671,16 +671,16 @@ protected void a(float f) {
}
public boolean F() {
- return this.ae || this.world.F(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ)) || this.world.F(MathHelper.floor(this.locX), MathHelper.floor(this.locY + (double) this.length), MathHelper.floor(this.locZ));
+ return this.inWater || this.world.F(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ)) || this.world.F(MathHelper.floor(this.locX), MathHelper.floor(this.locY + (double) this.length), MathHelper.floor(this.locZ));
}
public boolean G() {
- return this.ae;
+ return this.inWater;
}
public boolean H() {
if (this.world.a(this.boundingBox.grow(0.0D, -0.4000000059604645D, 0.0D).shrink(0.001D, 0.001D, 0.001D), Material.WATER, this)) {
- if (!this.ae && !this.justCreated) {
+ if (!this.inWater && !this.justCreated) {
float f = MathHelper.sqrt(this.motX * this.motX * 0.20000000298023224D + this.motY * this.motY + this.motZ * this.motZ * 0.20000000298023224D) * 0.2F;
if (f > 1.0F) {
@@ -708,13 +708,13 @@ public boolean H() {
}
this.fallDistance = 0.0F;
- this.ae = true;
+ this.inWater = true;
this.fireTicks = 0;
} else {
- this.ae = false;
+ this.inWater = false;
}
- return this.ae;
+ return this.inWater;
}
public boolean a(Material material) {
2  net/minecraft/server/EntityEnderDragon.java
View
@@ -395,7 +395,7 @@ private boolean a(AxisAlignedBB axisalignedbb) {
int j2 = this.world.getTypeId(k1, l1, i2);
if (j2 != 0) {
- if (j2 != Block.OBSIDIAN.id && j2 != Block.WHITESTONE.id && j2 != Block.BEDROCK.id) {
+ if (j2 != Block.OBSIDIAN.id && j2 != Block.WHITESTONE.id && j2 != Block.BEDROCK.id && this.world.getGameRules().getBoolean("mobGriefing")) {
flag1 = this.world.setAir(k1, l1, i2) || flag1;
} else {
flag = true;
14 net/minecraft/server/EntityHuman.java
View
@@ -377,11 +377,11 @@ public void die(DamageSource damagesource) {
public void c(Entity entity, int i) {
this.addScore(i);
- Collection collection = this.getScoreboard().a(IObjective.e);
+ Collection collection = this.getScoreboard().getObjectivesForCriteria(IScoreboardCriteria.e);
if (entity instanceof EntityHuman) {
this.a(StatisticList.A, 1);
- collection.addAll(this.getScoreboard().a(IObjective.d));
+ collection.addAll(this.getScoreboard().getObjectivesForCriteria(IScoreboardCriteria.d));
} else {
this.a(StatisticList.z, 1);
}
@@ -390,9 +390,9 @@ public void c(Entity entity, int i) {
while (iterator.hasNext()) {
ScoreboardObjective scoreboardobjective = (ScoreboardObjective) iterator.next();
- ScoreboardScore scoreboardscore = this.getScoreboard().a(this.getLocalizedName(), scoreboardobjective);
+ ScoreboardScore scoreboardscore = this.getScoreboard().getPlayerScoreForObjective(this.getLocalizedName(), scoreboardobjective);
- scoreboardscore.a();
+ scoreboardscore.incrementScore();
}
}
@@ -610,7 +610,7 @@ public boolean a(EntityHuman entityhuman) {
ScoreboardTeam scoreboardteam = this.getScoreboardTeam();
ScoreboardTeam scoreboardteam1 = entityhuman.getScoreboardTeam();
- return scoreboardteam != scoreboardteam1 ? true : (scoreboardteam != null ? scoreboardteam.g() : true);
+ return scoreboardteam != scoreboardteam1 ? true : (scoreboardteam != null ? scoreboardteam.allowFriendlyFire() : true);
}
protected void a(EntityLiving entityliving, boolean flag) {
@@ -1358,10 +1358,10 @@ public Scoreboard getScoreboard() {
}
public ScoreboardTeam getScoreboardTeam() {
- return this.getScoreboard().i(this.name);
+ return this.getScoreboard().getPlayerTeam(this.name);
}
public String getScoreboardDisplayName() {
- return ScoreboardTeam.a(this.getScoreboardTeam(), this.name);
+ return ScoreboardTeam.getPlayerDisplayName(this.getScoreboardTeam(), this.name);
}
}
26 net/minecraft/server/EntityLiving.java
View
@@ -5,6 +5,7 @@
import java.util.Iterator;
import java.util.List;
import java.util.Random;
+import java.util.concurrent.Callable;
public abstract class EntityLiving extends Entity {
@@ -1545,13 +1546,26 @@ protected void bA() {
Integer integer = (Integer) iterator.next();
MobEffect mobeffect = (MobEffect) this.effects.get(integer);
- if (!mobeffect.tick(this)) {
- if (!this.world.isStatic) {
- iterator.remove();
- this.c(mobeffect);
+ try {
+ if (!mobeffect.tick(this)) {
+ if (!this.world.isStatic) {
+ iterator.remove();
+ this.c(mobeffect);
+ }
+ } else if (mobeffect.getDuration() % 600 == 0) {
+ this.b(mobeffect);
}
- } else if (mobeffect.getDuration() % 600 == 0) {
- this.b(mobeffect);
+ } catch (Throwable throwable) {
+ CrashReport crashreport = CrashReport.a(throwable, "Ticking mob effect instance");
+ CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Mob effect being ticked");
+
+ crashreportsystemdetails.a("Effect Name", (Callable) (new CrashReportEffectName(this, mobeffect)));
+ crashreportsystemdetails.a("Effect ID", (Callable) (new CrashReportEffectID(this, mobeffect)));
+ crashreportsystemdetails.a("Effect Duration", (Callable) (new CrashReportEffectDuration(this, mobeffect)));
+ crashreportsystemdetails.a("Effect Amplifier", (Callable) (new CrashReportEffectAmplifier(this, mobeffect)));
+ crashreportsystemdetails.a("Effect is Splash", (Callable) (new CrashReportEffectSplash(this, mobeffect)));
+ crashreportsystemdetails.a("Effect is Ambient", (Callable) (new CrashReportEffectAmbient(this, mobeffect)));
+ throw new ReportedException(crashreport);
}
}
4 net/minecraft/server/EntityMinecartHopper.java
View
@@ -86,13 +86,13 @@ public void l_() {
}
public boolean aD() {
- if (TileEntityHopper.a((IHopper) this)) {
+ if (TileEntityHopper.suckInItems(this)) {
return true;
} else {
List list = this.world.a(EntityItem.class, this.boundingBox.grow(0.25D, 0.0D, 0.25D), IEntitySelector.a);
if (list.size() > 0) {
- TileEntityHopper.a((IInventory) this, (EntityItem) list.get(0));
+ TileEntityHopper.addEntityItem(this, (EntityItem) list.get(0));
}
return false;
10 net/minecraft/server/EntityPlayer.java
View
@@ -148,13 +148,13 @@ public void l_() {
public void setHealth(int i) {
super.setHealth(i);
- Collection collection = this.getScoreboard().a(IObjective.f);
+ Collection collection = this.getScoreboard().getObjectivesForCriteria(IScoreboardCriteria.f);
Iterator iterator = collection.iterator();
while (iterator.hasNext()) {
ScoreboardObjective scoreboardobjective = (ScoreboardObjective) iterator.next();
- this.getScoreboard().a(this.getLocalizedName(), scoreboardobjective).a(Arrays.asList(new EntityHuman[] { this}));
+ this.getScoreboard().getPlayerScoreForObjective(this.getLocalizedName(), scoreboardobjective).updateForList(Arrays.asList(new EntityHuman[] { this}));
}
}
@@ -200,14 +200,14 @@ public void die(DamageSource damagesource) {
this.inventory.m();
}
- Collection collection = this.world.getScoreboard().a(IObjective.c);
+ Collection collection = this.world.getScoreboard().getObjectivesForCriteria(IScoreboardCriteria.c);
Iterator iterator = collection.iterator();
while (iterator.hasNext()) {
ScoreboardObjective scoreboardobjective = (ScoreboardObjective) iterator.next();
- ScoreboardScore scoreboardscore = this.getScoreboard().a(this.getLocalizedName(), scoreboardobjective);
+ ScoreboardScore scoreboardscore = this.getScoreboard().getPlayerScoreForObjective(this.getLocalizedName(), scoreboardobjective);
- scoreboardscore.a();
+ scoreboardscore.incrementScore();
}
EntityLiving entityliving = this.bN();
2  net/minecraft/server/EntitySquid.java
View
@@ -124,7 +124,7 @@ protected void bq() {
++this.bC;
if (this.bC > 100) {
this.bO = this.bP = this.bQ = 0.0F;
- } else if (this.random.nextInt(50) == 0 || !this.ae || this.bO == 0.0F && this.bP == 0.0F && this.bQ == 0.0F) {
+ } else if (this.random.nextInt(50) == 0 || !this.inWater || this.bO == 0.0F && this.bP == 0.0F && this.bQ == 0.0F) {
float f = this.random.nextFloat() * 3.1415927F * 2.0F;
this.bO = MathHelper.cos(f) * 0.2F;
23 net/minecraft/server/EntityTracker.java
View
@@ -96,13 +96,13 @@ public void addEntity(Entity entity, int i, int j, boolean flag) {
try {
if (this.trackedEntities.b(entity.id)) {
throw new IllegalStateException("Entity is already tracked!");
- } else {
- EntityTrackerEntry entitytrackerentry = new EntityTrackerEntry(entity, i, j, flag);
-
- this.b.add(entitytrackerentry);
- this.trackedEntities.a(entity.id, entitytrackerentry);
- entitytrackerentry.scanPlayers(this.world.players);
}
+
+ EntityTrackerEntry entitytrackerentry = new EntityTrackerEntry(entity, i, j, flag);
+
+ this.b.add(entitytrackerentry);
+ this.trackedEntities.a(entity.id, entitytrackerentry);
+ entitytrackerentry.scanPlayers(this.world.players);
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Adding entity to track");
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity To Track");
@@ -110,7 +110,16 @@ public void addEntity(Entity entity, int i, int j, boolean flag) {
crashreportsystemdetails.a("Tracking range", (i + " blocks"));
crashreportsystemdetails.a("Update interval", (Callable) (new CrashReportEntityTrackerUpdateInterval(this, j)));
entity.a(crashreportsystemdetails);
- throw new ReportedException(crashreport);
+ CrashReportSystemDetails crashreportsystemdetails1 = crashreport.a("Entity That Is Already Tracked");
+
+ ((EntityTrackerEntry) this.trackedEntities.get(entity.id)).tracker.a(crashreportsystemdetails1);
+
+ try {
+ throw new ReportedException(crashreport);
+ } catch (ReportedException reportedexception) {
+ System.err.println("\"Silently\" catching entity tracking error.");
+ reportedexception.printStackTrace();
+ }
}
}
22 net/minecraft/server/EntityTrackerEntry.java
View
@@ -114,17 +114,19 @@ public void track(List list) {
boolean flag = Math.abs(j1) >= 4 || Math.abs(k1) >= 4 || Math.abs(l1) >= 4 || this.m % 60 == 0;
boolean flag1 = Math.abs(l - this.yRot) >= 4 || Math.abs(i1 - this.xRot) >= 4;
- if (j1 >= -128 && j1 < 128 && k1 >= -128 && k1 < 128 && l1 >= -128 && l1 < 128 && this.u <= 400 && !this.w) {
- if (flag && flag1) {
- object = new Packet33RelEntityMoveLook(this.tracker.id, (byte) j1, (byte) k1, (byte) l1, (byte) l, (byte) i1);
- } else if (flag) {
- object = new Packet31RelEntityMove(this.tracker.id, (byte) j1, (byte) k1, (byte) l1);
- } else if (flag1) {
- object = new Packet32EntityLook(this.tracker.id, (byte) l, (byte) i1);
+ if (this.m > 0) {
+ if (j1 >= -128 && j1 < 128 && k1 >= -128 && k1 < 128 && l1 >= -128 && l1 < 128 && this.u <= 400 && !this.w) {
+ if (flag && flag1) {
+ object = new Packet33RelEntityMoveLook(this.tracker.id, (byte) j1, (byte) k1, (byte) l1, (byte) l, (byte) i1);
+ } else if (flag) {
+ object = new Packet31RelEntityMove(this.tracker.id, (byte) j1, (byte) k1, (byte) l1);
+ } else if (flag1) {
+ object = new Packet32EntityLook(this.tracker.id, (byte) l, (byte) i1);
+ }
+ } else {
+ this.u = 0;
+ object = new Packet34EntityTeleport(this.tracker.id, i, j, k, (byte) l, (byte) i1);
}
- } else {
- this.u = 0;
- object = new Packet34EntityTeleport(this.tracker.id, i, j, k, (byte) l, (byte) i1);
}
if (this.isMoving) {
3  net/minecraft/server/IEmptyInterface.java
View
@@ -0,0 +1,3 @@
+package net.minecraft.server;
+
+public interface IEmptyInterface {}
22 net/minecraft/server/IObjective.java
View
@@ -1,22 +0,0 @@
-package net.minecraft.server;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public interface IObjective {
-
- Map a = new HashMap();
- IObjective b = new ScoreboardBaseObjective("dummy");
- IObjective c = new ScoreboardBaseObjective("deathCount");
- IObjective d = new ScoreboardBaseObjective("playerKillCount");
- IObjective e = new ScoreboardBaseObjective("totalKillCount");
- IObjective f = new ScoreboardHealthObjective("health");
-
- String a();
-
- int a(List list);
-
- boolean b();
-
-}
22 net/minecraft/server/IScoreboardCriteria.java
View
@@ -0,0 +1,22 @@
+package net.minecraft.server;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public interface IScoreboardCriteria {
+
+ Map a = new HashMap();
+ IScoreboardCriteria b = new ScoreboardBaseCriteria("dummy");
+ IScoreboardCriteria c = new ScoreboardBaseCriteria("deathCount");
+ IScoreboardCriteria d = new ScoreboardBaseCriteria("playerKillCount");
+ IScoreboardCriteria e = new ScoreboardBaseCriteria("totalKillCount");
+ IScoreboardCriteria f = new ScoreboardHealthCriteria("health");
+
+ String getName();
+
+ int getScoreModifier(List list);
+
+ boolean isReadOnly();
+
+}
6 net/minecraft/server/IWorldInventory.java
View
@@ -2,7 +2,9 @@
public interface IWorldInventory extends IInventory {
- int c(int i);
+ int[] getSlotsForFace(int i);
- int d(int i);
+ boolean canPlaceItemThroughFace(int i, ItemStack itemstack, int j);
+
+ boolean canTakeItemThroughFace(int i, ItemStack itemstack, int j);
}
2  net/minecraft/server/MinecraftServer.java
View
@@ -566,7 +566,7 @@ public String w() {
}
public String getVersion() {
- return "1.5";
+ return "1.5.1";
}
public int y() {
4 net/minecraft/server/MobEffect.java
View
@@ -56,6 +56,10 @@ public int getAmplifier() {
return this.amplification;
}
+ public boolean isSplash() {
+ return this.splash;
+ }
+
public void setSplash(boolean flag) {
this.splash = flag;
}
2  net/minecraft/server/MojangStatisticsGenerator.java
View
@@ -48,7 +48,7 @@ private void g() {
this.a("os_version", System.getProperty("os.version"));
this.a("os_architecture", System.getProperty("os.arch"));
this.a("java_version", System.getProperty("java.version"));
- this.a("version", "1.5");
+ this.a("version", "1.5.1");
this.d.b(this);
}
4 net/minecraft/server/Packet206SetScoreboardObjective.java
View
@@ -12,8 +12,8 @@
public Packet206SetScoreboardObjective() {}
public Packet206SetScoreboardObjective(ScoreboardObjective scoreboardobjective, int i) {
- this.a = scoreboardobjective.b();
- this.b = scoreboardobjective.d();
+ this.a = scoreboardobjective.getName();
+ this.b = scoreboardobjective.getDisplayName();
this.c = i;
}
6 net/minecraft/server/Packet207SetScoreboardScore.java
View
@@ -13,9 +13,9 @@
public Packet207SetScoreboardScore() {}
public Packet207SetScoreboardScore(ScoreboardScore scoreboardscore, int i) {
- this.a = scoreboardscore.e();
- this.b = scoreboardscore.d().b();
- this.c = scoreboardscore.c();
+ this.a = scoreboardscore.getPlayerName();
+ this.b = scoreboardscore.getObjective().getName();
+ this.c = scoreboardscore.getScore();
this.d = i;
}
2  net/minecraft/server/Packet208SetScoreboardDisplayObjective.java
View
@@ -15,7 +15,7 @@ public Packet208SetScoreboardDisplayObjective(int i, ScoreboardObjective scorebo
if (scoreboardobjective == null) {
this.b = "";
} else {
- this.b = scoreboardobjective.b();
+ this.b = scoreboardobjective.getName();
}
}
14 net/minecraft/server/Packet209SetScoreboardTeam.java
View
@@ -19,17 +19,17 @@
public Packet209SetScoreboardTeam() {}
public Packet209SetScoreboardTeam(ScoreboardTeam scoreboardteam, int i) {
- this.a = scoreboardteam.b();
+ this.a = scoreboardteam.getName();
this.f = i;
if (i == 0 || i == 2) {
- this.b = scoreboardteam.c();
- this.c = scoreboardteam.e();
- this.d = scoreboardteam.f();
- this.g = scoreboardteam.i();
+ this.b = scoreboardteam.getDisplayName();
+ this.c = scoreboardteam.getPrefix();
+ this.d = scoreboardteam.getSuffix();
+ this.g = scoreboardteam.packOptionData();
}
if (i == 0) {
- this.e.addAll(scoreboardteam.d());
+ this.e.addAll(scoreboardteam.getPlayerNameSet());
}
}
@@ -38,7 +38,7 @@ public Packet209SetScoreboardTeam(ScoreboardTeam scoreboardteam, Collection coll
throw new IllegalArgumentException("Method must be join or leave for player constructor");
} else if (collection != null && !collection.isEmpty()) {
this.f = i;
- this.a = scoreboardteam.b();
+ this.a = scoreboardteam.getName();
this.e.addAll(collection);
} else {
throw new IllegalArgumentException("Players cannot be null/empty");
14 net/minecraft/server/PlayerList.java
View
@@ -92,7 +92,7 @@ public void a(INetworkManager inetworkmanager, EntityPlayer entityplayer) {
protected void a(ScoreboardServer scoreboardserver, EntityPlayer entityplayer) {
HashSet hashset = new HashSet();
- Iterator iterator = scoreboardserver.g().iterator();
+ Iterator iterator = scoreboardserver.getTeams().iterator();
while (iterator.hasNext()) {
ScoreboardTeam scoreboardteam = (ScoreboardTeam) iterator.next();
@@ -101,10 +101,10 @@ protected void a(ScoreboardServer scoreboardserver, EntityPlayer entityplayer) {
}
for (int i = 0; i < 3; ++i) {
- ScoreboardObjective scoreboardobjective = scoreboardserver.a(i);
+ ScoreboardObjective scoreboardobjective = scoreboardserver.getObjectiveForSlot(i);
if (scoreboardobjective != null && !hashset.contains(scoreboardobjective)) {
- List list = scoreboardserver.d(scoreboardobjective);
+ List list = scoreboardserver.getScoreboardScorePacketsForObjective(scoreboardobjective);
Iterator iterator1 = list.iterator();
while (iterator1.hasNext()) {
@@ -521,7 +521,7 @@ public List a(ChunkCoordinates chunkcoordinates, int i, int j, int k, int l, int
}
ScoreboardTeam scoreboardteam = entityplayer.getScoreboardTeam();
- String s2 = scoreboardteam == null ? "" : scoreboardteam.b();
+ String s2 = scoreboardteam == null ? "" : scoreboardteam.getName();
if (flag1 == s1.equalsIgnoreCase(s2)) {
continue;
@@ -580,15 +580,15 @@ private boolean a(EntityHuman entityhuman, Map map) {
}
Scoreboard scoreboard = entityhuman.getScoreboard();
- ScoreboardObjective scoreboardobjective = scoreboard.b(s);
+ ScoreboardObjective scoreboardobjective = scoreboard.getObjective(s);
if (scoreboardobjective == null) {
return false;
}
- ScoreboardScore scoreboardscore = entityhuman.getScoreboard().a(entityhuman.getLocalizedName(), scoreboardobjective);
+ ScoreboardScore scoreboardscore = entityhuman.getScoreboard().getPlayerScoreForObjective(entityhuman.getLocalizedName(), scoreboardobjective);
- i = scoreboardscore.c();
+ i = scoreboardscore.getScore();
if (i < ((Integer) entry.getValue()).intValue() && flag) {
return false;
}
168 net/minecraft/server/Scoreboard.java
View
@@ -10,52 +10,52 @@
public class Scoreboard {
- private final Map a = new HashMap();
- private final Map b = new HashMap();
- private final Map c = new HashMap();
- private final ScoreboardObjective[] d = new ScoreboardObjective[3];
- private final Map e = new HashMap();
- private final Map f = new HashMap();
+ private final Map objectivesByName = new HashMap();
+ private final Map objectivesByCriteria = new HashMap();
+ private final Map playerScores = new HashMap();
+ private final ScoreboardObjective[] displaySlots = new ScoreboardObjective[3];
+ private final Map teamsByName = new HashMap();
+ private final Map teamsByPlayer = new HashMap();
public Scoreboard() {}
- public ScoreboardObjective b(String s) {
- return (ScoreboardObjective) this.a.get(s);
+ public ScoreboardObjective getObjective(String s) {
+ return (ScoreboardObjective) this.objectivesByName.get(s);
}
- public ScoreboardObjective a(String s, IObjective iobjective) {
- ScoreboardObjective scoreboardobjective = this.b(s);
+ public ScoreboardObjective registerObjective(String s, IScoreboardCriteria iscoreboardcriteria) {
+ ScoreboardObjective scoreboardobjective = this.getObjective(s);
if (scoreboardobjective != null) {
throw new IllegalArgumentException("An objective with the name \'" + s + "\' already exists!");
} else {
- scoreboardobjective = new ScoreboardObjective(this, s, iobjective);
- Object object = (List) this.b.get(iobjective);
+ scoreboardobjective = new ScoreboardObjective(this, s, iscoreboardcriteria);
+ Object object = (List) this.objectivesByCriteria.get(iscoreboardcriteria);
if (object == null) {
object = new ArrayList();
- this.b.put(iobjective, object);
+ this.objectivesByCriteria.put(iscoreboardcriteria, object);
}
((List) object).add(scoreboardobjective);
- this.a.put(s, scoreboardobjective);
- this.a(scoreboardobjective);
+ this.objectivesByName.put(s, scoreboardobjective);
+ this.handleObjectiveAdded(scoreboardobjective);
return scoreboardobjective;
}
}
- public Collection a(IObjective iobjective) {
- Collection collection = (Collection) this.b.get(iobjective);
+ public Collection getObjectivesForCriteria(IScoreboardCriteria iscoreboardcriteria) {
+ Collection collection = (Collection) this.objectivesByCriteria.get(iscoreboardcriteria);
return collection == null ? new ArrayList() : new ArrayList(collection);
}
- public ScoreboardScore a(String s, ScoreboardObjective scoreboardobjective) {
- Object object = (Map) this.c.get(s);
+ public ScoreboardScore getPlayerScoreForObjective(String s, ScoreboardObjective scoreboardobjective) {
+ Object object = (Map) this.playerScores.get(s);
if (object == null) {
object = new HashMap();
- this.c.put(s, object);
+ this.playerScores.put(s, object);
}
ScoreboardScore scoreboardscore = (ScoreboardScore) ((Map) object).get(scoreboardobjective);
@@ -68,9 +68,9 @@ public ScoreboardScore a(String s, ScoreboardObjective scoreboardobjective) {
return scoreboardscore;
}
- public Collection i(ScoreboardObjective scoreboardobjective) {
+ public Collection getScoresForObjective(ScoreboardObjective scoreboardobjective) {
ArrayList arraylist = new ArrayList();
- Iterator iterator = this.c.values().iterator();
+ Iterator iterator = this.playerScores.values().iterator();
while (iterator.hasNext()) {
Map map = (Map) iterator.next();
@@ -85,24 +85,24 @@ public Collection i(ScoreboardObjective scoreboardobjective) {
return arraylist;
}
- public Collection c() {
- return this.a.values();
+ public Collection getObjectives() {
+ return this.objectivesByName.values();
}
- public Collection d() {
- return this.c.keySet();
+ public Collection getPlayers() {
+ return this.playerScores.keySet();
}
- public void c(String s) {
- Map map = (Map) this.c.remove(s);
+ public void resetPlayerScores(String s) {
+ Map map = (Map) this.playerScores.remove(s);
if (map != null) {
- this.a(s);
+ this.handlePlayerRemoved(s);
}
}
- public Collection e() {
- Collection collection = this.c.values();
+ public Collection getScores() {
+ Collection collection = this.playerScores.values();
ArrayList arraylist = new ArrayList();
if (collection != null) {
@@ -118,8 +118,8 @@ public Collection e() {
return arraylist;
}
- public Map d(String s) {
- Object object = (Map) this.c.get(s);
+ public Map getPlayerObjectives(String s) {
+ Object object = (Map) this.playerScores.get(s);
if (object == null) {
object = new HashMap();
@@ -128,22 +128,22 @@ public Map d(String s) {
return (Map) object;
}
- public void k(ScoreboardObjective scoreboardobjective) {
- this.a.remove(scoreboardobjective.b());
+ public void unregisterObjective(ScoreboardObjective scoreboardobjective) {
+ this.objectivesByName.remove(scoreboardobjective.getName());
for (int i = 0; i < 3; ++i) {
- if (this.a(i) == scoreboardobjective) {
- this.a(i, (ScoreboardObjective) null);
+ if (this.getObjectiveForSlot(i) == scoreboardobjective) {
+ this.setDisplaySlot(i, (ScoreboardObjective) null);
}
}
- List list = (List) this.b.get(scoreboardobjective.c());
+ List list = (List) this.objectivesByCriteria.get(scoreboardobjective.getCriteria());
if (list != null) {
list.remove(scoreboardobjective);
}
- Iterator iterator = this.c.values().iterator();
+ Iterator iterator = this.playerScores.values().iterator();
while (iterator.hasNext()) {
Map map = (Map) iterator.next();
@@ -151,105 +151,105 @@ public void k(ScoreboardObjective scoreboardobjective) {
map.remove(scoreboardobjective);
}
- this.c(scoreboardobjective);
+ this.handleObjectiveRemoved(scoreboardobjective);
}
- public void a(int i, ScoreboardObjective scoreboardobjective) {
- this.d[i] = scoreboardobjective;
+ public void setDisplaySlot(int i, ScoreboardObjective scoreboardobjective) {
+ this.displaySlots[i] = scoreboardobjective;
}
- public ScoreboardObjective a(int i) {
- return this.d[i];
+ public ScoreboardObjective getObjectiveForSlot(int i) {
+ return this.displaySlots[i];
}
- public ScoreboardTeam e(String s) {
- return (ScoreboardTeam) this.e.get(s);
+ public ScoreboardTeam getTeam(String s) {
+ return (ScoreboardTeam) this.teamsByName.get(s);
}
- public ScoreboardTeam f(String s) {
- ScoreboardTeam scoreboardteam = this.e(s);
+ public ScoreboardTeam createTeam(String s) {
+ ScoreboardTeam scoreboardteam = this.getTeam(s);
if (scoreboardteam != null) {
throw new IllegalArgumentException("An objective with the name \'" + s + "\' already exists!");
} else {
scoreboardteam = new ScoreboardTeam(this, s);
- this.e.put(s, scoreboardteam);
- this.a(scoreboardteam);
+ this.teamsByName.put(s, scoreboardteam);
+ this.handleTeamAdded(scoreboardteam);
return scoreboardteam;
}
}
- public void d(ScoreboardTeam scoreboardteam) {
- this.e.remove(scoreboardteam.b());
- Iterator iterator = scoreboardteam.d().iterator();
+ public void removeTeam(ScoreboardTeam scoreboardteam) {
+ this.teamsByName.remove(scoreboardteam.getName());
+ Iterator iterator = scoreboardteam.getPlayerNameSet().iterator();
while (iterator.hasNext()) {
String s = (String) iterator.next();
- this.f.remove(s);
+ this.teamsByPlayer.remove(s);
}
- this.c(scoreboardteam);
+ this.handleTeamRemoved(scoreboardteam);
}
- public void a(String s, ScoreboardTeam scoreboardteam) {
- if (this.i(s) != null) {
- this.g(s);
+ public void addPlayerToTeam(String s, ScoreboardTeam scoreboardteam) {
+ if (this.getPlayerTeam(s) != null) {
+ this.removePlayerFromTeam(s);
}
- this.f.put(s, scoreboardteam);
- scoreboardteam.d().add(s);
+ this.teamsByPlayer.put(s, scoreboardteam);
+ scoreboardteam.getPlayerNameSet().add(s);
}
- public boolean g(String s) {
- ScoreboardTeam scoreboardteam = this.i(s);
+ public boolean removePlayerFromTeam(String s) {
+ ScoreboardTeam scoreboardteam = this.getPlayerTeam(s);
if (scoreboardteam != null) {
- this.b(s, scoreboardteam);
+ this.removePlayerFromTeam(s, scoreboardteam);
return true;
} else {
return false;
}
}
- public void b(String s, ScoreboardTeam scoreboardteam) {
- if (this.i(s) != scoreboardteam) {
- throw new IllegalStateException("Player is either on another team or not on any team. Cannot remove from team \'" + scoreboardteam.b() + "\'.");
+ public void removePlayerFromTeam(String s, ScoreboardTeam scoreboardteam) {
+ if (this.getPlayerTeam(s) != scoreboardteam) {
+ throw new IllegalStateException("Player is either on another team or not on any team. Cannot remove from team \'" + scoreboardteam.getName() + "\'.");
} else {
- this.f.remove(s);
- scoreboardteam.d().remove(s);
+ this.teamsByPlayer.remove(s);
+ scoreboardteam.getPlayerNameSet().remove(s);
}
}
- public Collection f() {
- return this.e.keySet();
+ public Collection getTeamNames() {
+ return this.teamsByName.keySet();
}
- public Collection g() {
- return this.e.values();
+ public Collection getTeams() {
+ return this.teamsByName.values();
}
- public ScoreboardTeam i(String s) {
- return (ScoreboardTeam) this.f.get(s);
+ public ScoreboardTeam getPlayerTeam(String s) {
+ return (ScoreboardTeam) this.teamsByPlayer.get(s);
}
- public void a(ScoreboardObjective scoreboardobjective) {}
+ public void handleObjectiveAdded(ScoreboardObjective scoreboardobjective) {}
- public void b(ScoreboardObjective scoreboardobjective) {}
+ public void handleObjectiveChanged(ScoreboardObjective scoreboardobjective) {}
- public void c(ScoreboardObjective scoreboardobjective) {}
+ public void handleObjectiveRemoved(ScoreboardObjective scoreboardobjective) {}
- public void a(ScoreboardScore scoreboardscore) {}
+ public void handleScoreChanged(ScoreboardScore scoreboardscore) {}
- public void a(String s) {}
+ public void handlePlayerRemoved(String s) {}
- public void a(ScoreboardTeam scoreboardteam) {}
+ public void handleTeamAdded(ScoreboardTeam scoreboardteam) {}
- public void b(ScoreboardTeam scoreboardteam) {}
+ public void handleTeamChanged(ScoreboardTeam scoreboardteam) {}
- public void c(ScoreboardTeam scoreboardteam) {}
+ public void handleTeamRemoved(ScoreboardTeam scoreboardteam) {}
- public static String b(int i) {
+ public static String getSlotName(int i) {
switch (i) {
case 0:
return "list";
@@ -265,7 +265,7 @@ public static String b(int i) {
}
}
- public static int j(String s) {
+ public static int getSlotForName(String s) {
return s.equalsIgnoreCase("list") ? 0 : (s.equalsIgnoreCase("sidebar") ? 1 : (s.equalsIgnoreCase("belowName") ? 2 : -1));
}
}
25 net/minecraft/server/ScoreboardBaseCriteria.java
View
@@ -0,0 +1,25 @@
+package net.minecraft.server;
+
+import java.util.List;
+
+public class ScoreboardBaseCriteria implements IScoreboardCriteria {
+
+ private final String g;
+
+ public ScoreboardBaseCriteria(String s) {
+ this.g = s;
+ IScoreboardCriteria.a.put(s, this);
+ }
+
+ public String getName() {
+ return this.g;
+ }
+
+ public int getScoreModifier(List list) {
+ return 0;
+ }
+
+ public boolean isReadOnly() {
+ return false;
+ }
+}
25 net/minecraft/server/ScoreboardBaseObjective.java
View
@@ -1,25 +0,0 @@
-package net.minecraft.server;
-
-import java.util.List;
-
-public class ScoreboardBaseObjective implements IObjective {
-
- private final String g;
-
- public ScoreboardBaseObjective(String s) {
- this.g = s;
- IObjective.a.put(s, this);
- }
-
- public String a() {
- return this.g;
- }
-
- public int a(List list) {
- return 0;
- }
-
- public boolean b() {
- return false;
- }
-}
2  net/minecraft/server/ScoreboardComparator.java
View
@@ -7,7 +7,7 @@
ScoreboardComparator() {}
public int a(ScoreboardScore scoreboardscore, ScoreboardScore scoreboardscore1) {
- return scoreboardscore.c() > scoreboardscore1.c() ? 1 : (scoreboardscore.c() < scoreboardscore1.c() ? -1 : 0);
+ return scoreboardscore.getScore() > scoreboardscore1.getScore() ? 1 : (scoreboardscore.getScore() < scoreboardscore1.getScore() ? -1 : 0);
}
public int compare(Object object, Object object1) {
8 net/minecraft/server/ScoreboardHealthObjective.java → net/minecraft/server/ScoreboardHealthCriteria.java
View
@@ -3,13 +3,13 @@
import java.util.Iterator;
import java.util.List;
-public class ScoreboardHealthObjective extends ScoreboardBaseObjective {
+public class ScoreboardHealthCriteria extends ScoreboardBaseCriteria {
- public ScoreboardHealthObjective(String s) {
+ public ScoreboardHealthCriteria(String s) {
super(s);
}
- public int a(List list) {
+ public int getScoreModifier(List list) {
float f = 0.0F;
int i;
@@ -36,7 +36,7 @@ public int a(List list) {
return MathHelper.d(f * 19.0F) + (f > 0.0F ? 1 : 0);
}
- public boolean b() {
+ public boolean isReadOnly() {
return true;
}
}
16 net/minecraft/server/ScoreboardObjective.java
View
@@ -4,30 +4,30 @@
private final Scoreboard a;
private final String b;
- private final IObjective c;
+ private final IScoreboardCriteria c;
private String d;
- public ScoreboardObjective(Scoreboard scoreboard, String s, IObjective iobjective) {
+ public ScoreboardObjective(Scoreboard scoreboard, String s, IScoreboardCriteria iscoreboardcriteria) {
this.a = scoreboard;
this.b = s;
- this.c = iobjective;
+ this.c = iscoreboardcriteria;
this.d = s;
}
- public String b() {
+ public String getName() {
return this.b;
}
- public IObjective c() {
+ public IScoreboardCriteria getCriteria() {
return this.c;
}
- public String d() {
+ public String getDisplayName() {
return this.d;
}
- public void a(String s) {
+ public void setDisplayName(String s) {
this.d = s;
- this.a.b(this);
+ this.a.handleObjectiveChanged(this);
}
}
66 net/minecraft/server/ScoreboardSaveData.java
View
@@ -42,17 +42,17 @@ public void a(NBTTagCompound nbttagcompound) {
protected void a(NBTTagList nbttaglist) {
for (int i = 0; i < nbttaglist.size(); ++i) {
NBTTagCompound nbttagcompound = (NBTTagCompound) nbttaglist.get(i);
- ScoreboardTeam scoreboardteam = this.a.f(nbttagcompound.getString("Name"));
+ ScoreboardTeam scoreboardteam = this.a.createTeam(nbttagcompound.getString("Name"));
- scoreboardteam.a(nbttagcompound.getString("DisplayName"));
- scoreboardteam.b(nbttagcompound.getString("Prefix"));
- scoreboardteam.c(nbttagcompound.getString("Suffix"));
+ scoreboardteam.setDisplayName(nbttagcompound.getString("DisplayName"));
+ scoreboardteam.setPrefix(nbttagcompound.getString("Prefix"));
+ scoreboardteam.setSuffix(nbttagcompound.getString("Suffix"));
if (nbttagcompound.hasKey("AllowFriendlyFire")) {
- scoreboardteam.a(nbttagcompound.getBoolean("AllowFriendlyFire"));
+ scoreboardteam.setAllowFriendlyFire(nbttagcompound.getBoolean("AllowFriendlyFire"));
}
if (nbttagcompound.hasKey("SeeFriendlyInvisibles")) {
- scoreboardteam.b(nbttagcompound.getBoolean("SeeFriendlyInvisibles"));
+ scoreboardteam.setCanSeeFriendlyInvisibles(nbttagcompound.getBoolean("SeeFriendlyInvisibles"));
}
this.a(scoreboardteam, nbttagcompound.getList("Players"));
@@ -61,7 +61,7 @@ protected void a(NBTTagList nbttaglist) {
protected void a(ScoreboardTeam scoreboardteam, NBTTagList nbttaglist) {
for (int i = 0; i < nbttaglist.size(); ++i) {
- this.a.a(((NBTTagString) nbttaglist.get(i)).data, scoreboardteam);
+ this.a.addPlayerToTeam(((NBTTagString) nbttaglist.get(i)).data, scoreboardteam);
}
}
@@ -69,9 +69,9 @@ protected void c(NBTTagCompound nbttagcompound) {
for (int i = 0; i < 3; ++i) {
if (nbttagcompound.hasKey("slot_" + i)) {
String s = nbttagcompound.getString("slot_" + i);
- ScoreboardObjective scoreboardobjective = this.a.b(s);
+ ScoreboardObjective scoreboardobjective = this.a.getObjective(s);
- this.a.a(i, scoreboardobjective);
+ this.a.setDisplaySlot(i, scoreboardobjective);
}
}
}
@@ -79,20 +79,20 @@ protected void c(NBTTagCompound nbttagcompound) {
protected void b(NBTTagList nbttaglist) {
for (int i = 0; i < nbttaglist.size(); ++i) {
NBTTagCompound nbttagcompound = (NBTTagCompound) nbttaglist.get(i);
- IObjective iobjective = (IObjective) IObjective.a.get(nbttagcompound.getString("CriteriaName"));
- ScoreboardObjective scoreboardobjective = this.a.a(nbttagcompound.getString("Name"), iobjective);
+ IScoreboardCriteria iscoreboardcriteria = (IScoreboardCriteria) IScoreboardCriteria.a.get(nbttagcompound.getString("CriteriaName"));
+ ScoreboardObjective scoreboardobjective = this.a.registerObjective(nbttagcompound.getString("Name"), iscoreboardcriteria);
- scoreboardobjective.a(nbttagcompound.getString("DisplayName"));
+ scoreboardobjective.setDisplayName(nbttagcompound.getString("DisplayName"));
}
}
protected void c(NBTTagList nbttaglist) {
for (int i = 0; i < nbttaglist.size(); ++i) {
NBTTagCompound nbttagcompound = (NBTTagCompound) nbttaglist.get(i);
- ScoreboardObjective scoreboardobjective = this.a.b(nbttagcompound.getString("Objective"));
- ScoreboardScore scoreboardscore = this.a.a(nbttagcompound.getString("Name"), scoreboardobjective);
+ ScoreboardObjective scoreboardobjective = this.a.getObjective(nbttagcompound.getString("Objective"));
+ ScoreboardScore scoreboardscore = this.a.getPlayerScoreForObjective(nbttagcompound.getString("Name"), scoreboardobjective);
- scoreboardscore.c(nbttagcompound.getInt("Score"));
+ scoreboardscore.setScore(nbttagcompound.getInt("Score"));
}
}
@@ -109,21 +109,21 @@ public void b(NBTTagCompound nbttagcompound) {
protected NBTTagList a() {
NBTTagList nbttaglist = new NBTTagList();
- Collection collection = this.a.g();
+ Collection collection = this.a.getTeams();
Iterator iterator = collection.iterator();
while (iterator.hasNext()) {
ScoreboardTeam scoreboardteam = (ScoreboardTeam) iterator.next();
NBTTagCompound nbttagcompound = new NBTTagCompound();
- nbttagcompound.setString("Name", scoreboardteam.b());
- nbttagcompound.setString("DisplayName", scoreboardteam.c());
- nbttagcompound.setString("Prefix", scoreboardteam.e());
- nbttagcompound.setString("Suffix", scoreboardteam.f());
- nbttagcompound.setBoolean("AllowFriendlyFire", scoreboardteam.g());
- nbttagcompound.setBoolean("SeeFriendlyInvisibles", scoreboardteam.h());
+ nbttagcompound.setString("Name", scoreboardteam.getName());
+ nbttagcompound.setString("DisplayName", scoreboardteam.getDisplayName());
+ nbttagcompound.setString("Prefix", scoreboardteam.getPrefix());
+ nbttagcompound.setString("Suffix", scoreboardteam.getSuffix());
+ nbttagcompound.setBoolean("AllowFriendlyFire", scoreboardteam.allowFriendlyFire());
+ nbttagcompound.setBoolean("SeeFriendlyInvisibles", scoreboardteam.canSeeFriendlyInvisibles());
NBTTagList nbttaglist1 = new NBTTagList();
- Iterator iterator1 = scoreboardteam.d().iterator();
+ Iterator iterator1 = scoreboardteam.getPlayerNameSet().iterator();
while (iterator1.hasNext()) {
String s = (String) iterator1.next();
@@ -143,10 +143,10 @@ protected void d(NBTTagCompound nbttagcompound) {
boolean flag = false;
for (int i = 0; i < 3; ++i) {
- ScoreboardObjective scoreboardobjective = this.a.a(i);
+ ScoreboardObjective scoreboardobjective = this.a.getObjectiveForSlot(i);
if (scoreboardobjective != null) {
- nbttagcompound1.setString("slot_" + i, scoreboardobjective.b());
+ nbttagcompound1.setString("slot_" + i, scoreboardobjective.getName());
flag = true;
}
}
@@ -158,16 +158,16 @@ protected void d(NBTTagCompound nbttagcompound) {
protected NBTTagList b() {
NBTTagList nbttaglist = new NBTTagList();
- Collection collection = this.a.c();
+ Collection collection = this.a.getObjectives();
Iterator iterator = collection.iterator();
while (iterator.hasNext()) {
ScoreboardObjective scoreboardobjective = (ScoreboardObjective) iterator.next();
NBTTagCompound nbttagcompound = new NBTTagCompound();
- nbttagcompound.setString("Name", scoreboardobjective.b());
- nbttagcompound.setString("CriteriaName", scoreboardobjective.c().a());
- nbttagcompound.setString("DisplayName", scoreboardobjective.d());
+ nbttagcompound.setString("Name", scoreboardobjective.getName());
+ nbttagcompound.setString("CriteriaName", scoreboardobjective.getCriteria().getName());
+ nbttagcompound.setString("DisplayName", scoreboardobjective.getDisplayName());
nbttaglist.add(nbttagcompound);
}
@@ -176,16 +176,16 @@ protected NBTTagList b() {
protected NBTTagList e() {
NBTTagList nbttaglist = new NBTTagList();
- Collection collection = this.a.e();
+ Collection collection = this.a.getScores();
Iterator iterator = collection.iterator();
while (iterator.hasNext()) {
ScoreboardScore scoreboardscore = (ScoreboardScore) iterator.next();
NBTTagCompound nbttagcompound = new NBTTagCompound();
- nbttagcompound.setString("Name", scoreboardscore.e());
- nbttagcompound.setString("Objective", scoreboardscore.d().b());
- nbttagcompound.setInt("Score", scoreboardscore.c());
+ nbttagcompound.setString("Name", scoreboardscore.getPlayerName());
+ nbttagcompound.setString("Objective", scoreboardscore.getObjective().getName());
+ nbttagcompound.setInt("Score", scoreboardscore.getScore());
nbttaglist.add(nbttagcompound);
}
46 net/minecraft/server/ScoreboardScore.java
View
@@ -8,65 +8,65 @@
public static final Comparator a = new ScoreboardComparator();
private final Scoreboard b;
private final ScoreboardObjective c;
- private final String d;
- private int