make GT trigger ic2 achievements (Blood Asp)

This commit is contained in:
Dream-Master 2016-07-04 17:46:17 +02:00
parent a9039f249a
commit b99feff3d8
5 changed files with 48 additions and 16 deletions

View file

@ -184,6 +184,15 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl
if (mInventory[1].getUnlocalizedName().endsWith("5")) { if (mInventory[1].getUnlocalizedName().endsWith("5")) {
tTier = 5; tTier = 5;
} }
if (mInventory[1].getUnlocalizedName().endsWith("6")) {
tTier = 6;
}
if (mInventory[1].getUnlocalizedName().endsWith("7")) {
tTier = 7;
}
if (mInventory[1].getUnlocalizedName().endsWith("8")) {
tTier = 8;
}
ItemStack[] tInputs = (ItemStack[]) tInputList.toArray(new ItemStack[tInputList.size()]); ItemStack[] tInputs = (ItemStack[]) tInputList.toArray(new ItemStack[tInputList.size()]);

View file

@ -88,7 +88,7 @@ public class GT_Tool_Chainsaw_LV
public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) { public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) {
super.onToolCrafted(aStack, aPlayer); super.onToolCrafted(aStack, aPlayer);
try { try {
GT_Mod.instance.achievements.issueAchievement(aPlayer, "brrrr"); GT_Mod.instance.achievements.issueAchievement(aPlayer, "buildChainsaw");
} catch (Exception e) { } catch (Exception e) {
} }
} }

View file

@ -43,7 +43,7 @@ public class GT_Tool_Drill_HV
public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) { public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) {
super.onToolCrafted(aStack, aPlayer); super.onToolCrafted(aStack, aPlayer);
try { try {
GT_Mod.instance.achievements.issueAchievement(aPlayer, "highpowerdrill"); GT_Mod.instance.achievements.issueAchievement(aPlayer, "buildDDrill");
} catch (Exception e) { } catch (Exception e) {
} }
} }

View file

@ -98,7 +98,7 @@ public class GT_Tool_Drill_LV
aPlayer.triggerAchievement(AchievementList.buildPickaxe); aPlayer.triggerAchievement(AchievementList.buildPickaxe);
aPlayer.triggerAchievement(AchievementList.buildBetterPickaxe); aPlayer.triggerAchievement(AchievementList.buildBetterPickaxe);
try { try {
GT_Mod.instance.achievements.issueAchievement(aPlayer, "driltime"); GT_Mod.instance.achievements.issueAchievement(aPlayer, "buildDrill");
} catch (Exception e) { } catch (Exception e) {
} }
} }

View file

@ -16,6 +16,7 @@ import gregtech.api.util.GT_Log;
import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_OreDictUnificator;
import gregtech.common.items.GT_MetaGenerated_Tool_01; import gregtech.common.items.GT_MetaGenerated_Tool_01;
import ic2.core.Ic2Items;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items; import net.minecraft.init.Items;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -291,6 +292,8 @@ public class GT_Achievements {
} }
if (stack.getUnlocalizedName().equals("ic2.itemPartIndustrialDiamond")) { if (stack.getUnlocalizedName().equals("ic2.itemPartIndustrialDiamond")) {
issueAchievement(player, "artificaldia"); issueAchievement(player, "artificaldia");
issueAchievement(player, "buildCoalDiamond");
} }
} }
@ -335,6 +338,7 @@ public class GT_Achievements {
issueAchievement(player, "magneticiron"); issueAchievement(player, "magneticiron");
} else if (stack.getUnlocalizedName().equals("gt.metaitem.01.32600")) { } else if (stack.getUnlocalizedName().equals("gt.metaitem.01.32600")) {
issueAchievement(player, "lvmotor"); issueAchievement(player, "lvmotor");
issueAchievement(player, "buildCable");
} else if (stack.getUnlocalizedName().equals("gt.metaitem.01.32610")) { } else if (stack.getUnlocalizedName().equals("gt.metaitem.01.32610")) {
issueAchievement(player, "pumpcover"); issueAchievement(player, "pumpcover");
} else if (stack.getUnlocalizedName().equals("gt.metaitem.01.32630")) { } else if (stack.getUnlocalizedName().equals("gt.metaitem.01.32630")) {
@ -359,10 +363,17 @@ public class GT_Achievements {
issueAchievement(player, "highpressure"); issueAchievement(player, "highpressure");
} else if (stack.getUnlocalizedName().equals("gt.blockmachines.bronzemachine.macerator")) { } else if (stack.getUnlocalizedName().equals("gt.blockmachines.bronzemachine.macerator")) {
issueAchievement(player, "macerator"); issueAchievement(player, "macerator");
issueAchievement(player, "buildMacerator");
} else if (stack.getUnlocalizedName().equals("gt.blockmachines.bronzemachine.alloysmelter")) { } else if (stack.getUnlocalizedName().equals("gt.blockmachines.bronzemachine.alloysmelter")) {
issueAchievement(player, "alloysmelter"); issueAchievement(player, "alloysmelter");
issueAchievement(player, "buildElecFurnace");
if(stack.getUnlocalizedName().equals("gt.blockmachines.bronzemachine.alloysmelter.tier.3")){
issueAchievement(player, "buildIndFurnace");
}
} else if (stack.getUnlocalizedName().equals("gt.blockmachines.bronzemachine.extractor")) { } else if (stack.getUnlocalizedName().equals("gt.blockmachines.bronzemachine.extractor")) {
issueAchievement(player, "extract"); issueAchievement(player, "extract");
issueAchievement(player, "buildCompressor");
issueAchievement(player, "buildExtractor");
} else if (stack.getUnlocalizedName().startsWith("gt.blockmachines.automation.superbuffer.tier.")) { } else if (stack.getUnlocalizedName().startsWith("gt.blockmachines.automation.superbuffer.tier.")) {
issueAchievement(player, "superbuffer"); issueAchievement(player, "superbuffer");
} else if (stack.getUnlocalizedName().startsWith("gt.blockmachines.quantum.tank.tier.")) { } else if (stack.getUnlocalizedName().startsWith("gt.blockmachines.quantum.tank.tier.")) {
@ -373,8 +384,13 @@ public class GT_Achievements {
issueAchievement(player, "cheapermac"); issueAchievement(player, "cheapermac");
} else if (stack.getUnlocalizedName().startsWith("gt.blockmachines.automation.chestbuffer.tier.")) { } else if (stack.getUnlocalizedName().startsWith("gt.blockmachines.automation.chestbuffer.tier.")) {
issueAchievement(player, "buffer"); issueAchievement(player, "buffer");
issueAchievement(player, "buildBatBox");
if(stack.getUnlocalizedName().startsWith("gt.blockmachines.automation.chestbuffer.tier.3")){
issueAchievement(player, "buildMFE");
}
} else if (stack.getUnlocalizedName().startsWith("gt.blockmachines.basicgenerator.steamturbine.tier.")) { } else if (stack.getUnlocalizedName().startsWith("gt.blockmachines.basicgenerator.steamturbine.tier.")) {
issueAchievement(player, "steampower"); issueAchievement(player, "steampower");
issueAchievement(player, "buildGenerator");
} else if (stack.getUnlocalizedName().equals("gt.blockmachines.basicmachine.pump.tier.03")) { } else if (stack.getUnlocalizedName().equals("gt.blockmachines.basicmachine.pump.tier.03")) {
issueAchievement(player, "slurp"); issueAchievement(player, "slurp");
} else if (stack.getUnlocalizedName().startsWith("gt.blockmachines.basicmachine.assembler.tier.")) { } else if (stack.getUnlocalizedName().startsWith("gt.blockmachines.basicmachine.assembler.tier.")) {
@ -399,6 +415,7 @@ public class GT_Achievements {
issueAchievement(player, "amplifier"); issueAchievement(player, "amplifier");
} else if (stack.getUnlocalizedName().startsWith("gt.blockmachines.basicmachine.massfab.tier.")) { } else if (stack.getUnlocalizedName().startsWith("gt.blockmachines.basicmachine.massfab.tier.")) {
issueAchievement(player, "universal"); issueAchievement(player, "universal");
issueAchievement(player, "buildMassFab");
} else if (stack.getUnlocalizedName().startsWith("gt.blockmachines.basicgenerator.naquadah.tier.")) { } else if (stack.getUnlocalizedName().startsWith("gt.blockmachines.basicgenerator.naquadah.tier.")) {
issueAchievement(player, "alienpower"); issueAchievement(player, "alienpower");
} else if (stack.getUnlocalizedName().startsWith("gt.blockmachines.basicmachine.replicator.tier.")) { } else if (stack.getUnlocalizedName().startsWith("gt.blockmachines.basicmachine.replicator.tier.")) {
@ -456,6 +473,10 @@ public class GT_Achievements {
if (data.getAllMaterialStacks().get(i).mMaterial == Materials.AnyIron) { if (data.getAllMaterialStacks().get(i).mMaterial == Materials.AnyIron) {
issueAchievement(player, "iron"); issueAchievement(player, "iron");
} }
if(data.getAllMaterialStacks().get(i).mMaterial == Materials.Copper||data.getAllMaterialStacks().get(i).mMaterial == Materials.Tin){
issueAchievement(event.entityPlayer, "mineOre");
}
} }
} else if (data.mPrefix == OrePrefixes.crushed) { } else if (data.mPrefix == OrePrefixes.crushed) {
issueAchievement(player, "crushed"); issueAchievement(player, "crushed");
@ -515,6 +536,8 @@ public class GT_Achievements {
} }
} else if (stack.getUnlocalizedName().equals("gt.Thoriumcell")) { } else if (stack.getUnlocalizedName().equals("gt.Thoriumcell")) {
issueAchievement(player, "newfuel"); issueAchievement(player, "newfuel");
} }else if ((stack.getItem() == Ic2Items.quantumBodyarmor.getItem()) || (stack.getItem() == Ic2Items.quantumBoots.getItem()) ||
(stack.getItem() == Ic2Items.quantumHelmet.getItem()) || (stack.getItem() == Ic2Items.quantumLeggings.getItem())) {
issueAchievement(player, "buildQArmor");}
} }
} }