2015-08-29 14:33:25 +02:00
|
|
|
/*
|
2016-05-16 22:52:27 +02:00
|
|
|
* This file ("InitAchievements.java") is part of the Actually Additions mod for Minecraft.
|
2015-08-29 14:33:25 +02:00
|
|
|
* It is created and owned by Ellpeck and distributed
|
|
|
|
* under the Actually Additions License to be found at
|
2016-05-16 22:52:27 +02:00
|
|
|
* http://ellpeck.de/actaddlicense
|
2015-08-29 14:33:25 +02:00
|
|
|
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
|
|
|
*
|
2016-05-16 22:52:27 +02:00
|
|
|
* © 2015-2016 Ellpeck Ellpeck
|
2015-08-29 14:33:25 +02:00
|
|
|
*/
|
|
|
|
|
2016-01-05 04:47:35 +01:00
|
|
|
package de.ellpeck.actuallyadditions.mod.achievement;
|
2015-03-07 12:51:28 +01:00
|
|
|
|
2016-01-05 04:47:35 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
|
|
|
import de.ellpeck.actuallyadditions.mod.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-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
|
|
|
|
2016-04-20 21:39:03 +02:00
|
|
|
theAchievementPage = new AchievementPage(StringUtil.localize("achievement.page."+ModUtil.MOD_ID), 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
|
|
|
}
|
|
|
|
|
2015-12-19 10:30:39 +01:00
|
|
|
public enum Type{
|
|
|
|
CRAFTING,
|
|
|
|
SMELTING,
|
|
|
|
PICK_UP,
|
|
|
|
MISC
|
|
|
|
}
|
|
|
|
|
2015-03-07 12:51:28 +01:00
|
|
|
}
|