ActuallyAdditions/src/main/java/ellpeck/actuallyadditions/achievement/TheAchievements.java

41 lines
1.8 KiB
Java
Raw Normal View History

2015-08-29 14:33:25 +02:00
/*
* This file ("TheAchievements.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-04-19 01:50:02 +02:00
package ellpeck.actuallyadditions.achievement;
import ellpeck.actuallyadditions.blocks.InitBlocks;
import ellpeck.actuallyadditions.items.InitItems;
import ellpeck.actuallyadditions.util.ModUtil;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.Achievement;
public enum TheAchievements{
OPEN_BOOKLET("openBooklet", 0, 0, new ItemStack(InitItems.itemBooklet), null, InitAchievements.MISC_ACH),
2015-11-13 20:34:57 +01:00
NAME_SMILEY_CLOUD("nameSmileyCloud", 2, 0, new ItemStack(InitBlocks.blockSmileyCloud), OPEN_BOOKLET.ach, InitAchievements.MISC_ACH),
CRAFT_PHANTOMFACE("craftPhantomface", -2, 0, new ItemStack(InitBlocks.blockPhantomface), OPEN_BOOKLET.ach),
OPEN_TREASURE_CHEST("openTreasureChest", 0, -2, new ItemStack(InitBlocks.blockTreasureChest), OPEN_BOOKLET.ach, InitAchievements.MISC_ACH);
2015-04-19 01:50:02 +02:00
public final Achievement ach;
public final int type;
2015-10-03 10:19:40 +02:00
TheAchievements(String name, int x, int y, ItemStack displayStack, Achievement hasToHaveBefore){
this(name, x, y, displayStack, hasToHaveBefore, InitAchievements.CRAFTING_ACH);
}
2015-04-19 01:50:02 +02:00
TheAchievements(String name, int x, int y, ItemStack displayStack, Achievement hasToHaveBefore, int type){
2015-10-02 16:48:01 +02:00
this.ach = new Achievement("achievement."+ModUtil.MOD_ID_LOWER+"."+name, ModUtil.MOD_ID_LOWER+"."+name, x, y, displayStack, hasToHaveBefore);
2015-10-03 10:16:18 +02:00
if(hasToHaveBefore == null){
this.ach.initIndependentStat();
}
2015-04-19 01:50:02 +02:00
this.ach.registerStat();
this.type = type;
}
}