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
|
2016-01-03 16:05:51 +01:00
|
|
|
* http://ellpeck.de/actaddlicense/
|
2015-08-29 14:33:25 +02:00
|
|
|
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
|
|
|
*
|
2016-01-03 16:05:51 +01:00
|
|
|
* © 2016 Ellpeck
|
2015-08-29 14:33:25 +02:00
|
|
|
*/
|
|
|
|
|
2016-01-05 04:47:35 +01:00
|
|
|
package de.ellpeck.actuallyadditions.mod.achievement;
|
2015-04-19 01:50:02 +02:00
|
|
|
|
2016-01-05 04:47:35 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
|
|
|
import de.ellpeck.actuallyadditions.mod.items.InitItems;
|
|
|
|
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
2015-04-19 01:50:02 +02:00
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
import net.minecraft.stats.Achievement;
|
|
|
|
|
|
|
|
public enum TheAchievements{
|
|
|
|
|
2015-12-09 15:47:57 +01:00
|
|
|
OPEN_BOOKLET("openBooklet", 0, 0, new ItemStack(InitItems.itemBooklet), null, InitAchievements.Type.MISC),
|
|
|
|
NAME_SMILEY_CLOUD("nameSmileyCloud", 4, 2, new ItemStack(InitBlocks.blockSmileyCloud), null, InitAchievements.Type.MISC, true),
|
|
|
|
OPEN_TREASURE_CHEST("openTreasureChest", 1, -3, new ItemStack(InitBlocks.blockTreasureChest), OPEN_BOOKLET, InitAchievements.Type.MISC),
|
|
|
|
CRAFT_COAL_GEN("craftCoalGen", -2, 0, new ItemStack(InitBlocks.blockCoalGenerator), OPEN_BOOKLET),
|
|
|
|
CRAFT_LEAF_GEN("craftLeafGen", -3, -2, new ItemStack(InitBlocks.blockLeafGenerator), CRAFT_COAL_GEN),
|
|
|
|
CRAFT_RECONSTRUCTOR("craftReconstructor", -5, 0, new ItemStack(InitBlocks.blockAtomicReconstructor), CRAFT_COAL_GEN),
|
|
|
|
CRAFT_PHANTOMFACE("craftPhantomface", 2, 0, new ItemStack(InitBlocks.blockPhantomface), OPEN_BOOKLET),
|
|
|
|
CRAFT_LIQUIFACE("craftLiquiface", 2, 2, new ItemStack(InitBlocks.blockPhantomLiquiface), CRAFT_PHANTOMFACE),
|
|
|
|
CRAFT_ENERGYFACE("craftEnergyface", 2, -2, new ItemStack(InitBlocks.blockPhantomEnergyface), CRAFT_PHANTOMFACE),
|
|
|
|
CRAFT_LASER_RELAY("craftLaserRelay", -7, -2, new ItemStack(InitBlocks.blockLaserRelay), CRAFT_RECONSTRUCTOR),
|
|
|
|
CRAFT_CRUSHER("craftCrusher", -8, 0, new ItemStack(InitBlocks.blockGrinder), CRAFT_RECONSTRUCTOR),
|
|
|
|
PICK_UP_COFFEE("pickUpCoffee", -4, 2, new ItemStack(InitItems.itemCoffeeBean), CRAFT_RECONSTRUCTOR, InitAchievements.Type.PICK_UP),
|
|
|
|
CRAFT_COFFEE_MACHINE("craftCoffeeMachine", -3, 3, new ItemStack(InitBlocks.blockCoffeeMachine), PICK_UP_COFFEE);
|
2015-04-19 01:50:02 +02:00
|
|
|
|
|
|
|
public final Achievement ach;
|
2015-12-09 15:47:57 +01:00
|
|
|
public final InitAchievements.Type type;
|
2015-04-19 01:50:02 +02:00
|
|
|
|
2015-12-09 15:47:57 +01:00
|
|
|
TheAchievements(String name, int x, int y, ItemStack displayStack, TheAchievements hasToHaveBefore){
|
|
|
|
this(name, x, y, displayStack, hasToHaveBefore, InitAchievements.Type.CRAFTING, false);
|
2015-10-03 10:19:40 +02:00
|
|
|
}
|
|
|
|
|
2015-12-09 15:47:57 +01:00
|
|
|
TheAchievements(String name, int x, int y, ItemStack displayStack, TheAchievements hasToHaveBefore, InitAchievements.Type type, boolean special){
|
|
|
|
this.ach = new Achievement("achievement."+ModUtil.MOD_ID_LOWER+"."+name, ModUtil.MOD_ID_LOWER+"."+name, x, y, displayStack, hasToHaveBefore == null ? null : hasToHaveBefore.ach);
|
2015-10-03 10:16:18 +02:00
|
|
|
if(hasToHaveBefore == null){
|
|
|
|
this.ach.initIndependentStat();
|
|
|
|
}
|
2015-12-09 15:47:57 +01:00
|
|
|
if(special){
|
|
|
|
this.ach.setSpecial();
|
|
|
|
}
|
2015-04-19 01:50:02 +02:00
|
|
|
this.ach.registerStat();
|
|
|
|
this.type = type;
|
|
|
|
}
|
2015-12-19 10:30:39 +01:00
|
|
|
|
|
|
|
TheAchievements(String name, int x, int y, ItemStack displayStack, TheAchievements hasToHaveBefore, InitAchievements.Type type){
|
|
|
|
this(name, x, y, displayStack, hasToHaveBefore, type, false);
|
|
|
|
}
|
2015-04-19 01:50:02 +02:00
|
|
|
}
|