Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
1package net.minecraft.server;
2
3public class Achievement extends Statistic {
4
5 public final int a;
6 public final int b;
7 public final Achievement c;
8 private final String l;
9 public final ItemStack d;
10 private boolean m;
11
12 public Achievement(int i, String s, int j, int k, Item item, Achievement achievement) {
13 this(i, s, j, k, new ItemStack(item), achievement);
14 }
15
16 public Achievement(int i, String s, int j, int k, Block block, Achievement achievement) {
17 this(i, s, j, k, new ItemStack(block), achievement);
18 }
19
20 public Achievement(int i, String s, int j, int k, ItemStack itemstack, Achievement achievement) {
21 super(5242880 + i, StatisticCollector.a("achievement." + s));
22 this.d = itemstack;
23 this.l = StatisticCollector.a("achievement." + s + ".desc");
24 this.a = j;
25 this.b = k;
26 if (j < AchievementList.a) {
27 AchievementList.a = j;
28 }
29
30 if (k < AchievementList.b) {
31 AchievementList.b = k;
32 }
33
34 if (j > AchievementList.c) {
35 AchievementList.c = j;
36 }
37
38 if (k > AchievementList.d) {
39 AchievementList.d = k;
40 }
41
42 this.c = achievement;
43 }
44
45 public Achievement a() {
46 this.g = true;
47 return this;
48 }
49
50 public Achievement b() {
51 this.m = true;
52 return this;
53 }
54
55 public Achievement c() {
56 super.d();
57 AchievementList.e.add(this);
58 return this;
59 }
60}