2015-03-07 12:51:28 +01:00
|
|
|
package ellpeck.actuallyadditions.achievement;
|
|
|
|
|
2015-04-19 01:50:02 +02:00
|
|
|
import ellpeck.actuallyadditions.util.ModUtil;
|
|
|
|
import net.minecraft.stats.Achievement;
|
|
|
|
import net.minecraft.util.StatCollector;
|
|
|
|
import net.minecraftforge.common.AchievementPage;
|
2015-03-07 12:51:28 +01:00
|
|
|
|
2015-04-19 01:50:02 +02:00
|
|
|
import java.util.ArrayList;
|
2015-03-07 12:51:28 +01:00
|
|
|
|
2015-04-19 01:50:02 +02:00
|
|
|
public class InitAchievements{
|
2015-03-07 12:51:28 +01:00
|
|
|
|
2015-07-10 21:19:52 +02:00
|
|
|
public static final int MISC_ACH = -1;
|
2015-04-19 01:50:02 +02:00
|
|
|
public static final int CRAFTING_ACH = 0;
|
|
|
|
public static final int SMELTING_ACH = 1;
|
|
|
|
public static final int PICKUP_ACH = 2;
|
2015-03-07 12:51:28 +01:00
|
|
|
|
2015-04-19 01:50:02 +02:00
|
|
|
public static AchievementPage theAchievementPage;
|
|
|
|
public static ArrayList<Achievement> achievementList = new ArrayList<Achievement>();
|
2015-03-07 12:51:28 +01:00
|
|
|
|
|
|
|
public static void init(){
|
2015-07-01 21:32:48 +02:00
|
|
|
ModUtil.LOGGER.info("Initializing Achievements...");
|
2015-03-07 12:51:28 +01:00
|
|
|
|
2015-04-19 01:50:02 +02:00
|
|
|
for(int i = 0; i < TheAchievements.values().length; i++){
|
|
|
|
achievementList.add(TheAchievements.values()[i].ach);
|
|
|
|
}
|
2015-03-07 12:51:28 +01:00
|
|
|
|
2015-03-29 15:29:05 +02:00
|
|
|
theAchievementPage = new AchievementPage(StatCollector.translateToLocal("achievement.page." + ModUtil.MOD_ID_LOWER), achievementList.toArray(new Achievement[achievementList.size()]));
|
2015-04-19 01:50:02 +02:00
|
|
|
AchievementPage.registerAchievementPage(theAchievementPage);
|
2015-03-07 12:51:28 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|