Search in sources :

Example 1 with AchievementPage

use of net.minecraftforge.common.AchievementPage in project VoodooCraft by Mod-DevCafeTeam.

the class VCAchievements method registerAchievements.

public static void registerAchievements() {
    Achievement[] achievementArray = new Achievement[achievementList.size()];
    for (Achievement a : achievementList) {
        a.registerStat();
        achievementArray[achievementList.indexOf(a)] = a;
    }
    AchievementPage.registerAchievementPage(new AchievementPage(Reference.NAME, achievementArray));
}
Also used : AchievementPage(net.minecraftforge.common.AchievementPage) Achievement(net.minecraft.stats.Achievement)

Example 2 with AchievementPage

use of net.minecraftforge.common.AchievementPage in project Minechem by iopleke.

the class AchievementRegistry method registerMinechemAchievements.

/**
     * Registers {@link minechem.achievement.ElementAchievement}s to the minechem page
     */
public void registerMinechemAchievements() {
    Collection<Achievement> achievements = minechemAchievementMap.values();
    for (Achievement achievement : achievements) {
        achievement.registerStat();
    }
    minechemPage = new AchievementPage(Compendium.Naming.name, achievements.toArray(new Achievement[achievements.size()]));
    AchievementPage.registerAchievementPage(minechemPage);
}
Also used : AchievementPage(net.minecraftforge.common.AchievementPage) ElementAchievementPage(minechem.achievement.ElementAchievementPage) Achievement(net.minecraft.stats.Achievement) ElementAchievement(minechem.achievement.ElementAchievement)

Example 3 with AchievementPage

use of net.minecraftforge.common.AchievementPage in project PneumaticCraft by MineMaarten.

the class AchievementHandler method init.

public static void init() {
    registerAcquire(0, 0, Itemss.ingotIronCompressed, null);
    registerAcquire(2, 0, Blockss.airCompressor, getAchieve(Itemss.ingotIronCompressed));
    registerAcquire(4, 0, Fluids.getBucket(Fluids.oil), getAchieve(Itemss.ingotIronCompressed));
    registerAcquire(6, 0, Blockss.refinery, getAchieve(Fluids.getBucket(Fluids.oil)));
    registerAcquire(8, 0, Itemss.plastic, getAchieve(Blockss.refinery));
    registerAcquire(10, 0, Blockss.uvLightBox, getAchieve(Itemss.plastic));
    registerAcquire(12, 0, Fluids.getBucket(Fluids.etchingAcid), getAchieve(Blockss.uvLightBox));
    register("dw9x9", 0, 2, new ItemStack(Blocks.cobblestone), null).setSpecial();
    AchievementPage.registerAchievementPage(new AchievementPage("PneumaticCraft", achieveList.values().toArray(new Achievement[achieveList.size()])));
}
Also used : AchievementPage(net.minecraftforge.common.AchievementPage) ItemStack(net.minecraft.item.ItemStack)

Example 4 with AchievementPage

use of net.minecraftforge.common.AchievementPage in project ImmersiveEngineering by BluSunrize.

the class IEAchievements method init.

public static void init() {
    openManual = new AchievementIE("openManual", 0, 1, new ItemStack(IEContent.itemTool, 1, 3), null);
    craftHammer = new AchievementIE("craftHammer", 3, 2, IEContent.itemTool, openManual).setNormalCrafting();
    connectWire = new AchievementIE("connectWire", 0, -1, IEContent.itemWireCoil, openManual);
    blastfurnace = new AchievementIE("blastfurnace", 2, 1, new ItemStack(IEContent.blockStoneDevice, 1, BlockTypes_StoneDevices.BLAST_FURNACE.getMeta()), craftHammer);
    makeSteel = new AchievementIE("makeSteel", 2, -1, new ItemStack(IEContent.itemMetal, 1, 8), blastfurnace);
    placeConveyor = new AchievementIE("placeConveyor", 1, 3, ConveyorHandler.getConveyorStack(ImmersiveEngineering.MODID + ":conveyor"), openManual).setPlacement(new ItemStack(IEContent.blockConveyor));
    placeWindmill = new AchievementIE("placeWindmill", -1, 3, new ItemStack(IEContent.blockWoodenDevice1, 1, BlockTypes_WoodenDevice1.WINDMILL.getMeta()), openManual).setPlacement(new ItemStack(IEContent.blockWoodenDevice1, 1, BlockTypes_WoodenDevice1.WINDMILL.getMeta()), new ItemStack(IEContent.blockWoodenDevice1, 1, BlockTypes_WoodenDevice1.WINDMILL_ADVANCED.getMeta()));
    craftHeater = new AchievementIE("craftHeater", -2, 4, new ItemStack(IEContent.blockMetalDevice1, 1, BlockTypes_MetalDevice1.FURNACE_HEATER.getMeta()), openManual).setNormalCrafting();
    craftPump = new AchievementIE("craftPump", 2, 4, new ItemStack(IEContent.blockMetalDevice0, 1, BlockTypes_MetalDevice0.FLUID_PUMP.getMeta()), openManual).setNormalCrafting();
    placeFloodlight = new AchievementIE("placeFloodlight", -1, 5, new ItemStack(IEContent.blockMetalDevice1, 1, BlockTypes_MetalDevice1.FLOODLIGHT.getMeta()), openManual).setPlacement();
    mbImprovedBlastFurnace = new AchievementIE("mbImprovedBlastFurnace", 6, -3, new ItemStack(IEContent.blockStoneDevice, 1, BlockTypes_StoneDevices.BLAST_FURNACE_ADVANCED.getMeta()), makeSteel).setSpecial();
    mbMetalPress = new AchievementIE("mbMetalPress", 6, -2, new ItemStack(IEContent.blockMetalMultiblock, 1, BlockTypes_MetalMultiblock.METAL_PRESS.getMeta()), makeSteel).setSpecial();
    mbCrusher = new AchievementIE("mbCrusher", 6, -1, new ItemStack(IEContent.blockMetalMultiblock, 1, BlockTypes_MetalMultiblock.CRUSHER.getMeta()), makeSteel).setSpecial();
    mbSilo = new AchievementIE("mbSilo", 7, -2, new ItemStack(IEContent.blockMetalMultiblock, 1, BlockTypes_MetalMultiblock.SILO.getMeta()), craftHammer).setSpecial();
    mbDieselGen = new AchievementIE("mbDieselGen", 6, 0, new ItemStack(IEContent.blockMetalMultiblock, 1, BlockTypes_MetalMultiblock.DIESEL_GENERATOR.getMeta()), craftHammer).setSpecial();
    mbExcavator = new AchievementIE("mbExcavator", 6, 1, new ItemStack(IEContent.blockMetalMultiblock, 1, BlockTypes_MetalMultiblock.EXCAVATOR.getMeta()), craftHammer).setSpecial();
    mbArcFurnace = new AchievementIE("mbArcFurnace", 6, 2, new ItemStack(IEContent.blockMetalMultiblock, 1, BlockTypes_MetalMultiblock.ARC_FURNACE.getMeta()), craftHammer).setSpecial();
    craftWorkbench = new AchievementIE("craftWorkbench", 2, -3, new ItemStack(IEContent.blockWoodenDevice0, 1, BlockTypes_WoodenDevice0.WORKBENCH.getMeta()), makeSteel).setNormalCrafting();
    craftRevolver = new AchievementIE("craftRevolver", 3, -6, IEContent.itemRevolver, craftWorkbench).setNormalCrafting();
    ItemStack[] upgrades = new ItemStack[20];
    upgrades[18] = new ItemStack(IEContent.itemToolUpgrades, 1, 5);
    upgrades[19] = new ItemStack(IEContent.itemToolUpgrades, 1, 6);
    ItemStack revolver = new ItemStack(IEContent.itemRevolver);
    ((ItemRevolver) IEContent.itemRevolver).setContainedItems(revolver, upgrades);
    ((ItemRevolver) IEContent.itemRevolver).recalculateUpgrades(revolver);
    upgradeRevolver = new AchievementIE("upgradeRevolver", 4, -6, revolver, craftRevolver);
    if (!BulletHandler.homingCartridges.isEmpty())
        craftWolfPack = new AchievementIE("craftWolfPack", 4, -7, BulletHandler.getBulletStack("wolfpack"), craftRevolver).setCheckNBT(true).setBlueprintCrafting().setSpecial();
    ItemStack drill = new ItemStack(IEContent.itemDrill);
    ((ItemDrill) IEContent.itemDrill).setHead(drill, new ItemStack(IEContent.itemDrillhead));
    craftDrill = new AchievementIE("craftDrill", 1, -6, drill, craftWorkbench).setNormalCrafting();
    upgrades = new ItemStack[4];
    upgrades[0] = new ItemStack(IEContent.itemDrillhead);
    upgrades[1] = new ItemStack(IEContent.itemToolUpgrades, 1, 0);
    upgrades[2] = new ItemStack(IEContent.itemToolUpgrades, 1, 1);
    upgrades[3] = new ItemStack(IEContent.itemToolUpgrades, 3, 2);
    ItemStack drill2 = drill.copy();
    ((ItemDrill) IEContent.itemDrill).setContainedItems(drill2, upgrades);
    ((ItemDrill) IEContent.itemDrill).recalculateUpgrades(drill2);
    upgradeDrill = new AchievementIE("upgradeDrill", 0, -6, drill2, craftDrill);
    craftSkyhook = new AchievementIE("craftSkyhook", 1, -5, IEContent.itemSkyhook, craftWorkbench).setNormalCrafting();
    ItemStack hook = new ItemStack(IEContent.itemSkyhook);
    hook.addEnchantment(Enchantments.UNBREAKING, 1);
    //skyhookPro = new AchievementIE("skyhookPro", 0, -5, hook, craftSkyhook);
    craftChemthrower = new AchievementIE("craftChemthrower", 3, -5, IEContent.itemChemthrower, craftWorkbench).setNormalCrafting();
    craftRailgun = new AchievementIE("craftRailgun", 1, -7, IEContent.itemRailgun, craftWorkbench).setNormalCrafting();
    secret_birthdayParty = new AchievementIE("secret_birthdayParty", -4, -1, new ItemStack(IEContent.itemFakeIcons, 1, 0), null).setSpecial();
    secret_luckOfTheDraw = new AchievementIE("secret_luckOfTheDraw", -4, 1, new ItemStack(IEContent.itemFakeIcons, 1, 1), null).setSpecial();
    ieAchievementPage = new AchievementPage(ImmersiveEngineering.MODNAME, AchievementIE.achievements.toArray(new Achievement[AchievementIE.achievements.size()]));
    AchievementPage.registerAchievementPage(ieAchievementPage);
    statDistanceSkyhook = new StatBase("stat.skyhookOneCm", new TextComponentTranslation("stat.skyhookOneCm", new Object[0]), StatBase.distanceStatType) {

        @Override
        public StatBase registerStat() {
            super.registerStat();
            StatList.BASIC_STATS.add(12, this);
            return this;
        }
    }.initIndependentStat().registerStat();
}
Also used : ItemRevolver(blusunrize.immersiveengineering.common.items.ItemRevolver) TextComponentTranslation(net.minecraft.util.text.TextComponentTranslation) AchievementPage(net.minecraftforge.common.AchievementPage) StatBase(net.minecraft.stats.StatBase) ItemStack(net.minecraft.item.ItemStack) ItemDrill(blusunrize.immersiveengineering.common.items.ItemDrill)

Example 5 with AchievementPage

use of net.minecraftforge.common.AchievementPage in project Pearcel-Mod by MiningMark48.

the class Achievements method init.

public static void init() {
    achievement_get_pearcel = new Achievement("achievement.get_pearcel", "get_pearcel", 0, 0, new ItemStack(ModItems.pearcel_item), (Achievement) null).initIndependentStat().registerStat();
    achievement_craft_pearcel_ingot = new Achievement("achievement.craft_pearcel_ingot", "craft_pearcel_ingot", 0, -2, new ItemStack(ModItems.pearcel_ingot), achievement_get_pearcel).registerStat();
    achievement_craft_tier1_cc = new Achievement("achievement.craft_tier1_cc", "craft_tier1_cc", 2, -2, new ItemStack(ModItems.tier_1_crafting_component), achievement_craft_pearcel_ingot).registerStat();
    achievement_craft_tier2_cc = new Achievement("achievement.craft_tier2_cc", "craft_tier2_cc", 4, -2, new ItemStack(ModItems.tier_2_crafting_component), achievement_craft_tier1_cc).registerStat();
    achievement_craft_tier3_cc = new Achievement("achievement.craft_tier3_cc", "craft_tier3_cc", 6, -2, new ItemStack(ModItems.tier_3_crafting_component), achievement_craft_tier2_cc).registerStat();
    achievement_craft_tier4_cc = new Achievement("achievement.craft_tier4_cc", "craft_tier4_cc", 8, -2, new ItemStack(ModItems.tier_4_crafting_component), achievement_craft_tier3_cc).registerStat();
    achievement_craft_pcp = new Achievement("achievement.craft_pcp", "craft_pcp", 2, -4, new ItemStack(ModItems.pcp), achievement_craft_tier1_cc).registerStat();
    achievement_craft_pearcel_tools = new Achievement("achievement.craft_pearcel_tools", "craft_pearcel_tools", 6, -4, new ItemStack(ModItems.pearcel_sword), achievement_craft_tier2_cc).registerStat();
    achievement_craft_pearcel_armor_plating = new Achievement("achievement.craft_pearcel_armor_plating", "craft_pearcel_armor_plating", 4, -6, new ItemStack(ModItems.armor_plating), achievement_craft_tier2_cc).registerStat();
    achievement_craft_pearcel_armor = new Achievement("achievement.craft_pearcel_armor", "craft_pearcel_armor", 2, -6, new ItemStack(ModItems.pearcel_chestplate), achievement_craft_pearcel_armor_plating).registerStat();
    achievement_craft_pearcel_bread = new Achievement("achievement.craft_pearcel_bread", "craft_pearcel_bread", 0, 2, new ItemStack(ModItems.pearcel_bread), achievement_get_pearcel).registerStat();
    achievement_use_experience_pearcel = new Achievement("achievement.use_experience_pearcel", "use_experience_pearcel", 8, -6, new ItemStack(ModItems.experience_pearcel), (Achievement) null).initIndependentStat().registerStat();
    achievement_craft_ender_pearcel = new Achievement("achievement.craft_ender_pearcel", "craft_ender_pearcel", 10, -6, new ItemStack(ModItems.ender_pearcel), (Achievement) null).initIndependentStat().registerStat();
    achievement_use_tp_pearcel = new Achievement("achievement.use_tp_pearcel", "use_tp_pearcel", 10, -4, new ItemStack(ModItems.tp_pearcel), achievement_craft_ender_pearcel).registerStat();
    achievement_use_pepc = new Achievement("achievement.use_pepc", "use_pepc", 12, -6, new ItemStack(ModItems.pepc), (Achievement) null).initIndependentStat().registerStat();
    Achievement[] achievement_list = new Achievement[] { achievement_get_pearcel, achievement_craft_pearcel_ingot, achievement_craft_tier1_cc, achievement_craft_tier2_cc, achievement_craft_tier3_cc, achievement_craft_tier4_cc, achievement_craft_pcp, achievement_craft_pearcel_tools, achievement_craft_pearcel_armor_plating, achievement_craft_pearcel_armor, achievement_craft_pearcel_bread, achievement_use_experience_pearcel, achievement_craft_ender_pearcel, achievement_use_tp_pearcel, achievement_use_pepc };
    AchievementPage.registerAchievementPage(new AchievementPage(Reference.MOD_NAME, achievement_list));
    regAchieveEvents();
}
Also used : AchievementPage(net.minecraftforge.common.AchievementPage) Achievement(net.minecraft.stats.Achievement) ItemStack(net.minecraft.item.ItemStack)

Aggregations

AchievementPage (net.minecraftforge.common.AchievementPage)6 Achievement (net.minecraft.stats.Achievement)4 ItemStack (net.minecraft.item.ItemStack)3 ItemDrill (blusunrize.immersiveengineering.common.items.ItemDrill)1 ItemRevolver (blusunrize.immersiveengineering.common.items.ItemRevolver)1 ElementAchievement (minechem.achievement.ElementAchievement)1 ElementAchievementPage (minechem.achievement.ElementAchievementPage)1 StatBase (net.minecraft.stats.StatBase)1 TextComponentTranslation (net.minecraft.util.text.TextComponentTranslation)1