Assline recipes part2

This commit is contained in:
Technus 2017-06-25 11:45:35 +02:00
parent 9beb1b5b31
commit ccc7cf9276

View file

@ -15,6 +15,7 @@ import gregtech.api.objects.ItemData;
import gregtech.api.util.GT_Log;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
import gregtech.common.items.GT_MetaGenerated_Tool_01;
import ic2.core.Ic2Items;
import net.minecraft.entity.player.EntityPlayer;
@ -352,7 +353,9 @@ public class GT_Achievements {
if (player == null || stack == null) {
return;
}
if(stack.getItem()==Items.paper){player.inventory.addItemStackToInventory(new ItemStack(Blocks.stone_slab,2));}
if (stack.getItem() == Items.paper) {
player.inventory.addItemStackToInventory(new ItemStack(Blocks.stone_slab, 2));
}
ItemData data = GT_OreDictUnificator.getItemData(stack);
if (data != null) {
if (data.mPrefix == OrePrefixes.dust && data.mMaterial.mMaterial == Materials.Bronze) {
@ -599,6 +602,19 @@ public class GT_Achievements {
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");}
issueAchievement(player, "buildQArmor");
}
if(player.capabilities.isCreativeMode && stack.getUnlocalizedName().equals("gt.metaitem.01.32761")){//Debug Scanner pickup shows all assline recipes.
for(GT_Recipe recipe: GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.mRecipeList) {
issueAchievement(player, recipe.getOutput(0).getUnlocalizedName());
recipe.mHidden=false;
}
}
for(GT_Recipe recipe: GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.mRecipeList){
if(recipe.getOutput(0).getUnlocalizedName().equals(stack.getUnlocalizedName())) {
issueAchievement(player, recipe.getOutput(0).getUnlocalizedName());
recipe.mHidden=false;
}
}
}
}