diff --git a/src/main/java/micdoodle8/mods/galacticraft/core/nei/NEIGalacticraftConfig.java b/src/main/java/micdoodle8/mods/galacticraft/core/nei/NEIGalacticraftConfig.java index a8aeb103a7..3f0fc92d27 100644 --- a/src/main/java/micdoodle8/mods/galacticraft/core/nei/NEIGalacticraftConfig.java +++ b/src/main/java/micdoodle8/mods/galacticraft/core/nei/NEIGalacticraftConfig.java @@ -23,6 +23,8 @@ import micdoodle8.mods.galacticraft.core.blocks.GCBlocks; import micdoodle8.mods.galacticraft.core.items.GCItems; import micdoodle8.mods.galacticraft.core.util.ConfigManagerCore; +import micdoodle8.mods.galacticraft.planets.asteroids.items.AsteroidsItems; +import micdoodle8.mods.galacticraft.planets.mars.items.MarsItems; public class NEIGalacticraftConfig implements IConfigureNEI { @@ -54,6 +56,8 @@ public void loadConfig() { API.hideItem(new ItemStack(GCItems.basicItem, 1, 4)); API.hideItem(new ItemStack(GCItems.basicItem, 1, 5)); API.hideItem(new ItemStack(GCItems.meteoricIronIngot, 1, 0)); + API.hideItem(new ItemStack(MarsItems.marsItemBasic, 1, 2)); + API.hideItem(new ItemStack(AsteroidsItems.basicItem, 1, 5)); } // Handled by GalaxySpace diff --git a/src/main/java/micdoodle8/mods/galacticraft/core/recipe/RecipeManagerGC.java b/src/main/java/micdoodle8/mods/galacticraft/core/recipe/RecipeManagerGC.java index f16a8b25d4..de1b3d09e3 100644 --- a/src/main/java/micdoodle8/mods/galacticraft/core/recipe/RecipeManagerGC.java +++ b/src/main/java/micdoodle8/mods/galacticraft/core/recipe/RecipeManagerGC.java @@ -124,46 +124,6 @@ private static void addUniversalRecipes() { GCLog.exception(e); } } - - final Object meteoricIronIngot = ConfigManagerCore.recipesRequireGCAdvancedMetals ? GCItems.meteoricIronIngot - : "ingotMeteoricIron"; - final Object meteoricIronPlate = ConfigManagerCore.recipesRequireGCAdvancedMetals - ? new ItemStack(GCItems.meteoricIronIngot, 1, 1) - : "compressedMeteoricIron"; - final Object deshIngot = ConfigManagerCore.recipesRequireGCAdvancedMetals - ? new ItemStack(MarsItems.marsItemBasic, 1, 2) - : "ingotDesh"; - - // RocketFuelRecipe.addFuel(GalacticraftCore.fluidFuel,1); - if (!Loader.isModLoaded(Constants.MOD_ID_NEW_HORIZONS_CORE_MOD)) { - FurnaceRecipes.smelting().func_151394_a( - new ItemStack(GCBlocks.basicBlock, 1, 5), - new ItemStack(GCItems.basicItem, 1, 3), - 0.5F); - FurnaceRecipes.smelting().func_151394_a( - new ItemStack(GCBlocks.basicBlock, 1, 6), - new ItemStack(GCItems.basicItem, 1, 4), - 0.5F); - FurnaceRecipes.smelting().func_151394_a( - new ItemStack(GCBlocks.basicBlock, 1, 7), - new ItemStack(GCItems.basicItem, 1, 5), - 0.5F); - FurnaceRecipes.smelting() - .func_151396_a(GCItems.meteoricIronRaw, new ItemStack(GCItems.meteoricIronIngot), 1.0F); - FurnaceRecipes.smelting().func_151394_a( - new ItemStack(GCBlocks.blockMoon, 1, 0), - new ItemStack(GCItems.basicItem, 1, 3), - 1.0F); - FurnaceRecipes.smelting().func_151394_a( - new ItemStack(GCBlocks.blockMoon, 1, 1), - new ItemStack(GCItems.basicItem, 1, 4), - 1.0F); - // Recycling: smelt tin/copper canisters back into ingots - FurnaceRecipes.smelting() - .func_151394_a(new ItemStack(GCItems.canister, 1, 0), new ItemStack(GCItems.basicItem, 3, 4), 1.0F); - FurnaceRecipes.smelting() - .func_151394_a(new ItemStack(GCItems.canister, 1, 1), new ItemStack(GCItems.basicItem, 3, 3), 1.0F); - } FurnaceRecipes.smelting().func_151394_a( new ItemStack(GCItems.meteorChunk, 1, 0), new ItemStack(GCItems.meteorChunk, 1, 1), @@ -202,6 +162,43 @@ private static void addUniversalRecipes() { } if (!Loader.isModLoaded(Constants.MOD_ID_NEW_HORIZONS_CORE_MOD)) { + final Object meteoricIronIngot = ConfigManagerCore.recipesRequireGCAdvancedMetals + ? GCItems.meteoricIronIngot + : "ingotMeteoricIron"; + final Object meteoricIronPlate = ConfigManagerCore.recipesRequireGCAdvancedMetals + ? new ItemStack(GCItems.meteoricIronIngot, 1, 1) + : "compressedMeteoricIron"; + final Object deshIngot = ConfigManagerCore.recipesRequireGCAdvancedMetals + ? new ItemStack(MarsItems.marsItemBasic, 1, 2) + : "ingotDesh"; + FurnaceRecipes.smelting().func_151394_a( + new ItemStack(GCBlocks.basicBlock, 1, 5), + new ItemStack(GCItems.basicItem, 1, 3), + 0.5F); + FurnaceRecipes.smelting().func_151394_a( + new ItemStack(GCBlocks.basicBlock, 1, 6), + new ItemStack(GCItems.basicItem, 1, 4), + 0.5F); + FurnaceRecipes.smelting().func_151394_a( + new ItemStack(GCBlocks.basicBlock, 1, 7), + new ItemStack(GCItems.basicItem, 1, 5), + 0.5F); + FurnaceRecipes.smelting() + .func_151396_a(GCItems.meteoricIronRaw, new ItemStack(GCItems.meteoricIronIngot), 1.0F); + FurnaceRecipes.smelting().func_151394_a( + new ItemStack(GCBlocks.blockMoon, 1, 0), + new ItemStack(GCItems.basicItem, 1, 3), + 1.0F); + FurnaceRecipes.smelting().func_151394_a( + new ItemStack(GCBlocks.blockMoon, 1, 1), + new ItemStack(GCItems.basicItem, 1, 4), + 1.0F); + // Recycling: smelt tin/copper canisters back into ingots + FurnaceRecipes.smelting() + .func_151394_a(new ItemStack(GCItems.canister, 1, 0), new ItemStack(GCItems.basicItem, 3, 4), 1.0F); + FurnaceRecipes.smelting() + .func_151394_a(new ItemStack(GCItems.canister, 1, 1), new ItemStack(GCItems.basicItem, 3, 3), 1.0F); + RecipeUtil.addRecipe( new ItemStack(GCBlocks.aluminumWire, 6), new Object[] { "WWW", "CCC", "WWW", 'W', Blocks.wool, 'C', "ingotAluminum" }); @@ -716,6 +713,9 @@ private static void addUniversalRecipes() { .add(new ShapelessOreRecipe(new ItemStack(GCItems.meteorChunk, 3), GCItems.meteoricIronRaw)); if (!Loader.isModLoaded(Constants.MOD_ID_NEW_HORIZONS_CORE_MOD)) { + final Object meteoricIronIngot = ConfigManagerCore.recipesRequireGCAdvancedMetals + ? GCItems.meteoricIronIngot + : "ingotMeteoricIron"; for (int i = 3; i < 6; i++) { if (ItemBasic.names[i].contains("ingot")) { CompressorRecipes.addShapelessRecipe( diff --git a/src/main/java/micdoodle8/mods/galacticraft/planets/asteroids/items/AsteroidsItems.java b/src/main/java/micdoodle8/mods/galacticraft/planets/asteroids/items/AsteroidsItems.java index b52f3549bc..f9eacf6f07 100644 --- a/src/main/java/micdoodle8/mods/galacticraft/planets/asteroids/items/AsteroidsItems.java +++ b/src/main/java/micdoodle8/mods/galacticraft/planets/asteroids/items/AsteroidsItems.java @@ -6,6 +6,7 @@ import net.minecraftforge.common.util.EnumHelper; import net.minecraftforge.oredict.OreDictionary; +import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.registry.GameRegistry; import micdoodle8.mods.galacticraft.core.Constants; import micdoodle8.mods.galacticraft.core.util.GCCoreUtil; @@ -65,7 +66,9 @@ public static void initItems() { AsteroidsItems.registerItems(); OreDictionary.registerOre("compressedTitanium", new ItemStack(AsteroidsItems.basicItem, 1, 6)); - OreDictionary.registerOre("ingotTitanium", new ItemStack(AsteroidsItems.basicItem, 1, 5)); + if (!Loader.isModLoaded(Constants.MOD_ID_NEW_HORIZONS_CORE_MOD)) { + OreDictionary.registerOre("ingotTitanium", new ItemStack(AsteroidsItems.basicItem, 1, 5)); + } OreDictionary.registerOre("shardTitanium", new ItemStack(AsteroidsItems.basicItem, 1, 4)); OreDictionary.registerOre("shardIron", new ItemStack(AsteroidsItems.basicItem, 1, 3)); diff --git a/src/main/java/micdoodle8/mods/galacticraft/planets/asteroids/recipe/RecipeManagerAsteroids.java b/src/main/java/micdoodle8/mods/galacticraft/planets/asteroids/recipe/RecipeManagerAsteroids.java index 930c5c4ce9..328d89ec14 100644 --- a/src/main/java/micdoodle8/mods/galacticraft/planets/asteroids/recipe/RecipeManagerAsteroids.java +++ b/src/main/java/micdoodle8/mods/galacticraft/planets/asteroids/recipe/RecipeManagerAsteroids.java @@ -10,7 +10,9 @@ import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraftforge.oredict.OreDictionary; +import cpw.mods.fml.common.Loader; import micdoodle8.mods.galacticraft.api.recipe.CompressorRecipes; +import micdoodle8.mods.galacticraft.core.Constants; import micdoodle8.mods.galacticraft.core.blocks.BlockMachineTiered; import micdoodle8.mods.galacticraft.core.blocks.GCBlocks; import micdoodle8.mods.galacticraft.core.items.GCItems; @@ -30,171 +32,8 @@ public static void loadRecipes() { } private static void addUniversalRecipes() { - final Object titaniumIngot = ConfigManagerCore.recipesRequireGCAdvancedMetals - ? new ItemStack(AsteroidsItems.basicItem, 1, 5) - : "ingotTitanium"; - final Object titaniumPlate = ConfigManagerCore.recipesRequireGCAdvancedMetals - ? new ItemStack(AsteroidsItems.basicItem, 1, 6) - : "compressedTitanium"; - - FurnaceRecipes.smelting().func_151394_a( - new ItemStack(AsteroidBlocks.blockBasic, 1, 3), - new ItemStack(GCItems.basicItem, 1, 5), - 0.0F); - FurnaceRecipes.smelting().func_151394_a( - new ItemStack(AsteroidBlocks.blockBasic, 1, 4), - new ItemStack(AsteroidsItems.basicItem, 1, 5), - 0.0F); - FurnaceRecipes.smelting() - .func_151394_a(new ItemStack(AsteroidBlocks.blockBasic, 1, 5), new ItemStack(Items.iron_ingot), 0.0F); FurnaceRecipes.smelting() .func_151394_a(new ItemStack(AsteroidsItems.basicItem, 1, 3), new ItemStack(Items.iron_ingot), 0.5F); - FurnaceRecipes.smelting().func_151394_a( - new ItemStack(AsteroidsItems.basicItem, 1, 4), - new ItemStack(AsteroidsItems.basicItem, 1, 5), - 0.5F); - - RecipeUtil.addRecipe( - new ItemStack(AsteroidsItems.heavyNoseCone, 1), - new Object[] { " Y ", " X ", "X X", 'X', new ItemStack(AsteroidsItems.basicItem, 1, 0), 'Y', - Blocks.redstone_torch }); - - RecipeUtil.addRecipe( - new ItemStack(AsteroidsItems.basicItem, 1, 7), - new Object[] { " X ", "XYX", " X ", 'X', Blocks.wool, 'Y', Items.redstone }); - - RecipeUtil.addRecipe( - new ItemStack(AsteroidsItems.thermalPadding, 1, 0), - new Object[] { "XXX", "X X", 'X', new ItemStack(AsteroidsItems.basicItem, 1, 7) }); - RecipeUtil.addRecipe( - new ItemStack(AsteroidsItems.thermalPadding, 1, 1), - new Object[] { "X X", "XXX", "XXX", 'X', new ItemStack(AsteroidsItems.basicItem, 1, 7) }); - RecipeUtil.addRecipe( - new ItemStack(AsteroidsItems.thermalPadding, 1, 2), - new Object[] { "XXX", "X X", "X X", 'X', new ItemStack(AsteroidsItems.basicItem, 1, 7) }); - RecipeUtil.addRecipe( - new ItemStack(AsteroidsItems.thermalPadding, 1, 3), - new Object[] { "X X", "X X", 'X', new ItemStack(AsteroidsItems.basicItem, 1, 7) }); - - RecipeUtil.addRecipe( - new ItemStack(AsteroidsItems.titaniumHelmet, 1), - new Object[] { "XXX", "X X", 'X', titaniumPlate }); - RecipeUtil.addRecipe( - new ItemStack(AsteroidsItems.titaniumChestplate, 1), - new Object[] { "X X", "XXX", "XXX", 'X', titaniumPlate }); - RecipeUtil.addRecipe( - new ItemStack(AsteroidsItems.titaniumLeggings, 1), - new Object[] { "XXX", "X X", "X X", 'X', titaniumPlate }); - RecipeUtil.addRecipe( - new ItemStack(AsteroidsItems.titaniumBoots, 1), - new Object[] { "X X", "X X", 'X', titaniumPlate }); - - RecipeUtil.addRecipe( - new ItemStack(AsteroidsItems.titaniumPickaxe, 1), - new Object[] { "YYY", " X ", " X ", 'Y', titaniumPlate, 'X', Items.stick }); - RecipeUtil.addRecipe( - new ItemStack(AsteroidsItems.titaniumAxe, 1), - new Object[] { "YY ", "YX ", " X ", 'Y', titaniumPlate, 'X', Items.stick }); - RecipeUtil.addRecipe( - new ItemStack(AsteroidsItems.titaniumAxe, 1), - new Object[] { " YY", " XY", " X ", 'Y', titaniumPlate, 'X', Items.stick }); - RecipeUtil.addRecipe( - new ItemStack(AsteroidsItems.titaniumHoe, 1), - new Object[] { " YY", " X ", " X ", 'Y', titaniumPlate, 'X', Items.stick }); - RecipeUtil.addRecipe( - new ItemStack(AsteroidsItems.titaniumHoe, 1), - new Object[] { "YY ", " X ", " X ", 'Y', titaniumPlate, 'X', Items.stick }); - RecipeUtil.addRecipe( - new ItemStack(AsteroidsItems.titaniumSpade, 1), - new Object[] { " Y ", " X ", " X ", 'Y', titaniumPlate, 'X', Items.stick }); - RecipeUtil.addRecipe( - new ItemStack(AsteroidsItems.titaniumSword, 1), - new Object[] { " Y ", " Y ", " X ", 'Y', titaniumPlate, 'X', Items.stick }); - - RecipeUtil.addRecipe( - new ItemStack(AsteroidsItems.basicItem, 1, 1), - new Object[] { " YV", "XWX", "XZX", 'V', Blocks.stone_button, 'W', - new ItemStack(GCItems.canister, 1, 0), 'X', new ItemStack(AsteroidsItems.basicItem, 1, 0), 'Y', - Items.flint_and_steel, 'Z', GCItems.oxygenVent }); - - RecipeUtil.addRecipe( - new ItemStack(AsteroidsItems.basicItem, 1, 1), - new Object[] { "VY ", "XWX", "XZX", 'V', Blocks.stone_button, 'W', - new ItemStack(GCItems.canister, 1, 0), 'X', new ItemStack(AsteroidsItems.basicItem, 1, 0), 'Y', - Items.flint_and_steel, 'Z', GCItems.oxygenVent }); - - RecipeUtil.addRecipe( - new ItemStack(AsteroidsItems.basicItem, 1, 2), - new Object[] { " Y ", "XYX", "X X", 'X', new ItemStack(AsteroidsItems.basicItem, 1, 0), 'Y', - new ItemStack(MarsItems.marsItemBasic, 1, 3) }); - - RecipeUtil.addRecipe( - new ItemStack(AsteroidsItems.grapple, 1), - new Object[] { " Z", "XZ ", "XX ", 'X', Items.iron_ingot, 'Z', Items.string }); - - RecipeUtil.addRecipe( - new ItemStack(AsteroidsItems.atmosphericValve, 1, 0), - new Object[] { " ", "XYX", " X ", 'X', new ItemStack(MarsItems.marsItemBasic, 1, 2), 'Y', - GCItems.oxygenVent }); - - RecipeUtil.addRecipe( - new ItemStack(AsteroidsItems.basicItem, 1, 2), - new Object[] { " Y ", "XYX", "X X", 'X', new ItemStack(AsteroidsItems.basicItem), 'Y', - "compressedTitanium" }); - - RecipeUtil.addRecipe( - new ItemStack(AsteroidBlocks.blockWalkway, 5), - new Object[] { "XXX", " X ", 'X', titaniumPlate }); - RecipeUtil.addRecipe( - new ItemStack(AsteroidBlocks.blockWalkwayWire, 5), - new Object[] { "XXX", "YXY", "YYY", 'X', titaniumPlate, 'Y', - new ItemStack(GCBlocks.aluminumWire, 1, 1) }); - RecipeUtil.addRecipe( - new ItemStack(AsteroidBlocks.blockWalkwayOxygenPipe, 5), - new Object[] { "XXX", "YXY", "YYY", 'X', titaniumPlate, 'Y', new ItemStack(GCBlocks.oxygenPipe) }); - CraftingManager.getInstance().addShapelessRecipe( - new ItemStack(AsteroidBlocks.blockWalkwayWire, 1), - new ItemStack(AsteroidBlocks.blockWalkway, 1), - new ItemStack(GCBlocks.aluminumWire, 1, 1)); - CraftingManager.getInstance().addShapelessRecipe( - new ItemStack(AsteroidBlocks.blockWalkwayOxygenPipe, 1), - new ItemStack(AsteroidBlocks.blockWalkway, 1), - new ItemStack(GCBlocks.oxygenPipe, 1)); - - RecipeUtil.addRecipe( - new ItemStack(AsteroidBlocks.shortRangeTelepad), - new Object[] { "XWX", "ZYZ", "XXX", 'W', new ItemStack(AsteroidsItems.basicItem, 1, 8), 'X', - titaniumPlate, 'Y', Items.redstone, 'Z', Items.ender_pearl }); - - RecipeUtil.addRecipe( - new ItemStack(AsteroidsItems.basicItem, 1, 8), - new Object[] { "XYX", "YZY", "XYX", 'X', Items.redstone, 'Y', "compressedIron", 'Z', - Blocks.glass_pane }); - - RecipeUtil.addRecipe( - new ItemStack(AsteroidBlocks.beamReceiver), - new Object[] { " X ", "XYX", " X ", 'X', titaniumPlate, 'Y', - new ItemStack(AsteroidsItems.basicItem, 1, 8) }); - RecipeUtil.addRecipe( - new ItemStack(AsteroidBlocks.beamReflector), - new Object[] { " Y ", "ZX ", "XXX", 'X', titaniumPlate, 'Y', - new ItemStack(AsteroidsItems.basicItem, 1, 8), 'Z', Blocks.lever }); - RecipeUtil.addRecipe( - new ItemStack(AsteroidBlocks.beamReflector), - new Object[] { " Y ", " XZ", "XXX", 'X', titaniumPlate, 'Y', - new ItemStack(AsteroidsItems.basicItem, 1, 8), 'Z', Blocks.lever }); - - RecipeUtil.addRecipe( - new ItemStack(AsteroidBlocks.blockMinerBase, 4, 0), - new Object[] { "XCX", "W W", "XBX", 'X', "compressedDesh", 'W', - new ItemStack(AsteroidsItems.basicItem, 1, 8), 'C', new ItemStack(Blocks.chest), 'B', - new ItemStack(GCBlocks.machineTiered, 1, BlockMachineTiered.STORAGE_MODULE_METADATA) }); - RecipeUtil.addRecipe( - new ItemStack(AsteroidsItems.orionDrive, 1, 0), - new Object[] { "ABC", "DOE", "FGH", 'A', "oreDiamond", 'B', "oreLapis", 'C', "oreGold", 'D', - "oreRedstone", 'E', "oreCoal", 'F', "oreCheese", 'G', "oreDesh", 'H', "oreIlmenite", 'O', - new ItemStack(AsteroidsItems.basicItem, 1, 8) }); - // Cobblestone recipe CraftingManager.getInstance().addShapelessRecipe( new ItemStack(Blocks.cobblestone, 2), @@ -213,91 +52,254 @@ private static void addUniversalRecipes() { new ItemStack(Items.dye, 2, 2), new ItemStack(Items.dye, 1, 11), new ItemStack(Items.dye, 1, 4)); - - // Cobblestone->Gravel, Gravel->Sand, Sand->Clay - CompressorRecipes.addRecipeAdventure( - new ItemStack(Blocks.gravel, 9, 0), - "XXX", - "XXX", - "XXX", - 'X', - new ItemStack(Blocks.cobblestone, 1)); - CompressorRecipes.addRecipeAdventure( - new ItemStack(VersionUtil.sand, 9, 0), - "XXX", - "XXX", - "XXX", - 'X', - new ItemStack(Blocks.gravel, 1)); - CompressorRecipes.addRecipeAdventure( - new ItemStack(Blocks.clay, 8, 0), - "XXX", - "XBX", - "XXX", - 'X', - new ItemStack(VersionUtil.sand), - 'B', - new ItemStack(Items.water_bucket)); - CompressorRecipes.addRecipeAdventure( - new ItemStack(Blocks.soul_sand, 4, 0), - "XFX", - "FEF", - "XFX", - 'X', - new ItemStack(VersionUtil.sand), - 'F', - new ItemStack(Items.rotten_flesh), - 'E', - new ItemStack(Items.fermented_spider_eye)); - CompressorRecipes.addRecipeAdventure( - new ItemStack(Blocks.obsidian, 1, 0), - "XXX", - "XBX", - "XXX", - 'X', - new ItemStack(Blocks.stone), - 'B', - new ItemStack(Items.blaze_powder)); - // Charcoal into coal - CompressorRecipes.addShapelessAdventure( - new ItemStack(Items.coal, 2, 0), - new ItemStack(Items.coal, 1, 1), - new ItemStack(AsteroidBlocks.blockBasic, 1, 0), - new ItemStack(Items.coal, 1, 1)); - CompressorRecipes.addShapelessAdventure( - new ItemStack(Items.coal, 2, 0), - new ItemStack(Items.coal, 1, 1), - new ItemStack(AsteroidBlocks.blockBasic, 1, 1), - new ItemStack(Items.coal, 1, 1)); - CompressorRecipes.addShapelessAdventure( - new ItemStack(Items.coal, 2, 0), - new ItemStack(Items.coal, 1, 1), - new ItemStack(AsteroidBlocks.blockBasic, 1, 2), - new ItemStack(Items.coal, 1, 1)); // Splintered ice into Ice CompressorRecipes.addShapelessRecipe( new ItemStack(Blocks.ice), new ItemStack(AsteroidBlocks.blockDenseIce), new ItemStack(AsteroidBlocks.blockDenseIce)); - // Slimeball - RecipeUtil.addRecipe( - new ItemStack(Items.slime_ball), - new Object[] { "XFX", "FEF", "XFX", 'X', new ItemStack(Items.dye, 1, 2), 'E', - new ItemStack(GCItems.cheeseCurd), 'F', new ItemStack(Items.sugar) }); - if (ConfigManagerCore.recipesRequireGCAdvancedMetals) { - CompressorRecipes - .addShapelessRecipe(new ItemStack(AsteroidsItems.basicItem, 1, 6), titaniumIngot, titaniumIngot); - } else if (OreDictionary.getOres("ingotTitanium").size() > 0) { - for (final ItemStack stack : OreDictionary.getOres("ingotTitanium")) { - CompressorRecipes.addShapelessRecipe(new ItemStack(AsteroidsItems.basicItem, 1, 6), stack, stack); + if (!Loader.isModLoaded(Constants.MOD_ID_NEW_HORIZONS_CORE_MOD)) { + final Object titaniumIngot = ConfigManagerCore.recipesRequireGCAdvancedMetals + ? new ItemStack(AsteroidsItems.basicItem, 1, 5) + : "ingotTitanium"; + final Object titaniumPlate = ConfigManagerCore.recipesRequireGCAdvancedMetals + ? new ItemStack(AsteroidsItems.basicItem, 1, 6) + : "compressedTitanium"; + RecipeUtil.addRecipe( + new ItemStack(AsteroidsItems.titaniumHelmet, 1), + new Object[] { "XXX", "X X", 'X', titaniumPlate }); + RecipeUtil.addRecipe( + new ItemStack(AsteroidsItems.titaniumChestplate, 1), + new Object[] { "X X", "XXX", "XXX", 'X', titaniumPlate }); + RecipeUtil.addRecipe( + new ItemStack(AsteroidsItems.titaniumLeggings, 1), + new Object[] { "XXX", "X X", "X X", 'X', titaniumPlate }); + RecipeUtil.addRecipe( + new ItemStack(AsteroidsItems.titaniumBoots, 1), + new Object[] { "X X", "X X", 'X', titaniumPlate }); + + RecipeUtil.addRecipe( + new ItemStack(AsteroidsItems.titaniumPickaxe, 1), + new Object[] { "YYY", " X ", " X ", 'Y', titaniumPlate, 'X', Items.stick }); + RecipeUtil.addRecipe( + new ItemStack(AsteroidsItems.titaniumAxe, 1), + new Object[] { "YY ", "YX ", " X ", 'Y', titaniumPlate, 'X', Items.stick }); + RecipeUtil.addRecipe( + new ItemStack(AsteroidsItems.titaniumAxe, 1), + new Object[] { " YY", " XY", " X ", 'Y', titaniumPlate, 'X', Items.stick }); + RecipeUtil.addRecipe( + new ItemStack(AsteroidsItems.titaniumHoe, 1), + new Object[] { " YY", " X ", " X ", 'Y', titaniumPlate, 'X', Items.stick }); + RecipeUtil.addRecipe( + new ItemStack(AsteroidsItems.titaniumHoe, 1), + new Object[] { "YY ", " X ", " X ", 'Y', titaniumPlate, 'X', Items.stick }); + RecipeUtil.addRecipe( + new ItemStack(AsteroidsItems.titaniumSpade, 1), + new Object[] { " Y ", " X ", " X ", 'Y', titaniumPlate, 'X', Items.stick }); + RecipeUtil.addRecipe( + new ItemStack(AsteroidsItems.titaniumSword, 1), + new Object[] { " Y ", " Y ", " X ", 'Y', titaniumPlate, 'X', Items.stick }); + + FurnaceRecipes.smelting().func_151394_a( + new ItemStack(AsteroidBlocks.blockBasic, 1, 3), + new ItemStack(GCItems.basicItem, 1, 5), + 0.0F); + FurnaceRecipes.smelting().func_151394_a( + new ItemStack(AsteroidBlocks.blockBasic, 1, 4), + new ItemStack(AsteroidsItems.basicItem, 1, 5), + 0.0F); + FurnaceRecipes.smelting().func_151394_a( + new ItemStack(AsteroidBlocks.blockBasic, 1, 5), + new ItemStack(Items.iron_ingot), + 0.0F); + FurnaceRecipes.smelting().func_151394_a( + new ItemStack(AsteroidsItems.basicItem, 1, 4), + new ItemStack(AsteroidsItems.basicItem, 1, 5), + 0.5F); + RecipeUtil.addRecipe( + new ItemStack(AsteroidsItems.heavyNoseCone, 1), + new Object[] { " Y ", " X ", "X X", 'X', new ItemStack(AsteroidsItems.basicItem, 1, 0), 'Y', + Blocks.redstone_torch }); + + RecipeUtil.addRecipe( + new ItemStack(AsteroidsItems.basicItem, 1, 7), + new Object[] { " X ", "XYX", " X ", 'X', Blocks.wool, 'Y', Items.redstone }); + + RecipeUtil.addRecipe( + new ItemStack(AsteroidsItems.thermalPadding, 1, 0), + new Object[] { "XXX", "X X", 'X', new ItemStack(AsteroidsItems.basicItem, 1, 7) }); + RecipeUtil.addRecipe( + new ItemStack(AsteroidsItems.thermalPadding, 1, 1), + new Object[] { "X X", "XXX", "XXX", 'X', new ItemStack(AsteroidsItems.basicItem, 1, 7) }); + RecipeUtil.addRecipe( + new ItemStack(AsteroidsItems.thermalPadding, 1, 2), + new Object[] { "XXX", "X X", "X X", 'X', new ItemStack(AsteroidsItems.basicItem, 1, 7) }); + RecipeUtil.addRecipe( + new ItemStack(AsteroidsItems.thermalPadding, 1, 3), + new Object[] { "X X", "X X", 'X', new ItemStack(AsteroidsItems.basicItem, 1, 7) }); + + RecipeUtil.addRecipe( + new ItemStack(AsteroidsItems.basicItem, 1, 1), + new Object[] { " YV", "XWX", "XZX", 'V', Blocks.stone_button, 'W', + new ItemStack(GCItems.canister, 1, 0), 'X', new ItemStack(AsteroidsItems.basicItem, 1, 0), + 'Y', Items.flint_and_steel, 'Z', GCItems.oxygenVent }); + + RecipeUtil.addRecipe( + new ItemStack(AsteroidsItems.basicItem, 1, 1), + new Object[] { "VY ", "XWX", "XZX", 'V', Blocks.stone_button, 'W', + new ItemStack(GCItems.canister, 1, 0), 'X', new ItemStack(AsteroidsItems.basicItem, 1, 0), + 'Y', Items.flint_and_steel, 'Z', GCItems.oxygenVent }); + + RecipeUtil.addRecipe( + new ItemStack(AsteroidsItems.basicItem, 1, 2), + new Object[] { " Y ", "XYX", "X X", 'X', new ItemStack(AsteroidsItems.basicItem, 1, 0), 'Y', + new ItemStack(MarsItems.marsItemBasic, 1, 3) }); + RecipeUtil.addRecipe( + new ItemStack(AsteroidsItems.basicItem, 1, 2), + new Object[] { " Y ", "XYX", "X X", 'X', new ItemStack(AsteroidsItems.basicItem), 'Y', + "compressedTitanium" }); + + RecipeUtil.addRecipe( + new ItemStack(AsteroidsItems.grapple, 1), + new Object[] { " Z", "XZ ", "XX ", 'X', Items.iron_ingot, 'Z', Items.string }); + + RecipeUtil.addRecipe( + new ItemStack(AsteroidsItems.atmosphericValve, 1, 0), + new Object[] { " ", "XYX", " X ", 'X', new ItemStack(MarsItems.marsItemBasic, 1, 2), 'Y', + GCItems.oxygenVent }); + + RecipeUtil.addRecipe( + new ItemStack(AsteroidBlocks.blockWalkway, 5), + new Object[] { "XXX", " X ", 'X', titaniumPlate }); + RecipeUtil.addRecipe( + new ItemStack(AsteroidBlocks.blockWalkwayWire, 5), + new Object[] { "XXX", "YXY", "YYY", 'X', titaniumPlate, 'Y', + new ItemStack(GCBlocks.aluminumWire, 1, 1) }); + RecipeUtil.addRecipe( + new ItemStack(AsteroidBlocks.blockWalkwayOxygenPipe, 5), + new Object[] { "XXX", "YXY", "YYY", 'X', titaniumPlate, 'Y', new ItemStack(GCBlocks.oxygenPipe) }); + CraftingManager.getInstance().addShapelessRecipe( + new ItemStack(AsteroidBlocks.blockWalkwayWire, 1), + new ItemStack(AsteroidBlocks.blockWalkway, 1), + new ItemStack(GCBlocks.aluminumWire, 1, 1)); + CraftingManager.getInstance().addShapelessRecipe( + new ItemStack(AsteroidBlocks.blockWalkwayOxygenPipe, 1), + new ItemStack(AsteroidBlocks.blockWalkway, 1), + new ItemStack(GCBlocks.oxygenPipe, 1)); + RecipeUtil.addRecipe( + new ItemStack(AsteroidBlocks.shortRangeTelepad), + new Object[] { "XWX", "ZYZ", "XXX", 'W', new ItemStack(AsteroidsItems.basicItem, 1, 8), 'X', + titaniumPlate, 'Y', Items.redstone, 'Z', Items.ender_pearl }); + + RecipeUtil.addRecipe( + new ItemStack(AsteroidsItems.basicItem, 1, 8), + new Object[] { "XYX", "YZY", "XYX", 'X', Items.redstone, 'Y', "compressedIron", 'Z', + Blocks.glass_pane }); + RecipeUtil.addRecipe( + new ItemStack(AsteroidBlocks.beamReceiver), + new Object[] { " X ", "XYX", " X ", 'X', titaniumPlate, 'Y', + new ItemStack(AsteroidsItems.basicItem, 1, 8) }); + RecipeUtil.addRecipe( + new ItemStack(AsteroidBlocks.beamReflector), + new Object[] { " Y ", "ZX ", "XXX", 'X', titaniumPlate, 'Y', + new ItemStack(AsteroidsItems.basicItem, 1, 8), 'Z', Blocks.lever }); + RecipeUtil.addRecipe( + new ItemStack(AsteroidBlocks.beamReflector), + new Object[] { " Y ", " XZ", "XXX", 'X', titaniumPlate, 'Y', + new ItemStack(AsteroidsItems.basicItem, 1, 8), 'Z', Blocks.lever }); + RecipeUtil.addRecipe( + new ItemStack(AsteroidBlocks.blockMinerBase, 4, 0), + new Object[] { "XCX", "W W", "XBX", 'X', "compressedDesh", 'W', + new ItemStack(AsteroidsItems.basicItem, 1, 8), 'C', new ItemStack(Blocks.chest), 'B', + new ItemStack(GCBlocks.machineTiered, 1, BlockMachineTiered.STORAGE_MODULE_METADATA) }); + RecipeUtil.addRecipe( + new ItemStack(AsteroidsItems.orionDrive, 1, 0), + new Object[] { "ABC", "DOE", "FGH", 'A', "oreDiamond", 'B', "oreLapis", 'C', "oreGold", 'D', + "oreRedstone", 'E', "oreCoal", 'F', "oreCheese", 'G', "oreDesh", 'H', "oreIlmenite", 'O', + new ItemStack(AsteroidsItems.basicItem, 1, 8) }); + + // Cobblestone->Gravel, Gravel->Sand, Sand->Clay + CompressorRecipes.addRecipeAdventure( + new ItemStack(Blocks.gravel, 9, 0), + "XXX", + "XXX", + "XXX", + 'X', + new ItemStack(Blocks.cobblestone, 1)); + CompressorRecipes.addRecipeAdventure( + new ItemStack(VersionUtil.sand, 9, 0), + "XXX", + "XXX", + "XXX", + 'X', + new ItemStack(Blocks.gravel, 1)); + CompressorRecipes.addRecipeAdventure( + new ItemStack(Blocks.clay, 8, 0), + "XXX", + "XBX", + "XXX", + 'X', + new ItemStack(VersionUtil.sand), + 'B', + new ItemStack(Items.water_bucket)); + CompressorRecipes.addRecipeAdventure( + new ItemStack(Blocks.soul_sand, 4, 0), + "XFX", + "FEF", + "XFX", + 'X', + new ItemStack(VersionUtil.sand), + 'F', + new ItemStack(Items.rotten_flesh), + 'E', + new ItemStack(Items.fermented_spider_eye)); + CompressorRecipes.addRecipeAdventure( + new ItemStack(Blocks.obsidian, 1, 0), + "XXX", + "XBX", + "XXX", + 'X', + new ItemStack(Blocks.stone), + 'B', + new ItemStack(Items.blaze_powder)); + // Charcoal into coal + CompressorRecipes.addShapelessAdventure( + new ItemStack(Items.coal, 2, 0), + new ItemStack(Items.coal, 1, 1), + new ItemStack(AsteroidBlocks.blockBasic, 1, 0), + new ItemStack(Items.coal, 1, 1)); + CompressorRecipes.addShapelessAdventure( + new ItemStack(Items.coal, 2, 0), + new ItemStack(Items.coal, 1, 1), + new ItemStack(AsteroidBlocks.blockBasic, 1, 1), + new ItemStack(Items.coal, 1, 1)); + CompressorRecipes.addShapelessAdventure( + new ItemStack(Items.coal, 2, 0), + new ItemStack(Items.coal, 1, 1), + new ItemStack(AsteroidBlocks.blockBasic, 1, 2), + new ItemStack(Items.coal, 1, 1)); + // Slimeball + RecipeUtil.addRecipe( + new ItemStack(Items.slime_ball), + new Object[] { "XFX", "FEF", "XFX", 'X', new ItemStack(Items.dye, 1, 2), 'E', + new ItemStack(GCItems.cheeseCurd), 'F', new ItemStack(Items.sugar) }); + + if (ConfigManagerCore.recipesRequireGCAdvancedMetals) { + CompressorRecipes.addShapelessRecipe( + new ItemStack(AsteroidsItems.basicItem, 1, 6), + titaniumIngot, + titaniumIngot); + } else if (OreDictionary.getOres("ingotTitanium").size() > 0) { + for (final ItemStack stack : OreDictionary.getOres("ingotTitanium")) { + CompressorRecipes.addShapelessRecipe(new ItemStack(AsteroidsItems.basicItem, 1, 6), stack, stack); + } } - } - CompressorRecipes.addShapelessRecipe( - new ItemStack(AsteroidsItems.basicItem, 1, 0), - new ItemStack(MarsItems.marsItemBasic, 1, 3), - new ItemStack(MarsItems.marsItemBasic, 1, 5)); + CompressorRecipes.addShapelessRecipe( + new ItemStack(AsteroidsItems.basicItem, 1, 0), + new ItemStack(MarsItems.marsItemBasic, 1, 3), + new ItemStack(MarsItems.marsItemBasic, 1, 5)); + } // All this is for NEI's benefit if (ConfigManagerCore.handfillOxygen) { diff --git a/src/main/java/micdoodle8/mods/galacticraft/planets/mars/MarsModule.java b/src/main/java/micdoodle8/mods/galacticraft/planets/mars/MarsModule.java index dde8d172a6..7d74333317 100644 --- a/src/main/java/micdoodle8/mods/galacticraft/planets/mars/MarsModule.java +++ b/src/main/java/micdoodle8/mods/galacticraft/planets/mars/MarsModule.java @@ -21,6 +21,7 @@ import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; +import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; @@ -36,6 +37,7 @@ import micdoodle8.mods.galacticraft.api.recipe.CompressorRecipes; import micdoodle8.mods.galacticraft.api.recipe.SchematicRegistry; import micdoodle8.mods.galacticraft.api.world.IAtmosphericGas; +import micdoodle8.mods.galacticraft.core.Constants; import micdoodle8.mods.galacticraft.core.GalacticraftCore; import micdoodle8.mods.galacticraft.core.event.EventHandlerGC; import micdoodle8.mods.galacticraft.core.items.GCItems; @@ -169,14 +171,16 @@ public void init(FMLInitializationEvent event) { GalacticraftRegistry.addDungeonLoot(2, new ItemStack(MarsItems.schematic, 1, 1)); GalacticraftRegistry.addDungeonLoot(2, new ItemStack(MarsItems.schematic, 1, 2)); - CompressorRecipes.addShapelessRecipe( - new ItemStack(MarsItems.marsItemBasic, 1, 3), - new ItemStack(GCItems.heavyPlatingTier1), - new ItemStack(GCItems.meteoricIronIngot, 1, 1)); - CompressorRecipes.addShapelessRecipe( - new ItemStack(MarsItems.marsItemBasic, 1, 5), - ConfigManagerCore.recipesRequireGCAdvancedMetals ? new ItemStack(MarsItems.marsItemBasic, 1, 2) - : "ingotDesh"); + if (!Loader.isModLoaded(Constants.MOD_ID_NEW_HORIZONS_CORE_MOD)) { + CompressorRecipes.addShapelessRecipe( + new ItemStack(MarsItems.marsItemBasic, 1, 3), + new ItemStack(GCItems.heavyPlatingTier1), + new ItemStack(GCItems.meteoricIronIngot, 1, 1)); + CompressorRecipes.addShapelessRecipe( + new ItemStack(MarsItems.marsItemBasic, 1, 5), + ConfigManagerCore.recipesRequireGCAdvancedMetals ? new ItemStack(MarsItems.marsItemBasic, 1, 2) + : "ingotDesh"); + } } @Override diff --git a/src/main/java/micdoodle8/mods/galacticraft/planets/mars/recipe/RecipeManagerMars.java b/src/main/java/micdoodle8/mods/galacticraft/planets/mars/recipe/RecipeManagerMars.java index bf36c3e541..d8141378fd 100644 --- a/src/main/java/micdoodle8/mods/galacticraft/planets/mars/recipe/RecipeManagerMars.java +++ b/src/main/java/micdoodle8/mods/galacticraft/planets/mars/recipe/RecipeManagerMars.java @@ -7,6 +7,8 @@ import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraftforge.oredict.OreDictionary; +import cpw.mods.fml.common.Loader; +import micdoodle8.mods.galacticraft.core.Constants; import micdoodle8.mods.galacticraft.core.blocks.GCBlocks; import micdoodle8.mods.galacticraft.core.items.GCItems; import micdoodle8.mods.galacticraft.core.util.ConfigManagerCore; @@ -22,129 +24,12 @@ public static void loadRecipes() { } private static void addUniversalRecipes() { - OreDictionary.registerOre("ingotDesh", new ItemStack(MarsItems.marsItemBasic, 1, 2)); OreDictionary.registerOre("compressedDesh", new ItemStack(MarsItems.marsItemBasic, 1, 5)); - final Object meteoricIronIngot = ConfigManagerCore.recipesRequireGCAdvancedMetals ? GCItems.meteoricIronIngot - : "ingotMeteoricIron"; - final Object deshIngot = ConfigManagerCore.recipesRequireGCAdvancedMetals - ? new ItemStack(MarsItems.marsItemBasic, 1, 2) - : "ingotDesh"; - final Object deshPlate = ConfigManagerCore.recipesRequireGCAdvancedMetals - ? new ItemStack(MarsItems.marsItemBasic, 1, 5) - : "compressedDesh"; - - RecipeUtil.addRecipe( - new ItemStack(MarsItems.deshBoots), - new Object[] { "X X", "X X", 'X', new ItemStack(MarsItems.marsItemBasic, 1, 2) }); - - RecipeUtil.addRecipe( - new ItemStack(MarsBlocks.marsBlock, 1, 8), - new Object[] { "XXX", "XXX", "XXX", 'X', deshIngot }); - - RecipeUtil.addRecipe( - new ItemStack(MarsBlocks.machine, 1, 0), - new Object[] { "XWX", "XZX", "WVW", 'V', GCItems.oxygenConcentrator, 'W', deshPlate, 'X', deshIngot, - 'Z', new ItemStack(GCItems.canister) }); - - RecipeUtil.addRecipe( - new ItemStack(MarsBlocks.machine, 1, 4), - new Object[] { "XYX", "XZX", "XYX", 'X', deshPlate, 'Y', new ItemStack(MarsItems.marsItemBasic, 1, 3), - 'Z', Items.bed }); - // Gas liquefier - RecipeUtil.addRecipe( - new ItemStack(MarsBlocks.machineT2, 1, 0), - new Object[] { "TVS", "FWS", "PXO", 'T', - new ItemStack(GCItems.oxTankHeavy, 1, GCItems.oxTankHeavy.getMaxDamage()), 'V', - GCItems.oxygenVent, 'F', new ItemStack(GCBlocks.oxygenPipe, 1, 0), 'X', - new ItemStack(GCItems.basicItem, 1, 10), 'W', new ItemStack(MarsItems.marsItemBasic, 1, 6), 'O', - new ItemStack(GCBlocks.oxygenCompressor, 1, 0), 'P', - new ItemStack(GCBlocks.oxygenCompressor, 1, 4), 'S', - new ItemStack(GCItems.oxTankMedium, 1, GCItems.oxTankMedium.getMaxDamage()) }); - // Methane Synthesizer - RecipeUtil.addRecipe( - new ItemStack(MarsBlocks.machineT2, 1, 4), - new Object[] { "TVT", "FWF", "CXO", 'T', - new ItemStack(GCItems.oxTankHeavy, 1, GCItems.oxTankHeavy.getMaxDamage()), 'V', - GCItems.oxygenVent, 'F', new ItemStack(GCBlocks.oxygenPipe, 1, 0), 'X', - new ItemStack(GCItems.basicItem, 1, 10), 'W', new ItemStack(MarsItems.marsItemBasic, 1, 6), 'O', - new ItemStack(GCBlocks.oxygenCompressor, 1, 0), 'C', - new ItemStack(GCBlocks.machineTiered, 1, 4) }); - // Water Electrolyzer - RecipeUtil.addRecipe( - new ItemStack(MarsBlocks.machineT2, 1, 8), - new Object[] { "TVT", "FWF", "BXB", 'T', - new ItemStack(GCItems.oxTankHeavy, 1, GCItems.oxTankHeavy.getMaxDamage()), 'V', - GCItems.oxygenVent, 'F', new ItemStack(GCBlocks.oxygenPipe, 1, 0), 'X', - new ItemStack(GCItems.basicItem, 1, 10), 'W', new ItemStack(MarsItems.marsItemBasic, 1, 6), 'B', - new ItemStack(GCItems.basicItem, 1, 6) }); - // Fluid Manipulator - crafting item - RecipeUtil.addRecipe( - new ItemStack(MarsItems.marsItemBasic, 1, 6), - new Object[] { "MXM", "SWS", "MXM", 'S', Items.slime_ball, 'X', GCItems.oxygenFan, 'M', - meteoricIronIngot, 'W', new ItemStack(GCItems.basicItem, 1, 14) }); - - RecipeUtil.addRecipe( - new ItemStack(MarsBlocks.hydrogenPipe, 6, 0), - new Object[] { "CCC", " ", "CCC", 'C', "ingotCopper" }); - - RecipeUtil.addRecipe(new ItemStack(MarsItems.marsItemBasic, 1, 1), new Object[] { "X", "X", 'X', deshIngot }); RecipeUtil.addRecipe( new ItemStack(MarsItems.marsItemBasic, 1, 4), new Object[] { "XWX", "XYX", " Z ", 'W', Items.diamond, 'X', Items.leather, 'Y', Items.slime_ball, 'Z', Blocks.chest }); - - RecipeUtil.addRecipe( - new ItemStack(MarsItems.deshSword), - new Object[] { "X", "X", "Y", 'X', new ItemStack(MarsItems.marsItemBasic, 1, 2), 'Y', - new ItemStack(MarsItems.marsItemBasic, 1, 1) }); - - RecipeUtil.addRecipe( - new ItemStack(MarsItems.deshPickaxe), - new Object[] { "XXX", " Y ", " Y ", 'X', new ItemStack(MarsItems.marsItemBasic, 1, 2), 'Y', - new ItemStack(MarsItems.marsItemBasic, 1, 1) }); - - RecipeUtil.addRecipe( - new ItemStack(MarsItems.deshSpade), - new Object[] { "X", "Y", "Y", 'X', new ItemStack(MarsItems.marsItemBasic, 1, 2), 'Y', - new ItemStack(MarsItems.marsItemBasic, 1, 1) }); - - RecipeUtil.addRecipe( - new ItemStack(MarsItems.deshHoe), - new Object[] { "XX", "Y ", "Y ", 'X', new ItemStack(MarsItems.marsItemBasic, 1, 2), 'Y', - new ItemStack(MarsItems.marsItemBasic, 1, 1) }); - - RecipeUtil.addRecipe( - new ItemStack(MarsItems.deshHoe), - new Object[] { "XX", " Y", " Y", 'X', new ItemStack(MarsItems.marsItemBasic, 1, 2), 'Y', - new ItemStack(MarsItems.marsItemBasic, 1, 1) }); - - RecipeUtil.addRecipe( - new ItemStack(MarsItems.deshAxe), - new Object[] { "XX", "XY", " Y", 'X', new ItemStack(MarsItems.marsItemBasic, 1, 2), 'Y', - new ItemStack(MarsItems.marsItemBasic, 1, 1) }); - - RecipeUtil.addRecipe( - new ItemStack(MarsItems.deshAxe), - new Object[] { "XX", "YX", "Y ", 'X', new ItemStack(MarsItems.marsItemBasic, 1, 2), 'Y', - new ItemStack(MarsItems.marsItemBasic, 1, 1) }); - - RecipeUtil.addRecipe( - new ItemStack(MarsItems.deshHelmet), - new Object[] { "XXX", "X X", 'X', new ItemStack(MarsItems.marsItemBasic, 1, 2) }); - - RecipeUtil.addRecipe( - new ItemStack(MarsItems.deshChestplate), - new Object[] { "X X", "XXX", "XXX", 'X', new ItemStack(MarsItems.marsItemBasic, 1, 2) }); - - RecipeUtil.addRecipe( - new ItemStack(MarsItems.deshLeggings), - new Object[] { "XXX", "X X", "X X", 'X', new ItemStack(MarsItems.marsItemBasic, 1, 2) }); - - RecipeUtil.addRecipe( - new ItemStack(MarsItems.marsItemBasic, 9, 2), - new Object[] { "X", 'X', new ItemStack(MarsBlocks.marsBlock, 1, 8) }); - // Mars Cobblestone Stairs RecipeUtil.addRecipe( new ItemStack(MarsBlocks.marsCobblestoneStairs, 4), @@ -177,36 +62,164 @@ private static void addUniversalRecipes() { new ItemStack(GCBlocks.wallGC, 6, 5), new Object[] { "XXX", "XXX", 'X', new ItemStack(MarsBlocks.marsBlock, 1, 7) }); - CraftingManager.getInstance() - .addShapelessRecipe(new ItemStack(MarsItems.carbonFragments, 8, 0), new ItemStack(Items.coal, 1, 0)); - - CraftingManager.getInstance() - .addShapelessRecipe(new ItemStack(MarsItems.carbonFragments, 4, 0), new ItemStack(Items.coal, 1, 1)); - // Smelting - FurnaceRecipes.smelting().func_151394_a( - new ItemStack(MarsItems.marsItemBasic, 1, 0), - new ItemStack(MarsItems.marsItemBasic, 1, 2), - 0.2F); FurnaceRecipes.smelting().func_151394_a( new ItemStack(MarsBlocks.marsBlock, 1, 4), new ItemStack(MarsBlocks.marsBlock, 1, 9), 0.0F); - FurnaceRecipes.smelting() - .func_151394_a(new ItemStack(MarsBlocks.marsBlock, 1, 0), new ItemStack(GCItems.basicItem, 1, 3), 1.0F); - FurnaceRecipes.smelting() - .func_151394_a(new ItemStack(MarsBlocks.marsBlock, 1, 1), new ItemStack(GCItems.basicItem, 1, 4), 1.0F); - FurnaceRecipes.smelting().func_151394_a( - new ItemStack(MarsBlocks.marsBlock, 1, 2), - new ItemStack(MarsItems.marsItemBasic, 1, 2), - 0.2F); - FurnaceRecipes.smelting() - .func_151394_a(new ItemStack(MarsBlocks.marsBlock, 1, 3), new ItemStack(Items.iron_ingot), 0.2F); - RecipeUtil.addRecipe( - new ItemStack(MarsBlocks.machine, 1, BlockMachineMars.LAUNCH_CONTROLLER_METADATA), - new Object[] { "ZVZ", "YXY", "ZWZ", 'V', new ItemStack(GCItems.basicItem, 1, 19), 'W', - new ItemStack(GCBlocks.aluminumWire, 1, 0), 'X', new ItemStack(GCItems.basicItem, 1, 14), 'Y', - deshPlate, 'Z', deshIngot }); + if (!Loader.isModLoaded(Constants.MOD_ID_NEW_HORIZONS_CORE_MOD)) { + final Object meteoricIronIngot = ConfigManagerCore.recipesRequireGCAdvancedMetals + ? GCItems.meteoricIronIngot + : "ingotMeteoricIron"; + final Object deshIngot = ConfigManagerCore.recipesRequireGCAdvancedMetals + ? new ItemStack(MarsItems.marsItemBasic, 1, 2) + : "ingotDesh"; + final Object deshPlate = ConfigManagerCore.recipesRequireGCAdvancedMetals + ? new ItemStack(MarsItems.marsItemBasic, 1, 5) + : "compressedDesh"; + RecipeUtil.addRecipe( + new ItemStack(MarsItems.deshSword), + new Object[] { "X", "X", "Y", 'X', new ItemStack(MarsItems.marsItemBasic, 1, 2), 'Y', + new ItemStack(MarsItems.marsItemBasic, 1, 1) }); + + RecipeUtil.addRecipe( + new ItemStack(MarsItems.deshPickaxe), + new Object[] { "XXX", " Y ", " Y ", 'X', new ItemStack(MarsItems.marsItemBasic, 1, 2), 'Y', + new ItemStack(MarsItems.marsItemBasic, 1, 1) }); + + RecipeUtil.addRecipe( + new ItemStack(MarsItems.deshSpade), + new Object[] { "X", "Y", "Y", 'X', new ItemStack(MarsItems.marsItemBasic, 1, 2), 'Y', + new ItemStack(MarsItems.marsItemBasic, 1, 1) }); + + RecipeUtil.addRecipe( + new ItemStack(MarsItems.deshHoe), + new Object[] { "XX", "Y ", "Y ", 'X', new ItemStack(MarsItems.marsItemBasic, 1, 2), 'Y', + new ItemStack(MarsItems.marsItemBasic, 1, 1) }); + + RecipeUtil.addRecipe( + new ItemStack(MarsItems.deshHoe), + new Object[] { "XX", " Y", " Y", 'X', new ItemStack(MarsItems.marsItemBasic, 1, 2), 'Y', + new ItemStack(MarsItems.marsItemBasic, 1, 1) }); + + RecipeUtil.addRecipe( + new ItemStack(MarsItems.deshAxe), + new Object[] { "XX", "XY", " Y", 'X', new ItemStack(MarsItems.marsItemBasic, 1, 2), 'Y', + new ItemStack(MarsItems.marsItemBasic, 1, 1) }); + + RecipeUtil.addRecipe( + new ItemStack(MarsItems.deshAxe), + new Object[] { "XX", "YX", "Y ", 'X', new ItemStack(MarsItems.marsItemBasic, 1, 2), 'Y', + new ItemStack(MarsItems.marsItemBasic, 1, 1) }); + + RecipeUtil.addRecipe( + new ItemStack(MarsItems.deshHelmet), + new Object[] { "XXX", "X X", 'X', new ItemStack(MarsItems.marsItemBasic, 1, 2) }); + + RecipeUtil.addRecipe( + new ItemStack(MarsItems.deshChestplate), + new Object[] { "X X", "XXX", "XXX", 'X', new ItemStack(MarsItems.marsItemBasic, 1, 2) }); + + RecipeUtil.addRecipe( + new ItemStack(MarsItems.deshLeggings), + new Object[] { "XXX", "X X", "X X", 'X', new ItemStack(MarsItems.marsItemBasic, 1, 2) }); + + RecipeUtil.addRecipe( + new ItemStack(MarsItems.deshBoots), + new Object[] { "X X", "X X", 'X', new ItemStack(MarsItems.marsItemBasic, 1, 2) }); + + RecipeUtil.addRecipe( + new ItemStack(MarsBlocks.marsBlock, 1, 8), + new Object[] { "XXX", "XXX", "XXX", 'X', deshIngot }); + + // Gas liquefier + RecipeUtil.addRecipe( + new ItemStack(MarsBlocks.machineT2, 1, 0), + new Object[] { "TVS", "FWS", "PXO", 'T', + new ItemStack(GCItems.oxTankHeavy, 1, GCItems.oxTankHeavy.getMaxDamage()), 'V', + GCItems.oxygenVent, 'F', new ItemStack(GCBlocks.oxygenPipe, 1, 0), 'X', + new ItemStack(GCItems.basicItem, 1, 10), 'W', new ItemStack(MarsItems.marsItemBasic, 1, 6), + 'O', new ItemStack(GCBlocks.oxygenCompressor, 1, 0), 'P', + new ItemStack(GCBlocks.oxygenCompressor, 1, 4), 'S', + new ItemStack(GCItems.oxTankMedium, 1, GCItems.oxTankMedium.getMaxDamage()) }); + // Methane Synthesizer + RecipeUtil.addRecipe( + new ItemStack(MarsBlocks.machineT2, 1, 4), + new Object[] { "TVT", "FWF", "CXO", 'T', + new ItemStack(GCItems.oxTankHeavy, 1, GCItems.oxTankHeavy.getMaxDamage()), 'V', + GCItems.oxygenVent, 'F', new ItemStack(GCBlocks.oxygenPipe, 1, 0), 'X', + new ItemStack(GCItems.basicItem, 1, 10), 'W', new ItemStack(MarsItems.marsItemBasic, 1, 6), + 'O', new ItemStack(GCBlocks.oxygenCompressor, 1, 0), 'C', + new ItemStack(GCBlocks.machineTiered, 1, 4) }); + // Water Electrolyzer + RecipeUtil.addRecipe( + new ItemStack(MarsBlocks.machineT2, 1, 8), + new Object[] { "TVT", "FWF", "BXB", 'T', + new ItemStack(GCItems.oxTankHeavy, 1, GCItems.oxTankHeavy.getMaxDamage()), 'V', + GCItems.oxygenVent, 'F', new ItemStack(GCBlocks.oxygenPipe, 1, 0), 'X', + new ItemStack(GCItems.basicItem, 1, 10), 'W', new ItemStack(MarsItems.marsItemBasic, 1, 6), + 'B', new ItemStack(GCItems.basicItem, 1, 6) }); + + RecipeUtil.addRecipe( + new ItemStack(MarsBlocks.machine, 1, 0), + new Object[] { "XWX", "XZX", "WVW", 'V', GCItems.oxygenConcentrator, 'W', deshPlate, 'X', deshIngot, + 'Z', new ItemStack(GCItems.canister) }); + + RecipeUtil.addRecipe( + new ItemStack(MarsBlocks.machine, 1, 4), + new Object[] { "XYX", "XZX", "XYX", 'X', deshPlate, 'Y', + new ItemStack(MarsItems.marsItemBasic, 1, 3), 'Z', Items.bed }); + + RecipeUtil.addRecipe( + new ItemStack(MarsBlocks.machine, 1, BlockMachineMars.LAUNCH_CONTROLLER_METADATA), + new Object[] { "ZVZ", "YXY", "ZWZ", 'V', new ItemStack(GCItems.basicItem, 1, 19), 'W', + new ItemStack(GCBlocks.aluminumWire, 1, 0), 'X', new ItemStack(GCItems.basicItem, 1, 14), + 'Y', deshPlate, 'Z', deshIngot }); + + RecipeUtil.addRecipe( + new ItemStack(MarsBlocks.hydrogenPipe, 6, 0), + new Object[] { "CCC", " ", "CCC", 'C', "ingotCopper" }); + + CraftingManager.getInstance().addShapelessRecipe( + new ItemStack(MarsItems.carbonFragments, 8, 0), + new ItemStack(Items.coal, 1, 0)); + + CraftingManager.getInstance().addShapelessRecipe( + new ItemStack(MarsItems.carbonFragments, 4, 0), + new ItemStack(Items.coal, 1, 1)); + + // Fluid Manipulator - crafting item + RecipeUtil.addRecipe( + new ItemStack(MarsItems.marsItemBasic, 1, 6), + new Object[] { "MXM", "SWS", "MXM", 'S', Items.slime_ball, 'X', GCItems.oxygenFan, 'M', + meteoricIronIngot, 'W', new ItemStack(GCItems.basicItem, 1, 14) }); + + RecipeUtil + .addRecipe(new ItemStack(MarsItems.marsItemBasic, 1, 1), new Object[] { "X", "X", 'X', deshIngot }); + + RecipeUtil.addRecipe( + new ItemStack(MarsItems.marsItemBasic, 9, 2), + new Object[] { "X", 'X', new ItemStack(MarsBlocks.marsBlock, 1, 8) }); + FurnaceRecipes.smelting().func_151394_a( + new ItemStack(MarsItems.marsItemBasic, 1, 0), + new ItemStack(MarsItems.marsItemBasic, 1, 2), + 0.2F); + FurnaceRecipes.smelting().func_151394_a( + new ItemStack(MarsBlocks.marsBlock, 1, 2), + new ItemStack(MarsItems.marsItemBasic, 1, 2), + 0.2F); + FurnaceRecipes.smelting() + .func_151394_a(new ItemStack(MarsBlocks.marsBlock, 1, 3), new ItemStack(Items.iron_ingot), 0.2F); + FurnaceRecipes.smelting().func_151394_a( + new ItemStack(MarsBlocks.marsBlock, 1, 0), + new ItemStack(GCItems.basicItem, 1, 3), + 1.0F); + FurnaceRecipes.smelting().func_151394_a( + new ItemStack(MarsBlocks.marsBlock, 1, 1), + new ItemStack(GCItems.basicItem, 1, 4), + 1.0F); + OreDictionary.registerOre("ingotDesh", new ItemStack(MarsItems.marsItemBasic, 1, 2)); + } } }