diff --git a/src/main/java/gregtechmod/loaders/load/GT_ItemIterator.java b/src/main/java/gregtechmod/loaders/load/GT_ItemIterator.java index d762a8f..631fed6 100644 --- a/src/main/java/gregtechmod/loaders/load/GT_ItemIterator.java +++ b/src/main/java/gregtechmod/loaders/load/GT_ItemIterator.java @@ -2,6 +2,9 @@ package gregtechmod.loaders.load; import java.util.Iterator; +import com.google.common.base.Optional; + +import cpw.mods.fml.common.Loader; import gregtechmod.GT_Mod; import gregtechmod.api.GregTech_API; import gregtechmod.api.enums.GT_ConfigCategories; @@ -114,6 +117,12 @@ public class GT_ItemIterator implements Runnable { RecipeMaps.CANINNING.factory().EUt(1).duration(600).inputs(new ItemStack(Items.cake, 1, GregTech_API.ITEM_WILDCARD_DAMAGE), GT_Items.IC2_Food_Can_Empty.get(6L)).output(GT_Items.IC2_Food_Can_Filled.get(6)).buildAndRegister(); RecipeMaps.CANINNING.factory().EUt(1).duration(300).inputs(new ItemStack(Items.mushroom_stew, 1, GregTech_API.ITEM_WILDCARD_DAMAGE), GT_Items.IC2_Food_Can_Empty.get(3L)).output(GT_Items.IC2_Food_Can_Filled.get(3)).output(new ItemStack(Items.bowl, 1)).buildAndRegister(); + if (Loader.isModLoaded("appliedenergistics2")) { + Optional opt = appeng.api.AEApi.instance().definitions().blocks().quartz().maybeStack(1); + if (opt.isPresent()) + GT_OreDictUnificator.add(OrePrefixes.block, Materials.CertusQuartz, opt.get()); + } + GT_Log.log.info("Scanning ItemList."); Iterator iterator = Item.itemRegistry.iterator(); while (iterator.hasNext()) { diff --git a/src/main/java/gregtechmod/loaders/oreprocessing/ProcessingBlock.java b/src/main/java/gregtechmod/loaders/oreprocessing/ProcessingBlock.java index 5ef6ce7..80406cd 100644 --- a/src/main/java/gregtechmod/loaders/oreprocessing/ProcessingBlock.java +++ b/src/main/java/gregtechmod/loaders/oreprocessing/ProcessingBlock.java @@ -29,6 +29,8 @@ public class ProcessingBlock implements IOreRecipeRegistrator { for (OreDictEntry entry : entries) { Materials aMaterial = this.getMaterial(aPrefix, entry); if (this.isExecutable(aPrefix, aMaterial) ) { + int outFromBlock = aMaterial == Materials.NetherQuartz || aMaterial == Materials.CertusQuartz ? 4 : 9; + if (GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial) != null) RecipeMaps.CUTTING.factory().EUt(30).duration(Math.max(aMaterial.getMass() * 10, 1)) .input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE)) @@ -56,15 +58,15 @@ public class ProcessingBlock implements IOreRecipeRegistrator { } if (tStack1 != null) { - tStack1.stackSize = 9; + tStack1.stackSize = outFromBlock; } if (tStack2 != null) { - tStack2.stackSize = 9; + tStack2.stackSize = outFromBlock; } if (tStack3 != null) { - tStack3.stackSize = 9; + tStack3.stackSize = outFromBlock; } if (GregTech_API.sRecipeFile.get(GT_ConfigCategories.Recipes.storageblockdecrafting, OrePrefixes.block.get(aMaterial), tStack2 != null)) { diff --git a/src/main/java/gregtechmod/loaders/oreprocessing/ProcessingDust.java b/src/main/java/gregtechmod/loaders/oreprocessing/ProcessingDust.java index 6834d9b..90639dc 100644 --- a/src/main/java/gregtechmod/loaders/oreprocessing/ProcessingDust.java +++ b/src/main/java/gregtechmod/loaders/oreprocessing/ProcessingDust.java @@ -206,7 +206,7 @@ public class ProcessingDust implements IOreRecipeRegistrator { ItemStack tStack = GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L); - if (!aMaterial.contains(SubTag.NO_SMELTING)) { + if (!aMaterial.contains(SubTag.NO_SMELTING) && tStack != null) { if (aMaterial.mBlastFurnaceRequired && null != tStack) { factory = RecipeMaps.BLAST_FURNANCE.factory() .minTemperature(aMaterial.mBlastFurnaceTemp).EUt(120) @@ -220,8 +220,10 @@ public class ProcessingDust implements IOreRecipeRegistrator { } } else { if (!OrePrefixes.block.isIgnored(aMaterial) && null == GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L)) { + ItemStack dust = GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial); + RecipeHandler.scheduleCraftingToRemove(new RecipeHandler.InventoryRecipeMatcher(false, dust, dust, dust, dust, dust, dust, dust, dust, dust)); RecipeHandler.scheduleIC2RecipeToRemove(GT_ModHandler.getCompressorRecipeList(), (in, out) -> in.matches(entry.ores.get(0))); - RecipeHandler.executeOnFinish(() -> GT_ModHandler.addCompressionRecipe(entry, 1, GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L))); + RecipeHandler.executeOnFinish(() -> GT_ModHandler.addCompressionRecipe(entry, 9, GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L))); } if ((OrePrefixes.block.isIgnored(aMaterial) diff --git a/src/main/java/gregtechmod/loaders/oreprocessing/ProcessingGem.java b/src/main/java/gregtechmod/loaders/oreprocessing/ProcessingGem.java index ac6637f..dc8dfe6 100644 --- a/src/main/java/gregtechmod/loaders/oreprocessing/ProcessingGem.java +++ b/src/main/java/gregtechmod/loaders/oreprocessing/ProcessingGem.java @@ -83,14 +83,26 @@ public class ProcessingGem implements IOreRecipeRegistrator { .buildAndRegister(); } + if (aMaterial == Materials.NetherQuartz) { + System.err.print(""); + } + if (!OrePrefixes.block.isIgnored(aMaterial)) { ItemStack a = entry.ores.get(0); - if (GT_ModHandler.getRecipeOutput(a, a, a, a, a, a, a, a, a) != null) - if (!GregTech_API.sRecipeFile.get(GT_ConfigCategories.Recipes.storageblockcrafting, OrePrefixes.block.get(aMaterial), false)) - RecipeHandler.scheduleCraftingToRemove(new RecipeHandler.InventoryRecipeMatcher(false, a, a, a, a, a, a, a, a, a)); RecipeHandler.scheduleIC2RecipeToRemove(GT_ModHandler.getCompressorRecipeList(), (in, out) -> in.matches(entry.ores.get(0))); - RecipeHandler.executeOnFinish(() -> GT_ModHandler.addCompressionRecipe(entry, 9, GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L))); + + if (GT_ModHandler.getRecipeOutput(a, a, a, a, a, a, a, a, a) != null) { + if (!GregTech_API.sRecipeFile.get(GT_ConfigCategories.Recipes.storageblockcrafting, OrePrefixes.block.get(aMaterial), false)) { + RecipeHandler.scheduleCraftingToRemove(new RecipeHandler.InventoryRecipeMatcher(true, a, a, a, a, a, a, a, a, a)); + } + RecipeHandler.executeOnFinish(() -> GT_ModHandler.addCompressionRecipe(entry, 9, GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L))); + + } else if (GT_ModHandler.getRecipeOutput(a, a, null, a, a, null) != null) { + if (!GregTech_API.sRecipeFile.get(GT_ConfigCategories.Recipes.storageblockcrafting, OrePrefixes.block.get(aMaterial), false)) + RecipeHandler.scheduleCraftingToRemove(new RecipeHandler.InventoryRecipeMatcher(true, a, a, null, a, a, null)); + RecipeHandler.executeOnFinish(() -> GT_ModHandler.addCompressionRecipe(entry, 4, GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L))); + } } for (ItemStack stack : entry.ores) { diff --git a/src/main/java/gregtechmod/loaders/oreprocessing/ProcessingIngot1.java b/src/main/java/gregtechmod/loaders/oreprocessing/ProcessingIngot1.java index f898456..4eff3d3 100644 --- a/src/main/java/gregtechmod/loaders/oreprocessing/ProcessingIngot1.java +++ b/src/main/java/gregtechmod/loaders/oreprocessing/ProcessingIngot1.java @@ -74,7 +74,7 @@ public class ProcessingIngot1 implements IOreRecipeRegistrator { ItemStack a = entry.ores.get(0); if (GT_ModHandler.getRecipeOutput(a, a, a, a, a, a, a, a, a) != null) if (!GregTech_API.sRecipeFile.get(GT_ConfigCategories.Recipes.storageblockcrafting, OrePrefixes.block.get(aMaterial), false)) - RecipeHandler.scheduleCraftingToRemove(new RecipeHandler.InventoryRecipeMatcher(false, a, a, a, a, a, a, a, a, a)); + RecipeHandler.scheduleCraftingToRemove(new RecipeHandler.InventoryRecipeMatcher(true, a, a, a, a, a, a, a, a, a)); } if (GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial) != null) { diff --git a/src/main/java/gregtechmod/loaders/postload/GT_CraftingRecipeLoader.java b/src/main/java/gregtechmod/loaders/postload/GT_CraftingRecipeLoader.java index fc3919e..6438cab 100644 --- a/src/main/java/gregtechmod/loaders/postload/GT_CraftingRecipeLoader.java +++ b/src/main/java/gregtechmod/loaders/postload/GT_CraftingRecipeLoader.java @@ -12,7 +12,9 @@ import gregtechmod.api.util.GT_Log; import gregtechmod.api.util.GT_ModHandler; import gregtechmod.api.util.GT_OreDictUnificator; import gregtechmod.api.util.GT_Utility; +import gregtechmod.common.RecipeHandler; import gregtechmod.common.items.GT_MetaItem_Material; + import net.minecraft.enchantment.Enchantment; import net.minecraft.init.Blocks; import net.minecraft.init.Items; @@ -985,5 +987,16 @@ public class GT_CraftingRecipeLoader implements Runnable { if (GregTech_API.sRecipeFile.get(GT_ConfigCategories.Recipes.disabledrecipes, "QPlate" , false)) GT_ModHandler.removeRecipe(GT_ModHandler.getIC2Item("quantumBodyarmor", 1)); if (GregTech_API.sRecipeFile.get(GT_ConfigCategories.Recipes.disabledrecipes, "QLegs" , false)) GT_ModHandler.removeRecipe(GT_ModHandler.getIC2Item("quantumLeggings", 1)); if (GregTech_API.sRecipeFile.get(GT_ConfigCategories.Recipes.disabledrecipes, "QBoots" , false)) GT_ModHandler.removeRecipe(GT_ModHandler.getIC2Item("quantumBoots", 1)); + + ItemStack plastic = GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Plastic); + if (GT_ModHandler.getRecipeOutput(plastic, plastic, null, plastic, plastic, null) != null) { + RecipeHandler.scheduleCraftingToRemove(new RecipeHandler.InventoryRecipeMatcher(false, plastic, plastic, null, plastic, plastic, null)); + RecipeHandler.scheduleSmeltingToRemove((in, out) -> GT_OreDictUnificator.isItemStackInstanceOf(in, OrePrefixes.block, Materials.Plastic) && out.stackSize == 4); + } + + if (GregTech_API.sRecipeFile.get(GT_ConfigCategories.Recipes.disabledrecipes, "ProjectRed_RedAlloyCompound", true)) { + ItemStack redstone = new ItemStack(Items.redstone), iron = new ItemStack(Items.iron_ingot); + RecipeHandler.scheduleCraftingToRemove(new RecipeHandler.InventoryRecipeMatcher(false, redstone, redstone, redstone, redstone, iron, redstone, redstone, redstone, redstone)); + } } } diff --git a/src/main/java/gregtechmod/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtechmod/loaders/postload/GT_MachineRecipeLoader.java index e025b51..85b72d6 100644 --- a/src/main/java/gregtechmod/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtechmod/loaders/postload/GT_MachineRecipeLoader.java @@ -500,6 +500,9 @@ public class GT_MachineRecipeLoader implements Runnable // RecipeMaps.ASSEMBLING.factory().EUt(16).duration(100).inputs(GT_OreDictUnificator.get(OrePrefixes.toolHeadScrewdriver, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L)).output(GT_Items.Tool_Screwdriver_Iron.getUndamaged(1L)).buildAndRegister(); // RecipeMaps.ASSEMBLING.factory().EUt(16).duration(100).inputs(GT_OreDictUnificator.get(OrePrefixes.toolHeadScrewdriver, Materials.TungstenSteel, 1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Steel, 1L)).output(GT_Items.Tool_Screwdriver_TungstenSteel.getUndamaged(1L)).buildAndRegister(); + RecipeMaps.ASSEMBLING.factory().EUt(4).duration(300).input(OrePrefixes.stick, Materials.Iron, 3).nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 3)).output(new ItemStack(Blocks.iron_bars, 4)).buildAndRegister(); + RecipeMaps.ASSEMBLING.factory().EUt(6).duration(260).input(OrePrefixes.plate, Materials.Iron, 7).nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 7)).output(new ItemStack(Items.cauldron, 1)).buildAndRegister(); + GT_ModHandler.removeRecipe(new ItemStack(Items.lava_bucket), GT_Items.Cell_Empty.get(1L)); GT_ModHandler.removeRecipe(new ItemStack(Items.water_bucket), GT_Items.Cell_Empty.get(1L)); GT_ModHandler.removeFurnaceSmelting(GT_Items.IC2_Resin.get(1L)); @@ -561,6 +564,18 @@ public class GT_MachineRecipeLoader implements Runnable RecipeMaps.PRINTER.factory().EUt(2).duration(400).setShaped(true).input("paperEmpty", 8).input(OrePrefixes.stick, Materials.Wood, 2).output(GT_OreDictUnificator.getFirstOre("paperArsSpellParchment", 1)).buildAndRegister(); } + RecipeMaps.LATHE.factory().EUt(8).duration(300) + .input(OrePrefixes.block, Materials.Iron) + .output(GT_ModHandler.getIC2Item("ironshaft", 1)) + .output(GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Iron, 6)) + .buildAndRegister(); + RecipeMaps.LATHE.factory().EUt(8).duration(300) + .input(OrePrefixes.block, Materials.Steel) + .output(GT_ModHandler.getIC2Item("steelshaft", 1)) + .output(GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Steel, 6)) + .buildAndRegister(); + + for (final MaterialStack[] tMats : this.mAlloySmelterList) { final ItemStack tOutputIngot = GT_OreDictUnificator.get(OrePrefixes.ingot, tMats[2].mMaterial, tMats[2].mAmount); final ItemStack tDust1 = GT_OreDictUnificator.get(OrePrefixes.dust, tMats[0].mMaterial, tMats[0].mAmount); diff --git a/src/main/java/gregtechmod/loaders/preload/GT_DictRegistratorPreItem.java b/src/main/java/gregtechmod/loaders/preload/GT_DictRegistratorPreItem.java index 443e764..420cd15 100644 --- a/src/main/java/gregtechmod/loaders/preload/GT_DictRegistratorPreItem.java +++ b/src/main/java/gregtechmod/loaders/preload/GT_DictRegistratorPreItem.java @@ -191,6 +191,8 @@ public class GT_DictRegistratorPreItem implements Runnable { GT_OreDictUnificator.add(OrePrefixes.block , Materials.Iridium , new ItemStack(GregTech_API.sBlockList[4], 1,12)); GT_OreDictUnificator.add(OrePrefixes.block , Materials.GarnetYellow , new ItemStack(GregTech_API.sBlockList[4], 1,14)); GT_OreDictUnificator.add(OrePrefixes.block , Materials.GarnetRed , new ItemStack(GregTech_API.sBlockList[4], 1,15)); + GT_OreDictUnificator.add(OrePrefixes.block , Materials.NetherQuartz , new ItemStack(Blocks.quartz_block, 1,0)); + GT_Log.log.info("Register other Mods Unification Targets."); // if (GT_Mod.sUnificatorFR) {