Finished the achievements
-Moved all achievements to the craftinghandler -Added "Refine and redefine" -Added "Tingly Laser"
This commit is contained in:
parent
45d1458ae5
commit
c40d3ce02c
8 changed files with 38 additions and 36 deletions
|
@ -238,12 +238,16 @@ achievement.diamondGearAchievement.desc=Upgrade a gold gear to a diamond gear
|
|||
achievement.wrenchAchievement=Just hit it!
|
||||
achievement.wrenchAchievement.desc=Make a wrench
|
||||
achievement.aLotOfCraftingAchievement=A lot of crafting
|
||||
achievement.aLotOfCraftingAchievement.desc=Place a auto workbench in the world
|
||||
achievement.aLotOfCraftingAchievement.desc=Craft a auto workbench
|
||||
achievement.straightDownAchievement=Straight down
|
||||
achievement.straightDownAchievement.desc=Place a mining well in the world
|
||||
achievement.straightDownAchievement.desc=Make a mining well in the world
|
||||
achievement.chunkDestroyerAchievement=Chunk destroyer
|
||||
achievement.chunkDestroyerAchievement.desc=Place a quarry in the world
|
||||
achievement.chunkDestroyerAchievement.desc=Craft a quarry
|
||||
achievement.fasterFillingAchievement=Faster filling
|
||||
achievement.fasterFillingAchievement.desc=Place a filler in the world
|
||||
achievement.fasterFillingAchievement.desc=Make a filler
|
||||
achievement.timeForSomeLogicAchievement=Time for some logic
|
||||
achievement.timeForSomeLogicAchievement.desc=Place an assembly table in the world
|
||||
achievement.timeForSomeLogicAchievement.desc=Craft an assembly table
|
||||
achievement.refineAndRedefineAchievement=Refine and redefine
|
||||
achievement.refineAndRedefineAchievement.desc=Make a refinery
|
||||
achievement.tinglyLaserAchievement=Tingly laser
|
||||
achievement.tinglyLaserAchievement.desc=Craft a laser
|
|
@ -179,6 +179,8 @@ public class BuildCraftCore extends BuildCraftMod {
|
|||
public static Achievement chunkDestroyerAchievement;
|
||||
public static Achievement fasterFillingAchievement;
|
||||
public static Achievement timeForSomeLogicAchievement;
|
||||
public static Achievement refineAndRedefineAchievement;
|
||||
public static Achievement tinglyLaserAchievement;
|
||||
public static AchievementPage BuildcraftAchievements;
|
||||
|
||||
@EventHandler
|
||||
|
@ -380,8 +382,10 @@ public class BuildCraftCore extends BuildCraftMod {
|
|||
chunkDestroyerAchievement = new Achievement("achievement.chunkDestroyer", "chunkDestroyerAchievement", 9, 2, BuildCraftFactory.quarryBlock, diamondGearAchievement).registerStat();
|
||||
fasterFillingAchievement = new Achievement("achievement.fasterFilling", "fasterFillingAchievement", 7, 2, BuildCraftBuilders.fillerBlock, goldGearAchievement).registerStat();
|
||||
timeForSomeLogicAchievement = new Achievement("achievement.timeForSomeLogic", "timeForSomeLogicAchievement", 9, -2, BuildCraftSilicon.assemblyTableBlock, diamondGearAchievement).registerStat();
|
||||
refineAndRedefineAchievement = new Achievement("achievement.refineAndRedefine", "refineAndRedefineAchievement", 10, 0, BuildCraftFactory.refineryBlock, diamondGearAchievement).registerStat();
|
||||
tinglyLaserAchievement = new Achievement("achievement.tinglyLaser", "tinglyLaserAchievement", 11, -2, BuildCraftSilicon.laserBlock ,timeForSomeLogicAchievement).registerStat();
|
||||
|
||||
BuildcraftAchievements = new AchievementPage("Buildcraft", woodenGearAchievement, stoneGearAchievement, ironGearAchievement, goldGearAchievement, diamondGearAchievement, wrenchAchievement, aLotOfCraftingAchievement, straightDownAchievement, chunkDestroyerAchievement, fasterFillingAchievement, timeForSomeLogicAchievement);
|
||||
BuildcraftAchievements = new AchievementPage("Buildcraft", woodenGearAchievement, stoneGearAchievement, ironGearAchievement, goldGearAchievement, diamondGearAchievement, wrenchAchievement, aLotOfCraftingAchievement, straightDownAchievement, chunkDestroyerAchievement, fasterFillingAchievement, timeForSomeLogicAchievement, refineAndRedefineAchievement, tinglyLaserAchievement);
|
||||
AchievementPage.registerAchievementPage(BuildcraftAchievements);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -108,11 +108,4 @@ public class BlockFiller extends BlockContainer {
|
|||
textureTopOff = par1IconRegister.registerIcon("buildcraft:blockFillerTopOff");
|
||||
textureSides = par1IconRegister.registerIcon("buildcraft:blockFillerSides");
|
||||
}
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int i, int j, int k, EntityLivingBase entityliving, ItemStack stack){
|
||||
if (entityliving instanceof EntityPlayer){
|
||||
EntityPlayer p=(EntityPlayer) entityliving;
|
||||
p.addStat(BuildCraftCore.fasterFillingAchievement, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
package buildcraft.core.utils;
|
||||
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.PlayerEvent;
|
||||
import buildcraft.BuildCraftBuilders;
|
||||
import buildcraft.BuildCraftCore;
|
||||
import buildcraft.BuildCraftFactory;
|
||||
import buildcraft.BuildCraftSilicon;
|
||||
|
||||
public class CraftingHandler {
|
||||
|
||||
|
@ -28,6 +31,27 @@ public class CraftingHandler {
|
|||
if (Event.crafting.getItem().equals(BuildCraftCore.wrenchItem)){
|
||||
Event.player.addStat(BuildCraftCore.wrenchAchievement, 1);
|
||||
}
|
||||
if(Event.crafting.getItem().equals(Item.getItemFromBlock(BuildCraftFactory.autoWorkbenchBlock))){
|
||||
Event.player.addStat(BuildCraftCore.aLotOfCraftingAchievement, 1);
|
||||
}
|
||||
if (Event.crafting.getItem().equals(Item.getItemFromBlock(BuildCraftFactory.miningWellBlock))){
|
||||
Event.player.addStat(BuildCraftCore.straightDownAchievement, 1);
|
||||
}
|
||||
if (Event.crafting.getItem().equals(Item.getItemFromBlock(BuildCraftFactory.quarryBlock))){
|
||||
Event.player.addStat(BuildCraftCore.chunkDestroyerAchievement, 1);
|
||||
}
|
||||
if (Event.crafting.getItem().equals(Item.getItemFromBlock(BuildCraftFactory.refineryBlock))){
|
||||
Event.player.addStat(BuildCraftCore.refineAndRedefineAchievement, 1);
|
||||
}
|
||||
if (Event.crafting.getItem().equals(Item.getItemFromBlock(BuildCraftBuilders.fillerBlock))){
|
||||
Event.player.addStat(BuildCraftCore.fasterFillingAchievement, 1);
|
||||
}
|
||||
if (Event.crafting.getItem().equals(Item.getItemFromBlock(BuildCraftSilicon.laserBlock))){
|
||||
Event.player.addStat(BuildCraftCore.tinglyLaserAchievement, 1);
|
||||
}
|
||||
if (Event.crafting.getItem().equals(Item.getItemFromBlock(BuildCraftSilicon.assemblyTableBlock))){
|
||||
Event.player.addStat(BuildCraftCore.timeForSomeLogicAchievement, 1);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -78,12 +78,4 @@ public class BlockAutoWorkbench extends BlockBuildCraft {
|
|||
topTexture = par1IconRegister.registerIcon("buildcraft:autoWorkbench_top");
|
||||
sideTexture = par1IconRegister.registerIcon("buildcraft:autoWorkbench_side");
|
||||
}
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int i, int j, int k, EntityLivingBase entityliving, ItemStack stack) {
|
||||
if (entityliving instanceof EntityPlayer){
|
||||
EntityPlayer p=(EntityPlayer) entityliving;
|
||||
p.addStat(BuildCraftCore.aLotOfCraftingAchievement, 1);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -65,10 +65,6 @@ public class BlockMiningWell extends BlockBuildCraft {
|
|||
@Override
|
||||
public void onBlockPlacedBy(World world, int i, int j, int k, EntityLivingBase entityliving, ItemStack stack) {
|
||||
ForgeDirection orientation = Utils.get2dOrientation(entityliving);
|
||||
if (entityliving instanceof EntityPlayer){
|
||||
EntityPlayer p=(EntityPlayer) entityliving;
|
||||
p.addStat(BuildCraftCore.straightDownAchievement, 1);
|
||||
}
|
||||
world.setBlockMetadataWithNotify(i, j, k, orientation.getOpposite().ordinal(),1);
|
||||
}
|
||||
|
||||
|
|
|
@ -52,10 +52,6 @@ public class BlockQuarry extends BlockBuildCraft {
|
|||
@Override
|
||||
public void onBlockPlacedBy(World world, int i, int j, int k, EntityLivingBase entityliving, ItemStack stack) {
|
||||
super.onBlockPlacedBy(world, i, j, k, entityliving, stack);
|
||||
if (entityliving instanceof EntityPlayer){
|
||||
EntityPlayer p=(EntityPlayer) entityliving;
|
||||
p.addStat(BuildCraftCore.chunkDestroyerAchievement, 1);
|
||||
}
|
||||
|
||||
ForgeDirection orientation = Utils.get2dOrientation(entityliving);
|
||||
|
||||
|
|
|
@ -135,11 +135,4 @@ public class BlockLaserTable extends BlockContainer {
|
|||
icons[2][1] = par1IconRegister.registerIcon("buildcraft:integrationtable_top");
|
||||
icons[2][2] = par1IconRegister.registerIcon("buildcraft:integrationtable_side");
|
||||
}
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int i, int j, int k, EntityLivingBase entityliving, ItemStack stack){
|
||||
if (entityliving instanceof EntityPlayer){
|
||||
EntityPlayer p=(EntityPlayer) entityliving;
|
||||
p.addStat(BuildCraftCore.timeForSomeLogicAchievement, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue