2015-08-29 14:33:25 +02:00
|
|
|
/*
|
|
|
|
* This file ("InitAchievements.java") is part of the Actually Additions Mod for Minecraft.
|
|
|
|
* It is created and owned by Ellpeck and distributed
|
|
|
|
* under the Actually Additions License to be found at
|
|
|
|
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
|
|
|
|
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
|
|
|
*
|
2015-11-02 20:55:19 +01:00
|
|
|
* © 2015 Ellpeck
|
2015-08-29 14:33:25 +02:00
|
|
|
*/
|
|
|
|
|
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;
|
2015-08-01 00:40:29 +02:00
|
|
|
import ellpeck.actuallyadditions.util.StringUtil;
|
2015-04-19 01:50:02 +02:00
|
|
|
import net.minecraft.stats.Achievement;
|
|
|
|
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-08-28 21:17:09 +02:00
|
|
|
public static int pageNumber;
|
|
|
|
|
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-08-01 00:40:29 +02:00
|
|
|
theAchievementPage = new AchievementPage(StringUtil.localize("achievement.page."+ModUtil.MOD_ID_LOWER), achievementList.toArray(new Achievement[achievementList.size()]));
|
2015-08-28 21:17:09 +02:00
|
|
|
pageNumber = AchievementPage.getAchievementPages().size();
|
2015-04-19 01:50:02 +02:00
|
|
|
AchievementPage.registerAchievementPage(theAchievementPage);
|
2015-03-07 12:51:28 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|