use of net.minecraft.stats.Achievement in project minecolonies by Minecolonies.
the class AchievementUtils method syncAchievements.
/**
* This method will sync all acquired achievements by this colony to all
* members with at least rank {@link Rank#OFFICER}.
*
* @param colony The colony to sync
*/
public static void syncAchievements(@NotNull final Colony colony) {
@NotNull final List<Player> players = PermissionUtils.getPlayersWithAtLeastRank(colony, Rank.OFFICER);
@NotNull final List<EntityPlayer> lPlayer = ServerUtils.getPlayersFromPermPlayer(players, colony.getWorld());
for (@Nullable final EntityPlayer player : lPlayer) {
for (final Achievement achievement : colony.getAchievements()) {
if (player == null || ModAchievements.achievementGetSupply == achievement) {
continue;
}
player.addStat(achievement);
}
}
}
use of net.minecraft.stats.Achievement in project Witchworks by Um-Mitternacht.
the class ModAchievements method init.
public static void init() {
craftMalachite = new AchievementMod(LibAchievementName.CRAFT_MALACHITE, -5, 0, ModItems.MALACHITE, null);
final AchievementPage page = new AchievementPage(MOD_NAME, achievements.toArray(new Achievement[achievements.size()]));
AchievementPage.registerAchievementPage(page);
MinecraftForge.EVENT_BUS.register(AchievementTriggers.class);
}
use of net.minecraft.stats.Achievement in project BuildCraft by BuildCraft.
the class BuildCraftBuilders method init.
@Mod.EventHandler
public void init(FMLInitializationEvent evt) {
NetworkRegistry.INSTANCE.registerGuiHandler(instance, new BuildersGuiHandler());
MinecraftForge.EVENT_BUS.register(new BuilderTooltipHandler());
EntityRegistry.registerModEntity(EntityMechanicalArm.class, "bcMechArm", EntityIds.MECHANICAL_ARM, instance, 50, 1, true);
// Standard blocks
ISchematicRegistry schemes = BuilderAPI.schematicRegistry;
schemes.registerSchematicBlock(Blocks.air, SchematicAir.class);
schemes.registerSchematicBlock(Blocks.snow, SchematicIgnore.class);
schemes.registerSchematicBlock(Blocks.tallgrass, SchematicIgnore.class);
schemes.registerSchematicBlock(Blocks.double_plant, SchematicIgnore.class);
schemes.registerSchematicBlock(Blocks.ice, SchematicIgnore.class);
schemes.registerSchematicBlock(Blocks.piston_head, SchematicIgnore.class);
schemes.registerSchematicBlock(Blocks.dirt, SchematicDirt.class);
schemes.registerSchematicBlock(Blocks.grass, SchematicDirt.class);
schemes.registerSchematicBlock(Blocks.cactus, SchematicCactus.class);
schemes.registerSchematicBlock(Blocks.farmland, SchematicFarmland.class);
schemes.registerSchematicBlock(Blocks.wheat, SchematicSeeds.class, Items.wheat_seeds);
schemes.registerSchematicBlock(Blocks.pumpkin_stem, SchematicSeeds.class, Items.pumpkin_seeds);
schemes.registerSchematicBlock(Blocks.melon_stem, SchematicSeeds.class, Items.melon_seeds);
schemes.registerSchematicBlock(Blocks.nether_wart, SchematicSeeds.class, Items.nether_wart);
schemes.registerSchematicBlock(Blocks.torch, SchematicBlock.class);
schemes.registerSchematicBlock(Blocks.REDSTONE_TORCH, SchematicBlock.class);
schemes.registerSchematicBlock(Blocks.unlit_redstone_torch, SchematicBlock.class);
schemes.registerSchematicBlock(Blocks.tripwire_hook, SchematicBlock.class);
schemes.registerSchematicBlock(Blocks.tripwire, SchematicTripwire.class);
schemes.registerSchematicBlock(Blocks.skull, SchematicSkull.class);
schemes.registerSchematicBlock(Blocks.log, SchematicLog.class);
schemes.registerSchematicBlock(Blocks.log2, SchematicLog.class);
schemes.registerSchematicBlock(Blocks.hay_block, SchematicRotatedPillar.class);
schemes.registerSchematicBlock(Blocks.quartz_block, SchematicQuartz.class);
schemes.registerSchematicBlock(Blocks.hopper, SchematicTile.class);
schemes.registerSchematicBlock(Blocks.anvil, SchematicCustomStack.class, new ItemStack(Blocks.anvil));
schemes.registerSchematicBlock(Blocks.vine, SchematicVine.class);
schemes.registerSchematicBlock(Blocks.furnace, SchematicTile.class);
schemes.registerSchematicBlock(Blocks.lit_furnace, SchematicTile.class);
schemes.registerSchematicBlock(Blocks.CHEST, SchematicTile.class);
schemes.registerSchematicBlock(Blocks.dispenser, SchematicTile.class);
schemes.registerSchematicBlock(Blocks.dropper, SchematicTile.class);
schemes.registerSchematicBlock(Blocks.ender_chest, SchematicEnderChest.class);
schemes.registerSchematicBlock(Blocks.lever, SchematicLever.class);
schemes.registerSchematicBlock(Blocks.gold_ore, SchematicTreatAsOther.class, Blocks.stone.getDefaultState());
schemes.registerSchematicBlock(Blocks.iron_ore, SchematicTreatAsOther.class, Blocks.stone.getDefaultState());
schemes.registerSchematicBlock(Blocks.coal_ore, SchematicTreatAsOther.class, Blocks.stone.getDefaultState());
schemes.registerSchematicBlock(Blocks.lapis_ore, SchematicTreatAsOther.class, Blocks.stone.getDefaultState());
schemes.registerSchematicBlock(Blocks.diamond_ore, SchematicTreatAsOther.class, Blocks.stone.getDefaultState());
schemes.registerSchematicBlock(Blocks.redstone_ore, SchematicTreatAsOther.class, Blocks.stone.getDefaultState());
schemes.registerSchematicBlock(Blocks.lit_redstone_ore, SchematicTreatAsOther.class, Blocks.stone.getDefaultState());
schemes.registerSchematicBlock(Blocks.emerald_ore, SchematicTreatAsOther.class, Blocks.stone.getDefaultState());
schemes.registerSchematicBlock(Blocks.gravel, SchematicGravel.class);
schemes.registerSchematicBlock(Blocks.redstone_wire, SchematicRedstoneWire.class, new ItemStack(Items.REDSTONE));
schemes.registerSchematicBlock(Blocks.cake, SchematicCustomStack.class, new ItemStack(Items.cake));
schemes.registerSchematicBlock(Blocks.glowstone, SchematicCustomStack.class, new ItemStack(Blocks.glowstone));
schemes.registerSchematicBlock(Blocks.powered_repeater, SchematicCustomStackFloored.class, new ItemStack(Items.repeater));
schemes.registerSchematicBlock(Blocks.unpowered_repeater, SchematicCustomStackFloored.class, new ItemStack(Items.repeater));
schemes.registerSchematicBlock(Blocks.powered_comparator, SchematicCustomStackFloored.class, new ItemStack(Items.comparator));
schemes.registerSchematicBlock(Blocks.unpowered_comparator, SchematicCustomStackFloored.class, new ItemStack(Items.comparator));
schemes.registerSchematicBlock(Blocks.daylight_detector, SchematicTile.class);
schemes.registerSchematicBlock(Blocks.daylight_detector_inverted, SchematicTile.class);
schemes.registerSchematicBlock(Blocks.jukebox, SchematicJukebox.class);
schemes.registerSchematicBlock(Blocks.noteblock, SchematicTile.class);
schemes.registerSchematicBlock(Blocks.redstone_lamp, SchematicRedstoneLamp.class);
schemes.registerSchematicBlock(Blocks.lit_redstone_lamp, SchematicRedstoneLamp.class);
schemes.registerSchematicBlock(Blocks.glass_pane, SchematicGlassPane.class);
schemes.registerSchematicBlock(Blocks.stained_glass_pane, SchematicGlassPane.class);
schemes.registerSchematicBlock(Blocks.piston, SchematicPiston.class);
schemes.registerSchematicBlock(Blocks.piston_extension, SchematicIgnore.class);
schemes.registerSchematicBlock(Blocks.sticky_piston, SchematicPiston.class);
schemes.registerSchematicBlock(Blocks.oak_stairs, SchematicStandalone.class);
schemes.registerSchematicBlock(Blocks.stone_stairs, SchematicStandalone.class);
schemes.registerSchematicBlock(Blocks.brick_stairs, SchematicStandalone.class);
schemes.registerSchematicBlock(Blocks.stone_brick_stairs, SchematicStandalone.class);
schemes.registerSchematicBlock(Blocks.nether_brick_stairs, SchematicStandalone.class);
schemes.registerSchematicBlock(Blocks.sandstone_stairs, SchematicStandalone.class);
schemes.registerSchematicBlock(Blocks.spruce_stairs, SchematicStandalone.class);
schemes.registerSchematicBlock(Blocks.birch_stairs, SchematicStandalone.class);
schemes.registerSchematicBlock(Blocks.jungle_stairs, SchematicStandalone.class);
schemes.registerSchematicBlock(Blocks.quartz_stairs, SchematicStandalone.class);
schemes.registerSchematicBlock(Blocks.acacia_stairs, SchematicStandalone.class);
schemes.registerSchematicBlock(Blocks.dark_oak_stairs, SchematicStandalone.class);
schemes.registerSchematicBlock(Blocks.ACACIA_DOOR, SchematicDoor.class, new ItemStack(Items.ACACIA_DOOR));
schemes.registerSchematicBlock(Blocks.BIRCH_DOOR, SchematicDoor.class, new ItemStack(Items.BIRCH_DOOR));
schemes.registerSchematicBlock(Blocks.DARK_OAK_DOOR, SchematicDoor.class, new ItemStack(Items.DARK_OAK_DOOR));
schemes.registerSchematicBlock(Blocks.JUNGLE_DOOR, SchematicDoor.class, new ItemStack(Items.JUNGLE_DOOR));
schemes.registerSchematicBlock(Blocks.OAK_DOOR, SchematicDoor.class, new ItemStack(Items.OAK_DOOR));
schemes.registerSchematicBlock(Blocks.SPRUCE_DOOR, SchematicDoor.class, new ItemStack(Items.SPRUCE_DOOR));
schemes.registerSchematicBlock(Blocks.IRON_DOOR, SchematicDoor.class, new ItemStack(Items.IRON_DOOR));
schemes.registerSchematicBlock(Blocks.bed, SchematicBed.class);
schemes.registerSchematicBlock(Blocks.wall_sign, SchematicSignLike.class, true);
schemes.registerSchematicBlock(Blocks.standing_sign, SchematicSignLike.class, false);
schemes.registerSchematicBlock(Blocks.wall_banner, SchematicBanner.class, true);
schemes.registerSchematicBlock(Blocks.standing_banner, SchematicBanner.class, false);
schemes.registerSchematicBlock(Blocks.portal, SchematicPortal.class);
schemes.registerSchematicBlock(Blocks.rail, SchematicRail.class);
schemes.registerSchematicBlock(Blocks.activator_rail, SchematicRail.class);
schemes.registerSchematicBlock(Blocks.detector_rail, SchematicRail.class);
schemes.registerSchematicBlock(Blocks.golden_rail, SchematicRail.class);
schemes.registerSchematicBlock(Blocks.beacon, SchematicTile.class);
schemes.registerSchematicBlock(Blocks.brewing_stand, SchematicBrewingStand.class);
schemes.registerSchematicBlock(Blocks.enchanting_table, SchematicTile.class);
schemes.registerSchematicBlock(Blocks.fire, SchematicFire.class);
schemes.registerSchematicBlock(Blocks.bedrock, SchematicBlockCreative.class);
schemes.registerSchematicBlock(Blocks.command_block, SchematicTileCreative.class);
schemes.registerSchematicBlock(Blocks.mob_spawner, SchematicTileCreative.class);
schemes.registerSchematicBlock(Blocks.glass, SchematicStandalone.class);
schemes.registerSchematicBlock(Blocks.stone_slab, SchematicStandalone.class);
schemes.registerSchematicBlock(Blocks.double_stone_slab, SchematicStandalone.class);
schemes.registerSchematicBlock(Blocks.wooden_slab, SchematicStandalone.class);
schemes.registerSchematicBlock(Blocks.double_wooden_slab, SchematicStandalone.class);
schemes.registerSchematicBlock(Blocks.stained_glass, SchematicStandalone.class);
schemes.registerSchematicBlock(Blocks.acacia_fence, SchematicStandalone.class);
schemes.registerSchematicBlock(Blocks.birch_fence, SchematicStandalone.class);
schemes.registerSchematicBlock(Blocks.dark_oak_fence, SchematicStandalone.class);
schemes.registerSchematicBlock(Blocks.jungle_fence, SchematicStandalone.class);
schemes.registerSchematicBlock(Blocks.oak_fence, SchematicStandalone.class);
schemes.registerSchematicBlock(Blocks.spruce_fence, SchematicStandalone.class);
schemes.registerSchematicBlock(Blocks.iron_bars, SchematicStandalone.class);
// Standard entities
schemes.registerSchematicEntity(EntityArmorStand.class, SchematicArmorStand.class);
schemes.registerSchematicEntity(EntityMinecartEmpty.class, SchematicMinecart.class, Items.minecart);
schemes.registerSchematicEntity(EntityMinecartFurnace.class, SchematicMinecart.class, Items.furnace_minecart);
schemes.registerSchematicEntity(EntityMinecartTNT.class, SchematicMinecart.class, Items.tnt_minecart);
schemes.registerSchematicEntity(EntityMinecartChest.class, SchematicMinecart.class, Items.chest_minecart);
schemes.registerSchematicEntity(EntityMinecartHopper.class, SchematicMinecart.class, Items.hopper_minecart);
schemes.registerSchematicEntity(EntityPainting.class, SchematicHanging.class, Items.painting);
schemes.registerSchematicEntity(EntityItemFrame.class, SchematicHanging.class, Items.item_frame);
// BuildCraft blocks
schemes.registerSchematicBlock(architectBlock, SchematicTile.class);
schemes.registerSchematicBlock(builderBlock, SchematicBuilderLike.class);
schemes.registerSchematicBlock(fillerBlock, SchematicBuilderLike.class);
schemes.registerSchematicBlock(libraryBlock, SchematicTile.class);
schemes.registerSchematicBlock(quarryBlock, SchematicBuilderLike.class);
// schemes.registerSchematicBlock(markerBlock, SchematicWallSide.class);
// schemes.registerSchematicBlock(pathMarkerBlock, SchematicWallSide.class);
// schemes.registerSchematicBlock(constructionMarkerBlock, SchematicWallSide.class);
// Factories required to save entities in world
SchematicFactory.registerSchematicFactory(SchematicBlock.class, new SchematicFactoryBlock());
SchematicFactory.registerSchematicFactory(SchematicMask.class, new SchematicFactoryMask());
SchematicFactory.registerSchematicFactory(SchematicEntity.class, new SchematicFactoryEntity());
// Template
LibraryAPI.registerHandler(new LibraryBlueprintTypeHandler(false));
// Blueprint
LibraryAPI.registerHandler(new LibraryBlueprintTypeHandler(true));
LibraryAPI.registerHandler(new LibraryBookTypeHandler());
BlueprintDeployer.instance = new RealBlueprintDeployer();
architectAchievement = BuildCraftCore.achievementManager.registerAchievement(new Achievement("buildcraft|builders:achievement.architect", "architectAchievement", 11, 2, BuildCraftBuilders.architectBlock, BuildCraftCore.goldGearAchievement));
builderAchievement = BuildCraftCore.achievementManager.registerAchievement(new Achievement("buildcraft|builders:achievement.builder", "builderAchievement", 13, 2, BuildCraftBuilders.builderBlock, architectAchievement));
blueprintAchievement = BuildCraftCore.achievementManager.registerAchievement(new Achievement("buildcraft|builders:achievement.blueprint", "blueprintAchievement", 11, 4, BuildCraftBuilders.blueprintItem, architectAchievement));
templateAchievement = BuildCraftCore.achievementManager.registerAchievement(new Achievement("buildcraft|builders:achievement.template", "templateAchievement", 13, 4, BuildCraftBuilders.templateItem, blueprintAchievement));
libraryAchievement = BuildCraftCore.achievementManager.registerAchievement(new Achievement("buildcraft|builders:achievement.blueprintLibrary", "blueprintLibraryAchievement", 15, 2, BuildCraftBuilders.libraryBlock, builderAchievement));
chunkDestroyerAchievement = BuildCraftCore.achievementManager.registerAchievement(new Achievement("buildcraft|builders:achievement.chunkDestroyer", "chunkDestroyerAchievement", 9, 2, quarryBlock, BuildCraftCore.diamondGearAchievement));
if (BuildCraftCore.loadDefaultRecipes) {
loadRecipes();
}
BuilderProxy.proxy.registerBlockRenderers();
}
use of net.minecraft.stats.Achievement in project BuildCraft by BuildCraft.
the class BuildCraftSilicon method init.
@Mod.EventHandler
public void init(FMLInitializationEvent evt) {
channels = NetworkRegistry.INSTANCE.newChannel(DefaultProps.NET_CHANNEL_NAME + "-SILICON", new ChannelHandler(), new PacketHandler());
NetworkRegistry.INSTANCE.registerGuiHandler(instance, new SiliconGuiHandler());
BCRegistry.INSTANCE.registerTileEntity(TileLaser.class, "buildcraft.silicon.TileLaser", "net.minecraft.src.buildcraft.factory.TileLaser");
BCRegistry.INSTANCE.registerTileEntity(TileAssemblyTable.class, "buildcraft.silicon.TileAssemblyTable", "net.minecraft.src.buildcraft.factory.TileAssemblyTable");
BCRegistry.INSTANCE.registerTileEntity(TileAdvancedCraftingTable.class, "buildcraft.silicon.TileAdvancedCraftingTable", "net.minecraft.src.buildcraft.factory.TileAssemblyAdvancedWorkbench");
BCRegistry.INSTANCE.registerTileEntity(TileIntegrationTable.class, "buildcraft.silicon.TileIntegrationTable", "net.minecraft.src.buildcraft.factory.TileIntegrationTable");
BCRegistry.INSTANCE.registerTileEntity(TileChargingTable.class, "buildcraft.silicon.TileChargingTable", "net.minecraft.src.buildcraft.factory.TileChargingTable");
BCRegistry.INSTANCE.registerTileEntity(TileProgrammingTable.class, "buildcraft.silicon.TileProgrammingTable", "net.minecraft.src.buildcraft.factory.TileProgrammingTable");
timeForSomeLogicAchievement = BuildCraftCore.achievementManager.registerAchievement(new Achievement("buildcraft|silicon:achievement.timeForSomeLogic", "timeForSomeLogicAchievement", 9, -2, assemblyTableBlock, BuildCraftCore.diamondGearAchievement));
tinglyLaserAchievement = BuildCraftCore.achievementManager.registerAchievement(new Achievement("buildcraft|silicon:achievement.tinglyLaser", "tinglyLaserAchievement", 11, -2, laserBlock, timeForSomeLogicAchievement));
if (BuildCraftCore.loadDefaultRecipes) {
loadRecipes();
}
SiliconProxy.proxy.registerRenderers();
}
use of net.minecraft.stats.Achievement 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();
}
Aggregations