
net.minecraft.server.Achievement Maven / Gradle / Ivy
package net.minecraft.server;
public class Achievement extends Statistic {
public final int a;
public final int b;
public final Achievement c;
private final String k;
public final ItemStack d;
private boolean m;
public Achievement(String s, String s1, int i, int j, Item item, Achievement achievement) {
this(s, s1, i, j, new ItemStack(item), achievement);
}
public Achievement(String s, String s1, int i, int j, Block block, Achievement achievement) {
this(s, s1, i, j, new ItemStack(block), achievement);
}
public Achievement(String s, String s1, int i, int j, ItemStack itemstack, Achievement achievement) {
super(s, new ChatMessage("achievement." + s1));
this.d = itemstack;
this.k = "achievement." + s1 + ".desc";
int a1;
int b1;
a1 = i;
b1 = j;
if (i < AchievementList.a) {
a1 = i;
}
this.a = a1;
if (j < AchievementList.b) {
b1 = j;
}
this.b = b1;
if (i > AchievementList.c) {
AchievementList.c = i;
}
if (j > AchievementList.d) {
AchievementList.d = j;
}
this.c = achievement;
}
public Achievement a() {
this.f = true;
return this;
}
public Achievement b() {
this.m = true;
return this;
}
public Achievement c() {
super.h();
AchievementList.e.add(this);
return this;
}
public boolean d() {
return true;
}
public IChatBaseComponent e() {
IChatBaseComponent ichatbasecomponent = super.e();
ichatbasecomponent.getChatModifier().setColor(this.g() ? EnumChatFormat.DARK_PURPLE : EnumChatFormat.GREEN);
return ichatbasecomponent;
}
public Achievement a(Class extends IJsonStatistic> oclass) {
return (Achievement) super.b(oclass);
}
public boolean g() {
return this.m;
}
public Statistic b(Class oclass) {
return this.a(oclass);
}
public Statistic h() {
return this.c();
}
public Statistic i() {
return this.a();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy