use of net.minecraft.achievement.Achievement in project StationAPI by ModificationStation.
the class AchievementListener method registerAchievements.
@EventListener
public void registerAchievements(AchievementRegisterEvent event) {
testAchievementPage = new AchievementPageTest(SLTest.MODID, "testPage");
testAchievement = new Achievement(69696969, "sltest:testAchievement", 0, 0, ItemListener.testItem, null);
testAchievementChild = new Achievement(69696970, "sltest:testAchievementChild", 0, 2, ItemBase.goldenApple, testAchievement);
event.achievements.add(testAchievement);
event.achievements.add(testAchievementChild);
testAchievementPage.addAchievements(testAchievement, testAchievementChild);
}
use of net.minecraft.achievement.Achievement in project StationAPI by ModificationStation.
the class AchievementPageImpl method registerAchievements.
@EventListener(priority = ListenerPriority.HIGH)
private static void registerAchievements(AchievementRegisterEvent event) {
AchievementPage page = new AchievementPage(MODID, "minecraft");
List<Achievement> list = new ArrayList<>();
for (Object o : Achievements.ACHIEVEMENTS) list.add((Achievement) o);
page.addAchievements(list.toArray(new Achievement[0]));
}
Aggregations