mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 03:49:29 +00:00
33 lines
918 B
Java
33 lines
918 B
Java
package tconstruct.achievements;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import net.minecraft.stats.Achievement;
|
|
import net.minecraft.util.StatCollector;
|
|
import net.minecraftforge.common.AchievementPage;
|
|
|
|
public class TAchievements
|
|
{
|
|
|
|
// Add achievements in here before the load executes(end of TC's init event)
|
|
public static HashMap<String, Achievement> achievements = new HashMap<String, Achievement>();
|
|
|
|
// Warning: Will be null until after the init stage
|
|
public static AchievementPage achievementPage = null;
|
|
|
|
public static void init ()
|
|
{
|
|
Achievement[] achs = achievements.values().toArray(new Achievement[0]);
|
|
|
|
for (Achievement a : achs)
|
|
{
|
|
a.registerStat();
|
|
}
|
|
|
|
achievementPage = new AchievementPage(StatCollector.translateToLocal("tconstruct.achievementPage.name"), achs);
|
|
|
|
AchievementPage.registerAchievementPage(achievementPage);
|
|
}
|
|
|
|
}
|