More achievements, added flax string and ornamental artifact

This commit is contained in:
Matt Caughey 2016-01-18 15:03:29 -05:00
parent 43bd569c3e
commit f87a79e0f1
11 changed files with 120 additions and 37 deletions

View File

@ -13,12 +13,15 @@ public class BOPAchievements
{
public static Achievement obtain_flowers;
public static Achievement obtain_berry;
public static Achievement obtain_coral;
public static Achievement eat_shroom_powder;
public static Achievement obtain_thorn;
public static Achievement obtain_poison_ivy;
public static Achievement craft_poison_jar;
public static Achievement craft_flax_string;
public static Achievement craft_amethyst_sword;
public static Achievement obtain_deathbloom;
public static Achievement obtain_glowshroom;
public static Achievement craft_dart_blower;
public static Achievement obtain_turnip;
public static Achievement grow_sacred_oak;
public static Achievement obtain_honeycomb;
public static Achievement obtain_pixie_dust;
public static Achievement obtain_ghastly_soul;

View File

@ -32,6 +32,8 @@ public class BOPItems
public static Item mudball;
public static Item turnip_seeds;
public static Item crystal_shard;
public static Item ornamental_artifact;
public static Item flax_string;
public static Item honeycomb;
public static Item gem;
public static Item ash;

View File

@ -14,6 +14,7 @@ import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.AchievementList;
import net.minecraft.util.BlockPos;
import net.minecraft.util.JsonSerializableSet;
@ -33,6 +34,7 @@ import biomesoplenty.common.block.BlockBOPMushroom;
import biomesoplenty.common.block.BlockBOPPlant;
import biomesoplenty.common.enums.BOPFlowers;
import biomesoplenty.common.enums.BOPPlants;
import biomesoplenty.common.item.ItemJarFilled;
import com.google.common.collect.Sets;
@ -64,24 +66,12 @@ public class AchievementEventHandler
player.triggerAchievement(BOPAchievements.obtain_berry);
}
//Totally Coral Achievement
if (block != null && block == BOPBlocks.coral)
{
player.triggerAchievement(BOPAchievements.obtain_coral);
}
//Rather Thorny Achievement
if (block != null && block == BlockBOPPlant.paging.getBlock(BOPPlants.THORN))
{
player.triggerAchievement(BOPAchievements.obtain_thorn);
}
//Pick Your Poison Achievement
if (block != null && block == BlockBOPPlant.paging.getBlock(BOPPlants.POISONIVY))
{
player.triggerAchievement(BOPAchievements.obtain_poison_ivy);
}
//I am Become Death Achievement
if (block != null && block == BlockBOPFlower.paging.getBlock(BOPFlowers.DEATHBLOOM))
{
@ -130,6 +120,37 @@ public class AchievementEventHandler
{
player.triggerAchievement(BOPAchievements.craft_ambrosia);
}
//Flaxen Fun Achievement
if (item != null && item == BOPItems.flax_string)
{
player.triggerAchievement(BOPAchievements.craft_flax_string);
}
//True Swordsman Achievement
if (item != null && item == BOPItems.amethyst_sword)
{
player.triggerAchievement(BOPAchievements.craft_amethyst_sword);
}
//Go Planet Achievement
if (item != null && item == BOPItems.ornamental_artifact)
{
player.triggerAchievement(BOPAchievements.craft_ornamental_artifact);
}
//Darts and Crafts Achievement
if (item != null && item == BOPItems.dart_blower)
{
player.triggerAchievement(BOPAchievements.craft_dart_blower);
}
//Pick Your Poison Achievement
if (item != null && item == new ItemStack(BOPItems.jar_filled, 1, ItemJarFilled.JarContents.POISON.ordinal()).getItem())
{
player.triggerAchievement(BOPAchievements.craft_poison_jar);
}
}
@SubscribeEvent

View File

@ -8,32 +8,36 @@
package biomesoplenty.common.init;
import static biomesoplenty.api.achievement.BOPAchievements.craft_ambrosia;
import static biomesoplenty.api.achievement.BOPAchievements.craft_amethyst_sword;
import static biomesoplenty.api.achievement.BOPAchievements.craft_dart_blower;
import static biomesoplenty.api.achievement.BOPAchievements.craft_flax_string;
import static biomesoplenty.api.achievement.BOPAchievements.craft_ornamental_artifact;
import static biomesoplenty.api.achievement.BOPAchievements.craft_poison_jar;
import static biomesoplenty.api.achievement.BOPAchievements.eat_shroom_powder;
import static biomesoplenty.api.achievement.BOPAchievements.explore_all_biomes;
import static biomesoplenty.api.achievement.BOPAchievements.grow_sacred_oak;
import static biomesoplenty.api.achievement.BOPAchievements.obtain_berry;
import static biomesoplenty.api.achievement.BOPAchievements.obtain_celestial_crystal;
import static biomesoplenty.api.achievement.BOPAchievements.obtain_coral;
import static biomesoplenty.api.achievement.BOPAchievements.obtain_deathbloom;
import static biomesoplenty.api.achievement.BOPAchievements.obtain_flowers;
import static biomesoplenty.api.achievement.BOPAchievements.obtain_ghastly_soul;
import static biomesoplenty.api.achievement.BOPAchievements.obtain_honeycomb;
import static biomesoplenty.api.achievement.BOPAchievements.obtain_pixie_dust;
import static biomesoplenty.api.achievement.BOPAchievements.obtain_poison_ivy;
import static biomesoplenty.api.achievement.BOPAchievements.obtain_thorn;
import static biomesoplenty.api.achievement.BOPAchievements.obtain_turnip;
import static biomesoplenty.api.achievement.BOPAchievements.obtain_deathbloom;
import static biomesoplenty.api.achievement.BOPAchievements.obtain_glowshroom;
import static biomesoplenty.api.achievement.BOPAchievements.obtain_ghastly_soul;
import static biomesoplenty.api.achievement.BOPAchievements.use_enderporter;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.Achievement;
import net.minecraftforge.common.AchievementPage;
import biomesoplenty.api.block.BOPBlocks;
import biomesoplenty.api.item.BOPItems;
import biomesoplenty.common.block.BlockBOPFlower;
import biomesoplenty.common.block.BlockBOPMushroom;
import biomesoplenty.common.block.BlockBOPPlant;
import biomesoplenty.common.block.BlockBOPSapling;
import biomesoplenty.common.enums.BOPFlowers;
import biomesoplenty.common.enums.BOPPlants;
import biomesoplenty.common.enums.BOPTrees;
import biomesoplenty.common.item.ItemJarFilled;
public class ModAchievements
{
@ -50,14 +54,17 @@ public class ModAchievements
{
obtain_flowers = addAchievement("achievement.obtain_flowers", "obtain_flowers", 0, 0, new ItemStack(Blocks.red_flower), null);
obtain_berry = addAchievement("achievement.obtain_berry", "obtain_berry", 2, 1, new ItemStack(BOPItems.berries), obtain_flowers);
obtain_coral = addAchievement("achievement.obtain_coral", "obtain_coral", 1, -2, new ItemStack(BOPBlocks.coral), obtain_berry);
obtain_thorn = addAchievement("achievement.obtain_thorn", "obtain_thorn", -2, -2, BlockBOPPlant.paging.getVariantItem(BOPPlants.THORN), obtain_coral);
obtain_glowshroom = addAchievement("achievement.obtain_glowshroom", "obtain_glowshroom", -5, -4, BlockBOPPlant.paging.getVariantItem(BOPPlants.KORU), obtain_coral);
obtain_poison_ivy = addAchievement("achievement.obtain_poison_ivy", "obtain_poison_ivy", -3, 1, BlockBOPPlant.paging.getVariantItem(BOPPlants.POISONIVY), obtain_thorn);
obtain_deathbloom = addAchievement("achievement.obtain_deathbloom", "obtain_deathbloom", -6, 2, BlockBOPFlower.paging.getVariantItem(BOPFlowers.DEATHBLOOM), obtain_poison_ivy);
obtain_turnip = addAchievement("achievement.obtain_turnip", "obtain_turnip", -1, -5, new ItemStack(BOPItems.turnip), obtain_coral);
obtain_honeycomb = addAchievement("achievement.obtain_honeycomb", "obtain_honeycomb", 3, -3, new ItemStack(BOPItems.filled_honeycomb), obtain_coral);
craft_ornamental_artifact = addAchievement("achievement.craft_ornamental_artifact", "craft_ornamental_artifact", 5, -4, new ItemStack(BOPItems.gem), obtain_honeycomb);
eat_shroom_powder = addAchievement("achievement.eat_shroom_powder", "eat_shroom_powder", 1, -2, new ItemStack(BOPItems.shroompowder), obtain_berry);
obtain_thorn = addAchievement("achievement.obtain_thorn", "obtain_thorn", -2, -2, BlockBOPPlant.paging.getVariantItem(BOPPlants.THORN), eat_shroom_powder);
craft_poison_jar = addAchievement("achievement.craft_poison_jar", "craft_poison_jar", -3, 1, new ItemStack(BOPItems.jar_filled, 1, ItemJarFilled.JarContents.POISON.ordinal()), obtain_thorn);
craft_flax_string = addAchievement("achievement.craft_flax_string", "craft_flax_string", -4, -4, new ItemStack(BOPItems.flax_string), eat_shroom_powder);
craft_dart_blower = addAchievement("achievement.craft_dart_blower", "craft_dart_blower", -6, -2, new ItemStack(BOPItems.dart_blower), craft_flax_string);
craft_amethyst_sword = addAchievement("achievement.craft_amethyst_sword", "craft_amethyst_sword", -7, 0, new ItemStack(BOPItems.amethyst_sword), craft_dart_blower).setSpecial();
obtain_deathbloom = addAchievement("achievement.obtain_deathbloom", "obtain_deathbloom", -6, 2, BlockBOPFlower.paging.getVariantItem(BOPFlowers.DEATHBLOOM), craft_poison_jar);
obtain_turnip = addAchievement("achievement.obtain_turnip", "obtain_turnip", -1, -5, new ItemStack(BOPItems.turnip), eat_shroom_powder);
grow_sacred_oak = addAchievement("achievement.grow_sacred_oak", "grow_sacred_oak", -3, -6, BlockBOPSapling.paging.getVariantItem(BOPTrees.SACRED_OAK), obtain_turnip).setSpecial();
obtain_honeycomb = addAchievement("achievement.obtain_honeycomb", "obtain_honeycomb", 3, -3, new ItemStack(BOPItems.filled_honeycomb), eat_shroom_powder);
craft_ornamental_artifact = addAchievement("achievement.craft_ornamental_artifact", "craft_ornamental_artifact", 5, -4, new ItemStack(BOPItems.ornamental_artifact), obtain_honeycomb);
obtain_pixie_dust = addAchievement("achievement.obtain_pixie_dust", "obtain_pixie_dust", 7, -2, new ItemStack(BOPItems.pixie_dust), craft_ornamental_artifact);
obtain_ghastly_soul = addAchievement("achievement.obtain_ghastly_soul", "obtain_ghastly_soul", 4, 2, new ItemStack(BOPItems.ghastly_soul), obtain_honeycomb);
obtain_celestial_crystal = addAchievement("achievement.obtain_celestial_crystal", "obtain_celestial_crystal", 6, 0, new ItemStack(BOPItems.crystal_shard), obtain_honeycomb);

View File

@ -180,7 +180,8 @@ public class ModCrafting
/*** Misc Others ***/
GameRegistry.addShapedRecipe(new ItemStack(Items.string), new Object[] {"FFF", "FFF", "FFF", 'F', ((BlockBOPDoublePlant)BOPBlocks.double_plant).getVariantItem(BlockBOPDoublePlant.DoublePlantType.FLAX)});
GameRegistry.addShapedRecipe(new ItemStack(BOPItems.flax_string), new Object[] {"FFF", "FFF", "FFF", 'F', ((BlockBOPDoublePlant)BOPBlocks.double_plant).getVariantItem(BlockBOPDoublePlant.DoublePlantType.FLAX)});
GameRegistry.addShapedRecipe(new ItemStack(Items.string), new Object[] {"S", "S", "S", 'S', new ItemStack(BOPItems.flax_string)});
GameRegistry.addShapedRecipe(new ItemStack(BOPBlocks.grass, 1, BlockBOPGrass.BOPGrassType.OVERGROWN_NETHERRACK.ordinal()), new Object[] {"SSS", "SNS", "SSS", 'S', Items.wheat_seeds, 'N', Blocks.netherrack});
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.wool), new Object [] {"CCC", "CCC", "CCC", 'C', "plantCattail"}));
GameRegistry.addShapedRecipe(new ItemStack(Items.coal), new Object[] {"AAA", "AAA", "AAA", 'A', new ItemStack(BOPItems.ash)});
@ -196,6 +197,7 @@ public class ModCrafting
GameRegistry.addShapedRecipe(new ItemStack(BOPBlocks.bamboo, 8), new Object [] {"# ", " #", '#', new ItemStack(BOPBlocks.bamboo_thatching)});
GameRegistry.addShapedRecipe(new ItemStack(BOPItems.jar_empty, 3, 0), new Object[] {"# #", "# #", "###", '#', Blocks.glass});
GameRegistry.addShapelessRecipe(new ItemStack(BOPItems.ambrosia), new Object[] {new ItemStack(BOPItems.pixie_dust), new ItemStack(Items.potionitem, 1, 0), new ItemStack(BOPItems.ichor), new ItemStack(BOPBlocks.seaweed, 1, BlockBOPSeaweed.SeaweedType.KELP.ordinal()), BlockBOPPlant.paging.getVariantItem(BOPPlants.ROOT), new ItemStack(BOPItems.crystal_shard), new ItemStack(BOPItems.jar_filled, 1, ItemJarFilled.JarContents.HONEY.ordinal()), new ItemStack(BOPItems.berries), Items.sugar});
GameRegistry.addShapelessRecipe(new ItemStack(BOPItems.ornamental_artifact), new Object[] {new ItemStack(BOPItems.gem, 1, BOPGems.RUBY.ordinal()), new ItemStack(BOPItems.gem, 1, BOPGems.TOPAZ.ordinal()), new ItemStack(BOPItems.gem, 1, BOPGems.AMBER.ordinal()), new ItemStack(BOPItems.gem, 1, BOPGems.PERIDOT.ordinal()), new ItemStack(BOPItems.gem, 1, BOPGems.MALACHITE.ordinal()), new ItemStack(BOPItems.gem, 1, BOPGems.SAPPHIRE.ordinal()), new ItemStack(BOPItems.gem, 1, BOPGems.TANZANITE.ordinal()), Items.emerald});
GameRegistry.addShapedRecipe(new ItemStack(BOPBlocks.flesh), new Object[] {"##", "##", '#', new ItemStack(BOPItems.fleshchunk)});
GameRegistry.addShapedRecipe(new ItemStack(Items.rotten_flesh), new Object[] {"FFF", "FPF", "FFF", 'F', new ItemStack(BOPItems.fleshchunk), 'P', new ItemStack(BOPItems.jar_filled, 1, ItemJarFilled.JarContents.POISON.ordinal())});

View File

@ -71,6 +71,9 @@ public class ModItems
mudball = registerItem(new ItemMudball(), "mudball");
turnip_seeds = registerItem(new ItemSeeds(BOPBlocks.turnip_block, Blocks.farmland), "turnip_seeds");
crystal_shard = registerItem(new Item(), "crystal_shard");
ornamental_artifact = registerItem(new Item(), "ornamental_artifact");
ornamental_artifact.setMaxStackSize(1);
flax_string = registerItem(new Item(), "flax_string");
honeycomb = registerItem(new Item(), "honeycomb");
gem = registerItem(new ItemGem(), "gem");
ash = registerItem(new Item(), "ash");

View File

@ -2,16 +2,22 @@ achievement.obtain_flowers=Flower Child
achievement.obtain_flowers.desc=Find a fresh flower!
achievement.obtain_berry=Berry Good
achievement.obtain_berry.desc=Pick a ripe berry from a bush
achievement.obtain_coral=Totally Coral!
achievement.obtain_coral.desc=Dive deep for coral
achievement.eat_shroom_powder=Trippin'
achievement.eat_shroom_powder.desc=Ingest some magical shroom powder
achievement.obtain_turnip=Stalk Market
achievement.obtain_turnip.desc=Harvest a turnip
achievement.obtain_glowshroom=Fluorescent Fungi
achievement.obtain_glowshroom.desc=Find a glowing glowshroom!
achievement.grow_sacred_oak=Yggdrasil
achievement.grow_sacred_oak.desc=Grow a Sacred Oak tree from a sapling
achievement.craft_flax_string=Flaxen Fun
achievement.craft_flax_string.desc=Craft flax plants into flax string
achievement.craft_dart_blower=Darts and Crafts
achievement.craft_dart_blower.desc=Craft a dart blower with river cane
achievement.craft_amethyst_sword=True Swordsman
achievement.craft_amethyst_sword.desc=Upgrade to an amethyst sword
achievement.obtain_thorn=Rather Thorny
achievement.obtain_thorn.desc=Collect a prickly thorn!
achievement.obtain_poison_ivy=Pick Your Poison
achievement.obtain_poison_ivy.desc=Pluck some poison ivy from the ground
achievement.craft_poison_jar=Pick Your Poison
achievement.craft_poison_jar.desc=Extract poison from a poison ivy plant
achievement.obtain_deathbloom=I am Become Death
achievement.obtain_deathbloom.desc=Acquire a deadly deathbloom
achievement.obtain_honeycomb=Honeycomb's Big
@ -75,6 +81,8 @@ item.blue_dye.name=Blue Dye
item.brown_dye.name=Brown Dye
item.cherry_door.name=Cherry Door
item.crystal_shard.name=Celestial Crystal Shard
item.ornamental_artifact.name=Ornamental Artifact
item.flax_string.name=Flax String
item.dark_door.name=Dark Door
item.dart.name=Dart
item.dart_blower.name=Dart Blower

View File

@ -0,0 +1,18 @@
{
"parent": "builtin/generated",
"textures": {
"layer0": "biomesoplenty:items/flax_string"
},
"display": {
"thirdperson": {
"rotation": [ -90, 0, 0 ],
"translation": [ 0, 1, -3 ],
"scale": [ 0.55, 0.55, 0.55 ]
},
"firstperson": {
"rotation": [ 0, -135, 25 ],
"translation": [ 0, 4, 2 ],
"scale": [ 1.7, 1.7, 1.7 ]
}
}
}

View File

@ -0,0 +1,19 @@
{
"parent": "builtin/generated",
"textures": {
"layer0": "biomesoplenty:items/ornamental_artifact"
},
"display": {
"thirdperson": {
"rotation": [ -90, 0, 0 ],
"translation": [ 0, 1, -3 ],
"scale": [ 0.55, 0.55, 0.55 ]
},
"firstperson": {
"rotation": [ 0, -135, 25 ],
"translation": [ 0, 4, 2 ],
"scale": [ 1.7, 1.7, 1.7 ]
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 604 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 481 B