diff options
author | Draknyte1 <Draknyte1@hotmail.com> | 2016-10-23 16:39:30 +1000 |
---|---|---|
committer | Draknyte1 <Draknyte1@hotmail.com> | 2016-10-23 16:39:30 +1000 |
commit | 6754387bca14ef3c2bdc5e69d0f4920ca7568553 (patch) | |
tree | b6bd67e213a66bce0e418105b8a7ac51a141b6a0 /src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java | |
parent | 3826cbb1223a25a6d476486d9369d65a22090aec (diff) | |
download | GT5-Unofficial-6754387bca14ef3c2bdc5e69d0f4920ca7568553.tar.gz GT5-Unofficial-6754387bca14ef3c2bdc5e69d0f4920ca7568553.tar.bz2 GT5-Unofficial-6754387bca14ef3c2bdc5e69d0f4920ca7568553.zip |
% Moved more recipe generation to separate classes, now the order of item generation isn't important because recipe generation now happens after, not during item creation.
% Most Generated Item classes are now < 10 lines.
> This should slightly improve the startup time by 10-15 seconds, maybe more, maybe less.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java')
-rw-r--r-- | src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java | 121 |
1 files changed, 121 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java new file mode 100644 index 0000000000..4f749005d5 --- /dev/null +++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java @@ -0,0 +1,121 @@ +package gtPlusPlus.xmod.gregtech.loaders; + +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.recipe.UtilsRecipe; +import net.minecraft.item.ItemStack; + +public class RecipeGen_ShapedCrafting { + + public static void generateRecipes(Material material){ + Utils.LOG_INFO("Generating Shaped Crafting recipes for "+material.getLocalizedName()); //TODO + //Ring Recipe + if (!material.isRadioactive){ + if (UtilsRecipe.addShapedGregtechRecipe( + "craftingToolWrench", null, null, + null, material.getRod(1), null, + null, null, null, + material.getRing(1))){ + Utils.LOG_INFO("Ring Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Utils.LOG_INFO("Ring Recipe: "+material.getLocalizedName()+" - Failed"); + } + } + + //Framebox Recipe + if (!material.isRadioactive){ + ItemStack stackStick = material.getRod(1); + if (UtilsRecipe.addShapedGregtechRecipe( + stackStick, stackStick, stackStick, + stackStick, "craftingToolWrench", stackStick, + stackStick, stackStick, stackStick, + material.getFrameBox(2))){ + Utils.LOG_INFO("Framebox Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Utils.LOG_INFO("Framebox Recipe: "+material.getLocalizedName()+" - Failed"); + } + } + + //Shaped Recipe - Bolts + if (!material.isRadioactive){ + if (UtilsRecipe.addShapedGregtechRecipe( + "craftingToolSaw", null, null, + null, material.getRod(1), null, + null, null, null, + material.getBolt(2))){ + Utils.LOG_INFO("Bolt Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Utils.LOG_INFO("Bolt Recipe: "+material.getLocalizedName()+" - Failed"); + } + } + + + //Shaped Recipe - Ingot to Rod + if (UtilsRecipe.addShapedGregtechRecipe( + "craftingToolFile", null, null, + null, material.getIngot(1), null, + null, null, null, + material.getRod(1))){ + Utils.LOG_INFO("Rod Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Utils.LOG_INFO("Rod Recipe: "+material.getLocalizedName()+" - Failed"); + } + + + //Shaped Recipe - Long Rod to two smalls + if (UtilsRecipe.addShapedGregtechRecipe( + "craftingToolSaw", null, null, + material.getLongRod(1), null, null, + null, null, null, + material.getRod(2))){ + Utils.LOG_INFO("Rod Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Utils.LOG_INFO("Rod Recipe: "+material.getLocalizedName()+" - Failed"); + } + + //Two small to long rod + if (UtilsRecipe.addShapedGregtechRecipe( + material.getRod(1), "craftingToolHardHammer", material.getRod(1), + null, null, null, + null, null, null, + material.getLongRod(1))){ + Utils.LOG_INFO("Long Rod Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Utils.LOG_INFO("Long Rod Recipe: "+material.getLocalizedName()+" - Failed"); + } + + //Rotor Recipe + if (!material.isRadioactive){ + if (UtilsRecipe.addShapedGregtechRecipe( + material.getPlate(1), "craftingToolHardHammer", material.getPlate(1), + material.getScrew(1), material.getRing(1), "craftingToolFile", + material.getPlate(1), "craftingToolScrewdriver", material.getPlate(1), + material.getRotor(1))){ + Utils.LOG_INFO("Rotor Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Utils.LOG_INFO("Rotor Recipe: "+material.getLocalizedName()+" - Failed"); + } + } + + //Screws + if (!material.isRadioactive){ + if (UtilsRecipe.addShapedGregtechRecipe( + "craftingToolFile", material.getBolt(1), null, + material.getBolt(1), null, null, + null, null, null, + material.getScrew(1))){ + Utils.LOG_INFO("Screw Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Utils.LOG_INFO("Screw Recipe: "+material.getLocalizedName()+" - Failed"); + } + } + } +} |