package com.yolp900.itsjustacharm.common.avchievemetns;
import com.yolp900.itsjustacharm.api.IJCConstants;
import net.minecraft.stats.Achievement;
import net.minecraftforge.common.AchievementPage;
import java.util.ArrayList;
import java.util.List;
public class AchievementHandler {
public static AchievementPage modPage;
public static int pageIndex;
public static List<Achievement> achievements = new ArrayList<Achievement>();
public static void registerAchievements() {
for (ModAchievements achievement : ModAchievements.values()) {
registerAchievement(achievement.getAchievement());
}
pageIndex = AchievementPage.getAchievementPages().size();
modPage = new AchievementPage(IJCConstants.MOD_NAME, achievements.toArray(new Achievement[achievements.size()]));
AchievementPage.registerAchievementPage(modPage);
}
public static void registerAchievement(Achievement achievement) {
achievements.add(achievement);
achievement.registerStat();
}
}