mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 07:13:28 +01:00
Added some more Achievements
This commit is contained in:
parent
cc17a27b52
commit
769a2f8767
6 changed files with 51 additions and 10 deletions
|
@ -9,6 +9,7 @@ import java.util.ArrayList;
|
|||
|
||||
public class InitAchievements{
|
||||
|
||||
public static final int MISC_ACH = -1;
|
||||
public static final int CRAFTING_ACH = 0;
|
||||
public static final int SMELTING_ACH = 1;
|
||||
public static final int PICKUP_ACH = 2;
|
||||
|
|
|
@ -21,9 +21,20 @@ public enum TheAchievements{
|
|||
|
||||
//Machine Path
|
||||
CRAFT_WOODEN_CASE("craftWoodenCasing", 0, -3, new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()), null),
|
||||
//ESD Part
|
||||
CRAFT_ESD("craftESD", -2, -3, new ItemStack(InitBlocks.blockInputter), CRAFT_WOODEN_CASE.ach),
|
||||
CRAFT_ADVANCED_ESD("craftAdvancedESD", -4, -3, new ItemStack(InitBlocks.blockInputterAdvanced), CRAFT_ESD.ach),
|
||||
|
||||
CRAFT_STONE_CASE("craftStoneCasing", 2, -4, new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()), CRAFT_WOODEN_CASE.ach),
|
||||
CRAFT_COIL("craftBasicCoil", 2, -2, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), CRAFT_WOODEN_CASE.ach),
|
||||
CRAFT_ADVANCED_COIL("craftAdvancedCoil", 4, -2, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), CRAFT_COIL.ach);
|
||||
CRAFT_ADVANCED_COIL("craftAdvancedCoil", 4, -2, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), CRAFT_COIL.ach),
|
||||
//Phantom Part
|
||||
CRAFT_PHANTOMFACE("craftPhantomface", 6, -2, new ItemStack(InitBlocks.blockPhantomface), CRAFT_ADVANCED_COIL.ach),
|
||||
CRAFT_ENERGYFACE("craftPhantomEnergyface", 8, -1, new ItemStack(InitBlocks.blockPhantomEnergyface), CRAFT_PHANTOMFACE.ach),
|
||||
CRAFT_LIQUIFACE("craftPhantomLiquiface", 8, -3, new ItemStack(InitBlocks.blockPhantomLiquiface), CRAFT_PHANTOMFACE.ach),
|
||||
|
||||
//Misc Achievements
|
||||
OPEN_TREASURE_CHEST("openTreasureChest", 0, 4, new ItemStack(InitBlocks.blockTreasureChest), null, InitAchievements.MISC_ACH);
|
||||
|
||||
public final Achievement ach;
|
||||
public final int type;
|
||||
|
|
|
@ -2,6 +2,7 @@ package ellpeck.actuallyadditions.blocks;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.achievement.TheAchievements;
|
||||
import ellpeck.actuallyadditions.recipe.TreasureChestHandler;
|
||||
import ellpeck.actuallyadditions.util.BlockUtil;
|
||||
import ellpeck.actuallyadditions.util.INameableItem;
|
||||
|
@ -91,11 +92,17 @@ public class BlockTreasureChest extends Block implements INameableItem{
|
|||
if(!world.isRemote){
|
||||
world.playSoundAtEntity(player, "random.chestopen", 0.2F, new Random().nextFloat()*0.1F+0.9F);
|
||||
this.dropItems(world, x, y, z);
|
||||
player.addStat(TheAchievements.OPEN_TREASURE_CHEST.ach, 1);
|
||||
world.setBlockToAir(x, y, z);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void harvestBlock(World world, EntityPlayer player, int x, int y, int z, int meta){
|
||||
player.addStat(TheAchievements.OPEN_TREASURE_CHEST.ach, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int par6){
|
||||
this.dropItems(world, x, y, z);
|
||||
|
|
|
@ -18,7 +18,7 @@ public class CraftEvent{
|
|||
for(int i = 0; i < TheAchievements.values().length; i++){
|
||||
TheAchievements ach = TheAchievements.values()[i];
|
||||
if(ach.type == type){
|
||||
if(gotten.getItem() == ach.ach.theItemStack.getItem()){
|
||||
if(gotten != null && ach.ach.theItemStack != null && gotten.getItem() == ach.ach.theItemStack.getItem()){
|
||||
if(gotten.getItemDamage() == ach.ach.theItemStack.getItemDamage()){
|
||||
player.addStat(ach.ach, 1);
|
||||
}
|
||||
|
|
|
@ -31,7 +31,8 @@ public class ThreadUpdateChecker extends Thread{
|
|||
ModUtil.LOGGER.info("Update Check done!");
|
||||
}
|
||||
catch(Exception e){
|
||||
this.checkFailed(e);
|
||||
ModUtil.LOGGER.error("Update Check failed!", e);
|
||||
UpdateChecker.checkFailed = true;
|
||||
}
|
||||
|
||||
if(!UpdateChecker.checkFailed){
|
||||
|
@ -40,7 +41,8 @@ public class ThreadUpdateChecker extends Thread{
|
|||
UpdateChecker.clientVersion = Integer.parseInt(ModUtil.VERSION.replace("-", "").replace(".", ""));
|
||||
}
|
||||
catch(Exception e){
|
||||
this.checkFailed(e);
|
||||
ModUtil.LOGGER.error("Comparing the newest and the current Version failed!", e);
|
||||
UpdateChecker.checkFailed = true;
|
||||
}
|
||||
|
||||
if(!UpdateChecker.checkFailed){
|
||||
|
@ -59,9 +61,4 @@ public class ThreadUpdateChecker extends Thread{
|
|||
|
||||
UpdateChecker.doneChecking = true;
|
||||
}
|
||||
|
||||
private void checkFailed(Exception e){
|
||||
UpdateChecker.checkFailed = true;
|
||||
ModUtil.LOGGER.error("Update Check failed!", e);
|
||||
}
|
||||
}
|
|
@ -568,17 +568,42 @@ info.actuallyadditions.inputter.info.2=This is the slot after the last Slot |in
|
|||
|
||||
achievement.actuallyadditions.pickUpSolidXP=Square and yummy!
|
||||
achievement.actuallyadditions.pickUpSolidXP.desc=Pick up some Solidified Experience
|
||||
|
||||
achievement.actuallyadditions.craftKnifeBlade=Sharp! So Sharp!
|
||||
achievement.actuallyadditions.craftKnifeBlade.desc=Craft a Knife Blade
|
||||
|
||||
achievement.actuallyadditions.craftKnife=Cutcutcutcutcutcutcutcutcutcutcut!
|
||||
achievement.actuallyadditions.craftKnife.desc=Craft a Knife
|
||||
|
||||
achievement.actuallyadditions.craftMashedFood=Munch munch munch!
|
||||
achievement.actuallyadditions.craftMashedFood.desc=Craft some Mashed Food
|
||||
|
||||
achievement.actuallyadditions.craftWoodenCasing=Hard and sturdy!
|
||||
achievement.actuallyadditions.craftWoodenCasing.desc=Craft a Wooden Casing
|
||||
|
||||
achievement.actuallyadditions.craftStoneCasing=Harder and sturdier!
|
||||
achievement.actuallyadditions.craftStoneCasing.desc=Craft a Stone Casing
|
||||
|
||||
achievement.actuallyadditions.craftBasicCoil=Transmits.. power.. or something?
|
||||
achievement.actuallyadditions.craftBasicCoil.desc=Craft a Basic Coil
|
||||
|
||||
achievement.actuallyadditions.craftAdvancedCoil=Transmits... more power I guess.
|
||||
achievement.actuallyadditions.craftAdvancedCoil.desc=Craft an Advanced Coil
|
||||
achievement.actuallyadditions.craftAdvancedCoil.desc=Craft an Advanced Coil
|
||||
|
||||
achievement.actuallyadditions.craftESD=From there to there..
|
||||
achievement.actuallyadditions.craftESD.desc=Craft an ESD
|
||||
|
||||
achievement.actuallyadditions.craftAdvancedESD=White and Black!
|
||||
achievement.actuallyadditions.craftAdvancedESD.desc=Craft an Advanced ESD
|
||||
|
||||
achievement.actuallyadditions.craftPhantomface=Wooo... teleporting!
|
||||
achievement.actuallyadditions.craftPhantomface.desc=Craft a Phantomface
|
||||
|
||||
achievement.actuallyadditions.craftPhantomLiquiface=Bubbles.. are awesome..
|
||||
achievement.actuallyadditions.craftPhantomLiquiface.desc=Craft a Phantom Liquiface
|
||||
|
||||
achievement.actuallyadditions.craftPhantomEnergyface=Watch out! It's powered!
|
||||
achievement.actuallyadditions.craftPhantomEnergyface.desc=Craft a Phantom Energyface
|
||||
|
||||
achievement.actuallyadditions.openTreasureChest=You almost drowned!!
|
||||
achievement.actuallyadditions.openTreasureChest.desc=Open a Treasure Chest underwater
|
||||
|
|
Loading…
Reference in a new issue