From bea4cfc54566b4f3b9971d1da93782b03410f669 Mon Sep 17 00:00:00 2001 From: Shawn Buckley Date: Wed, 21 Oct 2015 20:47:13 -0400 Subject: Bring in experimental branch --- .../gregtech/loaders/misc/GT_Achievements.java | 38 +- .../gregtech/loaders/misc/GT_BeeDefinition.java | 683 +++++++++++++++++++++ src/main/java/gregtech/loaders/misc/GT_Bees.java | 25 + .../gregtech/loaders/misc/GT_BranchDefinition.java | 104 ++++ .../loaders/oreprocessing/ProcessingCell.java | 10 +- .../loaders/oreprocessing/ProcessingCircuit.java | 2 + .../loaders/oreprocessing/ProcessingDye.java | 5 +- .../loaders/oreprocessing/ProcessingLog.java | 38 +- .../loaders/oreprocessing/ProcessingNugget.java | 4 +- .../loaders/oreprocessing/ProcessingPipeLarge.java | 3 +- .../oreprocessing/ProcessingPipeMedium.java | 3 +- .../loaders/oreprocessing/ProcessingPipeSmall.java | 3 +- .../loaders/oreprocessing/ProcessingShaping.java | 2 + .../loaders/oreprocessing/ProcessingWire01.java | 34 +- .../loaders/oreprocessing/ProcessingWire02.java | 37 +- .../loaders/oreprocessing/ProcessingWire04.java | 43 +- .../loaders/oreprocessing/ProcessingWire08.java | 42 +- .../loaders/oreprocessing/ProcessingWire12.java | 37 +- .../loaders/oreprocessing/ProcessingWire16.java | 6 +- .../loaders/postload/GT_CraftingRecipeLoader.java | 68 +- .../gregtech/loaders/postload/GT_CropLoader.java | 140 +++-- .../loaders/postload/GT_MachineRecipeLoader.java | 281 +++++---- .../loaders/postload/GT_Worldgenloader.java | 5 +- .../preload/GT_Loader_Item_Block_And_Fluid.java | 317 ++++++++-- .../preload/GT_Loader_MetaTileEntities.java | 157 +++-- 25 files changed, 1676 insertions(+), 411 deletions(-) create mode 100644 src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java create mode 100644 src/main/java/gregtech/loaders/misc/GT_Bees.java create mode 100644 src/main/java/gregtech/loaders/misc/GT_BranchDefinition.java (limited to 'src/main/java/gregtech/loaders') diff --git a/src/main/java/gregtech/loaders/misc/GT_Achievements.java b/src/main/java/gregtech/loaders/misc/GT_Achievements.java index 5719d7a1a3..ecd24194ba 100644 --- a/src/main/java/gregtech/loaders/misc/GT_Achievements.java +++ b/src/main/java/gregtech/loaders/misc/GT_Achievements.java @@ -4,7 +4,6 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; -import thaumcraft.api.ThaumcraftApi; import thaumcraft.api.ThaumcraftApiHelper; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Loader; @@ -133,14 +132,14 @@ public int adjY = 9; registerAchievement("ebf", 8, -6, ItemList.Machine_Multi_BlastFurnace.get(1, new Object[] {}), "steampower", false); registerAchievement("energyhatch", 12, -6, ItemList.Hatch_Energy_LV.get(1, new Object[] {}), "ebf", false); - registerAchievement("aluminium", 8, 0, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Aluminium, 1L), "steel", false); - registerAchievement("highpowersmelt", 8, 2, ItemList.Machine_Multi_Furnace.get(1, new Object[] {}), "aluminium", false); + registerAchievement("gtaluminium", 8, 0, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Aluminium, 1L), "steel", false); + registerAchievement("highpowersmelt", 8, 2, ItemList.Machine_Multi_Furnace.get(1, new Object[] {}), "gtaluminium", false); registerAchievement("oilplant", 8, 4, ItemList.Distillation_Tower.get(1, new Object[] {}), "highpowersmelt", false); registerAchievement("factory", 8, 6, ItemList.Processing_Array.get(1, new Object[] {}), "oilplant", false); - registerAchievement("upgradeebf", 8, -2, ItemList.Hatch_Energy_MV.get(1, new Object[] {}), "aluminium", false); + registerAchievement("upgradeebf", 8, -2, ItemList.Hatch_Energy_MV.get(1, new Object[] {}), "gtaluminium", false); registerAchievement("maintainance", 10, -2, ItemList.Hatch_Maintenance.get(1, new Object[] {}), "upgradeebf", false); - registerAchievement("titan", 10, 0, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Titanium, 1L), "aluminium", false); + registerAchievement("titan", 10, 0, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Titanium, 1L), "gtaluminium", false); registerAchievement("magic", 10, 4, ItemList.MagicEnergyConverter_LV.get(1, new Object[] {}), "titan", false); registerAchievement("highmage", 10, 6, ItemList.MagicEnergyAbsorber_HV.get(1, new Object[] {}), "magic", false); registerAchievement("artificaldia", 11, 2, ItemList.IC2_Industrial_Diamond.get(1, new Object[] {}), "titan", false); @@ -255,7 +254,7 @@ public int adjY = 9; if (data != null) { if (data.mPrefix == OrePrefixes.ingot) { if(data.mMaterial.mMaterial==Materials.Aluminium){ - issueAchievement(player, "aluminium"); + issueAchievement(player, "gtaluminium"); }else if(data.mMaterial.mMaterial==Materials.Titanium){ issueAchievement(player, "titan"); }else if(data.mMaterial.mMaterial==Materials.BlueSteel){ @@ -298,13 +297,13 @@ public int adjY = 9; return; } ItemData data = GT_OreDictUnificator.getItemData(stack); - if (data != null) { - if (data.mPrefix == OrePrefixes.dust&&data.mMaterial.mMaterial == Materials.Bronze) { - issueAchievement(player, "bronze"); - }else if(data.mPrefix == OrePrefixes.circuit&&data.mMaterial.mMaterial == Materials.Advanced){ - issueAchievement(player, "stepforward"); + if (data != null) { + if (data.mPrefix == OrePrefixes.dust&&data.mMaterial.mMaterial == Materials.Bronze) { + issueAchievement(player, "bronze"); + }else if(data.mPrefix == OrePrefixes.circuit&&data.mMaterial.mMaterial == Materials.Advanced){ + issueAchievement(player, "stepforward"); + } } - } if(stack.getUnlocalizedName().startsWith("gt.metaitem.")){ if(stack.getUnlocalizedName().equals("gt.metaitem.01.2300")){ issueAchievement(player, "bronze"); @@ -425,7 +424,6 @@ public int adjY = 9; if (player == null||stack==null) { return; } -// System.out.println("Pickup: "+stack.getUnlocalizedName()); ItemData data = GT_OreDictUnificator.getItemData(stack); if (data != null) { if (data.mPrefix == OrePrefixes.dust) { @@ -446,13 +444,13 @@ public int adjY = 9; }else if(data.mPrefix == OrePrefixes.crushedCentrifuged){ issueAchievement(player, "spinit"); }else if(data.mMaterial.mMaterial == Materials.Steel){ - if(data.mPrefix == OrePrefixes.ingot && stack.stackSize == stack.getMaxStackSize()){ - issueAchievement(player, "steel"); - }else if(data.mPrefix == OrePrefixes.nugget && Loader.isModLoaded("Thaumcraft")){ - if(ThaumcraftApiHelper.isResearchComplete(player.getDisplayName(), "GT_IRON_TO_STEEL")){ - issueAchievement(player, "steel"); - } - } + if(data.mPrefix == OrePrefixes.ingot && stack.stackSize == stack.getMaxStackSize()){ + issueAchievement(player, "steel"); + }else if(data.mPrefix == OrePrefixes.nugget && Loader.isModLoaded("Thaumcraft")){ + if(ThaumcraftApiHelper.isResearchComplete(player.getDisplayName(), "GT_IRON_TO_STEEL")){ + issueAchievement(player, "steel"); + } + } }else if(data.mPrefix == OrePrefixes.circuit&&data.mMaterial.mMaterial == Materials.Advanced){ issueAchievement(player, "stepforward"); } diff --git a/src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java b/src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java new file mode 100644 index 0000000000..f7a6e23fa2 --- /dev/null +++ b/src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java @@ -0,0 +1,683 @@ +package gregtech.loaders.misc; + +import java.util.Arrays; +import java.util.Locale; + +import org.apache.commons.lang3.text.WordUtils; + +import crazypants.util.OreDictionaryHelper; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import forestry.api.apiculture.BeeManager; +import forestry.api.apiculture.EnumBeeChromosome; +import forestry.api.apiculture.EnumBeeType; +import forestry.api.apiculture.IAlleleBeeSpecies; +import forestry.api.apiculture.IAlleleBeeSpeciesCustom; +import forestry.api.apiculture.IBee; +import forestry.api.apiculture.IBeeGenome; +import forestry.api.apiculture.IBeeMutationCustom; +import forestry.api.genetics.AlleleManager; +import forestry.api.genetics.IAllele; +import forestry.apiculture.genetics.Bee; +import forestry.apiculture.genetics.BeeBranchDefinition; +import forestry.apiculture.genetics.BeeDefinition; +import forestry.apiculture.genetics.BeeFactory; +import forestry.apiculture.genetics.BeeMutation; +import forestry.apiculture.genetics.BeeVariation; +import forestry.apiculture.genetics.IBeeDefinition; +import forestry.core.config.ForestryItem; +import forestry.core.genetics.alleles.Allele; +import forestry.core.genetics.alleles.EnumAllele; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Log; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.common.items.CombType; + +public enum GT_BeeDefinition implements IBeeDefinition{ + CLAY(GT_BranchDefinition.ORGANIC, "Clay", true, 0x19d0ec, 0xffdc16) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(ForestryItem.beeComb.getItemStack(1, 0), 0.30f); + beeSpecies.addProduct(new ItemStack(Items.clay_ball,1), 0.15f); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.MEADOWS.getTemplate(); + } + + @Override + protected void registerMutations() { + registerMutation(getSpecies("Industrious"), getSpecies("Diligent"), 20); + } + }, + SLIMEBALL(GT_BranchDefinition.ORGANIC, "SlimeBall", true, 0x4E9E55, 0x00FF15) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(ForestryItem.beeComb.getItemStack(1, 15), 0.30f); + beeSpecies.addSpecialty(new ItemStack(Items.slime_ball,1), 0.15f); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.MARSHY.getTemplate(); + } + + @Override + protected void registerMutations() { + registerMutation(getSpecies("Marshy"), CLAY.species , 15); + } + }, + PEAT(GT_BranchDefinition.ORGANIC, "Peat", true, 0x906237, 0x58300B) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.LIGNIE), 0.30f); + beeSpecies.addProduct( ForestryItem.peat.getItemStack(1), 0.15f); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.RURAL.getTemplate(); + } + + @Override + protected void registerMutations() { + registerMutation(getSpecies("Rural"), CLAY.species, 20); + } + }, + STICKYRESIN(GT_BranchDefinition.ORGANIC, "StickyResin", true, 0x2E8F5B, 0xDCC289) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(ForestryItem.beeComb.getItemStack(1, 0), 0.30f); + beeSpecies.addProduct( ItemList.IC2_Resin.get(1, new Object[0]), 0.15f); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.MEADOWS.getTemplate(); + } + + @Override + protected void registerMutations() { + registerMutation(SLIMEBALL.species, PEAT.species, 25); + } + }, + COAL(GT_BranchDefinition.ORGANIC, "Coal", true, 0x666666, 0x525252) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.LIGNIE), 0.30f); + beeSpecies.addSpecialty( GT_Bees.combs.getStackForType(CombType.COAL), 0.15f); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.AUSTERE.getTemplate(); + } + + @Override + protected void registerMutations() { + registerMutation(getSpecies("Industrious"), PEAT.species, 18); + } + }, + OIL(GT_BranchDefinition.ORGANIC, "Oil", true, 0x4C4C4C, 0x333333) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(ForestryItem.beeComb.getItemStack(1, 0), 0.30f); + beeSpecies.addSpecialty( GT_Bees.combs.getStackForType(CombType.OIL), 0.15f); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.MEADOWS.getTemplate(); + } + + @Override + protected void registerMutations() { + registerMutation(COAL.species, STICKYRESIN.species, 8); + } + }, + REDSTONE(GT_BranchDefinition.GEM, "Redstone", true, 0x7D0F0F, 0xD11919) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STONE), 0.30f); + beeSpecies.addSpecialty( GT_Bees.combs.getStackForType(CombType.REDSTONE), 0.15f); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + registerMutation(getSpecies("Industrious"), getSpecies("Demonic"), 20); + } + }, + LAPIS(GT_BranchDefinition.GEM, "Lapis", true, 0x1947D1, 0x476CDA) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STONE), 0.30f); + beeSpecies.addSpecialty( GT_Bees.combs.getStackForType(CombType.LAPIS), 0.15f); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + registerMutation(getSpecies("Demonic"), getSpecies("Imperial"), 20); + } + }, + CERTUS(GT_BranchDefinition.GEM, "CertusQuartz", true, 0x57CFFB, 0xBBEEFF) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STONE), 0.30f); + beeSpecies.addSpecialty( GT_Bees.combs.getStackForType(CombType.CERTUS), 0.15f); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + registerMutation(getSpecies("Hermitic"), LAPIS.species, 20); + } + }, + RUBY(GT_BranchDefinition.GEM, "Ruby", true, 0xE6005C, 0xCC0052) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STONE), 0.30f); + beeSpecies.addSpecialty( GT_Bees.combs.getStackForType(CombType.RUBY), 0.15f); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + registerMutation(REDSTONE.species, DIAMOND.species, 10); + } + }, + SAPPHIRE(GT_BranchDefinition.GEM, "Sapphire", true, 0x0033CC, 0x00248F) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STONE), 0.30f); + beeSpecies.addSpecialty( GT_Bees.combs.getStackForType(CombType.SAPPHIRE), 0.15f); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + registerMutation(CERTUS.species, LAPIS.species, 10); + } + }, + DIAMOND(GT_BranchDefinition.GEM, "Diamond", true, 0xCCFFFF, 0xA3CCCC) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STONE), 0.30f); + beeSpecies.addSpecialty( GT_Bees.combs.getStackForType(CombType.DIAMOND), 0.15f); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + registerMutation(CERTUS.species, COAL.species, 6); + } + }, + OLIVINE(GT_BranchDefinition.GEM, "Olivine", true, 0x248F24, 0xCCFFCC) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STONE), 0.30f); + beeSpecies.addSpecialty( GT_Bees.combs.getStackForType(CombType.OLIVINE), 0.15f); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + registerMutation(CERTUS.species, getSpecies("Ended"), 10); + } + }, + EMERALD(GT_BranchDefinition.GEM, "Emerald", true, 0x248F24, 0x2EB82E) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STONE), 0.30f); + beeSpecies.addSpecialty( GT_Bees.combs.getStackForType(CombType.EMERALD), 0.15f); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + registerMutation(OLIVINE.species, DIAMOND.species, 8); + } + }, + COPPER(GT_BranchDefinition.METAL, "Copper", true, 0xFF6600, 0xE65C00) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); + beeSpecies.addProduct( GT_Bees.combs.getStackForType(CombType.COPPER), 0.15f); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + registerMutation(getSpecies("Majestic"), CLAY.species, 25); + } + }, + TIN(GT_BranchDefinition.METAL, "Tin", true, 0xD4D4D4, 0xDDDDDD) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); + beeSpecies.addProduct( GT_Bees.combs.getStackForType(CombType.TIN), 0.15f); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + registerMutation(CLAY.species, getSpecies("Diligent"), 25); + } + }, + LEAD(GT_BranchDefinition.METAL, "Lead", true, 0x666699, 0xA3A3CC) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); + beeSpecies.addProduct( GT_Bees.combs.getStackForType(CombType.LEAD), 0.15f); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + registerMutation(COAL.species, COPPER.species, 25); + } + }, + IRON(GT_BranchDefinition.METAL, "Iron", true, 0xDA9147, 0xDE9C59) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); + beeSpecies.addProduct( GT_Bees.combs.getStackForType(CombType.IRON), 0.15f); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + registerMutation(TIN.species, COPPER.species, 25); + } + }, + STEEL(GT_BranchDefinition.METAL, "Steel", true, 0x808080, 0x999999) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); + beeSpecies.addProduct( GT_Bees.combs.getStackForType(CombType.STEEL), 0.15f); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + registerMutation(IRON.species, COAL.species, 20); + } + }, + NICKEL(GT_BranchDefinition.METAL, "Nickel", true, 0x8585AD, 0x8585AD) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); + beeSpecies.addProduct( GT_Bees.combs.getStackForType(CombType.NICKEL), 0.15f); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + registerMutation(IRON.species, COPPER.species, 25); + } + }, + ZINC(GT_BranchDefinition.METAL, "Zinc", true, 0xF0DEF0, 0xF2E1F2) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); + beeSpecies.addProduct( GT_Bees.combs.getStackForType(CombType.ZINC), 0.15f); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + registerMutation(IRON.species, TIN.species, 20); + } + }, + SILVER(GT_BranchDefinition.METAL, "Silver", true, 0xC2C2D6, 0xCECEDE) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); + beeSpecies.addProduct( GT_Bees.combs.getStackForType(CombType.SILVER), 0.15f); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + registerMutation(LEAD.species, TIN.species, 20); + } + }, + GOLD(GT_BranchDefinition.METAL, "Gold", true, 0xEBC633, 0xEDCC47) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); + beeSpecies.addProduct( GT_Bees.combs.getStackForType(CombType.GOLD), 0.15f); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + registerMutation(LEAD.species, COPPER.species, 20); + } + }, + ALUMINIUM(GT_BranchDefinition.RAREMETAL, "Aluminium", true, 0xB8B8FF, 0xD6D6FF) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); + beeSpecies.addProduct( GT_Bees.combs.getStackForType(CombType.ALUMINIUM), 0.15f); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + registerMutation(NICKEL.species, ZINC.species, 18); + } + }, + TITANIUM(GT_BranchDefinition.RAREMETAL, "Titanium", true, 0xCC99FF, 0xDBB8FF) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); + beeSpecies.addProduct( GT_Bees.combs.getStackForType(CombType.TITANIUM), 0.15f); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + registerMutation(REDSTONE.species, ALUMINIUM.species, 5); + } + }, + CHROME(GT_BranchDefinition.RAREMETAL, "Chrome", true, 0xEBA1EB, 0xF2C3F2) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); + beeSpecies.addProduct( GT_Bees.combs.getStackForType(CombType.CHROME), 0.15f); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + registerMutation(TITANIUM.species, RUBY.species, 5); + } + }, + MANGANESE(GT_BranchDefinition.RAREMETAL, "Manganese", true, 0xD5D5D5, 0xAAAAAA) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); + beeSpecies.addProduct( GT_Bees.combs.getStackForType(CombType.MANGANESE), 0.15f); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + registerMutation(TITANIUM.species, ALUMINIUM.species, 5); + } + }, + TUNGSTEN(GT_BranchDefinition.RAREMETAL, "Tungsten", true, 0x5C5C8A, 0x7D7DA1) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); + beeSpecies.addProduct( GT_Bees.combs.getStackForType(CombType.TUNGSTEN), 0.15f); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + registerMutation(getSpecies("Heroic"), MANGANESE.species, 5); + } + }, + PLATINUM(GT_BranchDefinition.RAREMETAL, "Platinum", true, 0xE6E6E6, 0xFFFFCC) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); + beeSpecies.addProduct( GT_Bees.combs.getStackForType(CombType.PLATINUM), 0.15f); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + registerMutation(DIAMOND.species, CHROME.species, 5); + } + }, + IRIDIUM(GT_BranchDefinition.RAREMETAL, "Iridium", true, 0xDADADA, 0xD1D1E0) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.TUNGSTEN), 0.15f); + beeSpecies.addProduct( GT_Bees.combs.getStackForType(CombType.PLATINUM), 0.15f); + beeSpecies.addSpecialty( GT_Bees.combs.getStackForType(CombType.IRIDIUM), 0.15f); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.COMMON.getTemplate(); + } + + @Override + protected void registerMutations() { + registerMutation(TUNGSTEN.species, PLATINUM.species, 5); + } + }, + URANIUM(GT_BranchDefinition.RADIOACTIVE, "Uranium", true, 0x19AF19, 0x169E16) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); + beeSpecies.addProduct( GT_Bees.combs.getStackForType(CombType.URANIUM), 0.15f); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.AVENGING.getTemplate(); + } + + @Override + protected void registerMutations() { + registerMutation(getSpecies("Avenging"), PLATINUM.species, 5); + } + }, + PLUTONIUM(GT_BranchDefinition.RADIOACTIVE, "Plutonium", true, 0x335C33, 0x6B8F00) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); + beeSpecies.addProduct( GT_Bees.combs.getStackForType(CombType.PLUTONIUM), 0.15f); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.AVENGING.getTemplate(); + } + + @Override + protected void registerMutations() { + registerMutation(URANIUM.species, EMERALD.species, 5); + } + }, + NAQUADAH(GT_BranchDefinition.RADIOACTIVE, "Naquadah", true, 0x003300, 0x002400) { + @Override + protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { + beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SLAG), 0.30f); + beeSpecies.addProduct( GT_Bees.combs.getStackForType(CombType.NAQUADAH), 0.15f); + } + + @Override + protected void setAlleles(IAllele[] template) { + template = BeeDefinition.AVENGING.getTemplate(); + } + + @Override + protected void registerMutations() { + registerMutation(PLUTONIUM.species, IRIDIUM.species, 3); + } + }; + + + + private final GT_BranchDefinition branch; + private final IAlleleBeeSpeciesCustom species; + + private IAllele[] template; + private IBeeGenome genome; + + GT_BeeDefinition(GT_BranchDefinition branch, String binomial, boolean dominant, int primary, int secondary) { + String lowercaseName = this.toString().toLowerCase(Locale.ENGLISH); + String species = "species" + WordUtils.capitalize(lowercaseName); + + String uid = "forestry." + species; + String description = "for.description." + species; + String name = "for.bees.species." + lowercaseName; + + this.branch = branch; + this.species = BeeManager.beeFactory.createSpecies(uid, dominant, "Sengir", name, description, branch.getBranch(), binomial, primary, secondary); + } + + protected abstract void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies); + + protected abstract void setAlleles(IAllele[] template); + + protected abstract void registerMutations(); + + public static void initBees() { + for (GT_BeeDefinition bee : values()) { + bee.init(); + } + for (GT_BeeDefinition bee : values()) { + bee.registerMutations(); + } + } + + private void init() { + setSpeciesProperties(species); + + template = branch.getTemplate(); + Allele.helper.set(template, EnumBeeChromosome.SPECIES, species); + setAlleles(template); + + genome = BeeManager.beeRoot.templateAsGenome(template); + + BeeManager.beeRoot.registerTemplate(template); + } + + protected final IBeeMutationCustom registerMutation(IAlleleBeeSpecies parent1, IAlleleBeeSpecies parent2, int chance) { + return BeeManager.beeMutationFactory.createMutation(parent1, parent2, getTemplate(), chance); + } + + private static IAlleleBeeSpecies getSpecies(String name){ + return (IAlleleBeeSpecies) AlleleManager.alleleRegistry.getAllele((new StringBuilder()).append("forestry.species").append(name).toString()); + } + + @Override + public final IAllele[] getTemplate() { + return Arrays.copyOf(template, template.length); + } + + @Override + public final IBeeGenome getGenome() { + return genome; + } + + @Override + public final IBee getIndividual() { + return new Bee(genome); + } + + @Override + public final ItemStack getMemberStack(EnumBeeType beeType) { + IBee bee = getIndividual(); + return BeeManager.beeRoot.getMemberStack(bee, beeType.ordinal()); + } + + public final IBeeDefinition getRainResist() { + return new BeeVariation.RainResist(this); + } + +} diff --git a/src/main/java/gregtech/loaders/misc/GT_Bees.java b/src/main/java/gregtech/loaders/misc/GT_Bees.java new file mode 100644 index 0000000000..b6bab52da2 --- /dev/null +++ b/src/main/java/gregtech/loaders/misc/GT_Bees.java @@ -0,0 +1,25 @@ +package gregtech.loaders.misc; + +import cpw.mods.fml.common.Loader; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; +import forestry.api.apiculture.BeeManager; +import gregtech.GT_Mod; +import gregtech.api.GregTech_API; +import gregtech.api.enums.ItemList; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.common.GT_Proxy; +import gregtech.common.items.CombType; +import gregtech.common.items.ItemComb; + +public class GT_Bees { + + public static ItemComb combs; + + public GT_Bees(){ + if(Loader.isModLoaded("Forestry")&>_Mod.gregtechproxy.mGTBees){ + combs = new ItemComb(); + combs.initCombsRecipes(); + GT_BeeDefinition.initBees();} + } +} diff --git a/src/main/java/gregtech/loaders/misc/GT_BranchDefinition.java b/src/main/java/gregtech/loaders/misc/GT_BranchDefinition.java new file mode 100644 index 0000000000..58c3a87ce9 --- /dev/null +++ b/src/main/java/gregtech/loaders/misc/GT_BranchDefinition.java @@ -0,0 +1,104 @@ +package gregtech.loaders.misc; + +import java.util.Arrays; + +import forestry.api.apiculture.BeeManager; +import forestry.api.apiculture.EnumBeeChromosome; +import forestry.api.genetics.IAllele; +import forestry.api.genetics.IClassification; +import forestry.core.genetics.alleles.Allele; +import forestry.core.genetics.alleles.EnumAllele; + + + +public enum GT_BranchDefinition { + + ORGANIC("Fuelis"){ + @Override + protected void setBranchProperties(IAllele[] alleles) { + Allele.helper.set(alleles, EnumBeeChromosome.TEMPERATURE_TOLERANCE, EnumAllele.Tolerance.BOTH_1); + Allele.helper.set(alleles, EnumBeeChromosome.NOCTURNAL, false); + Allele.helper.set(alleles, EnumBeeChromosome.FLOWER_PROVIDER, EnumAllele.Flowers.VANILLA); + Allele.helper.set(alleles, EnumBeeChromosome.FLOWERING, EnumAllele.Flowering.AVERAGE); + } + }, + GEM("Ornamentis"){ + @Override + protected void setBranchProperties(IAllele[] alleles) { + Allele.helper.set(alleles, EnumBeeChromosome.TEMPERATURE_TOLERANCE, EnumAllele.Tolerance.BOTH_1); + Allele.helper.set(alleles, EnumBeeChromosome.NOCTURNAL, false); + Allele.helper.set(alleles, EnumBeeChromosome.FLOWER_PROVIDER, EnumAllele.Flowers.VANILLA); + Allele.helper.set(alleles, EnumBeeChromosome.FLOWERING, EnumAllele.Flowering.AVERAGE); + } + }, + METAL("Metaliferis"){ + @Override + protected void setBranchProperties(IAllele[] alleles) { + Allele.helper.set(alleles, EnumBeeChromosome.TEMPERATURE_TOLERANCE, EnumAllele.Tolerance.BOTH_1); + Allele.helper.set(alleles, EnumBeeChromosome.NOCTURNAL, false); + Allele.helper.set(alleles, EnumBeeChromosome.FLOWER_PROVIDER, EnumAllele.Flowers.VANILLA); + Allele.helper.set(alleles, EnumBeeChromosome.FLOWERING, EnumAllele.Flowering.AVERAGE); + } + }, + RAREMETAL("Mineralis"){ + @Override + protected void setBranchProperties(IAllele[] alleles) { + Allele.helper.set(alleles, EnumBeeChromosome.TEMPERATURE_TOLERANCE, EnumAllele.Tolerance.BOTH_1); + Allele.helper.set(alleles, EnumBeeChromosome.NOCTURNAL, false); + Allele.helper.set(alleles, EnumBeeChromosome.FLOWER_PROVIDER, EnumAllele.Flowers.VANILLA); + Allele.helper.set(alleles, EnumBeeChromosome.FLOWERING, EnumAllele.Flowering.AVERAGE); + } + }, + RADIOACTIVE("Criticalis"){ + @Override + protected void setBranchProperties(IAllele[] alleles) { + Allele.helper.set(alleles, EnumBeeChromosome.TEMPERATURE_TOLERANCE, EnumAllele.Tolerance.BOTH_1); + Allele.helper.set(alleles, EnumBeeChromosome.NOCTURNAL, false); + Allele.helper.set(alleles, EnumBeeChromosome.FLOWER_PROVIDER, EnumAllele.Flowers.VANILLA); + Allele.helper.set(alleles, EnumBeeChromosome.FLOWERING, EnumAllele.Flowering.AVERAGE); + } + }; + + private final IClassification branch; + + GT_BranchDefinition(String scientific) { + branch = BeeManager.beeFactory.createBranch(this.name().toLowerCase(), scientific); + } + + protected void setBranchProperties(IAllele[] template) { + + } + + public final IAllele[] getTemplate() { + IAllele[] template = getDefaultTemplate(); + setBranchProperties(template); + return template; + } + + public final IClassification getBranch() { + return branch; + } + + private static IAllele[] defaultTemplate; + + private static IAllele[] getDefaultTemplate() { + if (defaultTemplate == null) { + defaultTemplate = new IAllele[EnumBeeChromosome.values().length]; + + Allele.helper.set(defaultTemplate, EnumBeeChromosome.SPEED, EnumAllele.Speed.SLOWEST); + Allele.helper.set(defaultTemplate, EnumBeeChromosome.LIFESPAN, EnumAllele.Lifespan.SHORTER); + Allele.helper.set(defaultTemplate, EnumBeeChromosome.FERTILITY, EnumAllele.Fertility.NORMAL); + Allele.helper.set(defaultTemplate, EnumBeeChromosome.TEMPERATURE_TOLERANCE, EnumAllele.Tolerance.NONE); + Allele.helper.set(defaultTemplate, EnumBeeChromosome.NOCTURNAL, false); + Allele.helper.set(defaultTemplate, EnumBeeChromosome.HUMIDITY_TOLERANCE, EnumAllele.Tolerance.NONE); + Allele.helper.set(defaultTemplate, EnumBeeChromosome.TOLERANT_FLYER, false); + Allele.helper.set(defaultTemplate, EnumBeeChromosome.CAVE_DWELLING, false); + Allele.helper.set(defaultTemplate, EnumBeeChromosome.FLOWER_PROVIDER, EnumAllele.Flowers.VANILLA); + Allele.helper.set(defaultTemplate, EnumBeeChromosome.FLOWERING, EnumAllele.Flowering.SLOWEST); + Allele.helper.set(defaultTemplate, EnumBeeChromosome.TERRITORY, EnumAllele.Territory.AVERAGE); + Allele.helper.set(defaultTemplate, EnumBeeChromosome.EFFECT, Allele.effectNone); + } + return Arrays.copyOf(defaultTemplate, defaultTemplate.length); + } + +} diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCell.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCell.java index 20d48db611..0b5a84a41c 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCell.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCell.java @@ -90,11 +90,13 @@ public class ProcessingCell if (tList.size() > 0) { if ((aMaterial.mExtraData & 0x1) != 0) { - GT_Values.RA.addElectrolyzerRecipe(GT_Utility.copyAmount(tItemAmount, new Object[] { aStack }), tCapsuleCount > 0L ? (int)tCapsuleCount : 0, (ItemStack)tList.get(0), tList.size() < 2 ? null : (ItemStack)tList.get(1), tList.size() < 3 ? null : (ItemStack)tList.get(2), tList.size() < 4 ? null : (ItemStack)tList.get(3), tList.size() < 5 ? null : (ItemStack)tList.get(4), tList.size() < 6 ? null : tCapsuleCount < 0L ? ItemList.Cell_Empty.get(-tCapsuleCount, new Object[0]) : (ItemStack)tList.get(5), (int)Math.max(1L, Math.abs(aMaterial.getProtons() * 8L * tItemAmount)), Math.min(4, tList.size()) * 30); - } + //GT_Values.RA.addElectrolyzerRecipe(GT_Utility.copyAmount(tItemAmount, new Object[] { aStack }), tCapsuleCount > 0L ? (int)tCapsuleCount : 0, (ItemStack)tList.get(0), tList.size() < 2 ? null : (ItemStack)tList.get(1), tList.size() < 3 ? null : (ItemStack)tList.get(2), tList.size() < 4 ? null : (ItemStack)tList.get(3), tList.size() < 5 ? null : (ItemStack)tList.get(4), tList.size() < 6 ? null : tCapsuleCount < 0L ? ItemList.Cell_Empty.get(-tCapsuleCount, new Object[0]) : (ItemStack)tList.get(5), (int)Math.max(1L, Math.abs(aMaterial.getProtons() * 8L * tItemAmount)), Math.min(4, tList.size()) * 30); + GT_Values.RA.addElectrolyzerRecipe(GT_Utility.copyAmount(tItemAmount, new Object[] { aStack }), tCapsuleCount <= 0L ? 0 : (int)tCapsuleCount, (ItemStack)tList.get(0), tList.size() >= 2 ? (ItemStack)tList.get(1) : null, tList.size() >= 3 ? (ItemStack)tList.get(2) : null, tList.size() >= 4 ? (ItemStack)tList.get(3) : null, tList.size() >= 5 ? (ItemStack)tList.get(4) : null, tCapsuleCount >= 0L ? tList.size() >= 6 ? (ItemStack)tList.get(5) : null : ItemList.Cell_Empty.get(-tCapsuleCount, new Object[0]), (int)Math.max(1L, Math.abs(aMaterial.getProtons() * 8L * tItemAmount)), Math.min(4, tList.size()) * 30); + } if ((aMaterial.mExtraData & 0x2) != 0) { - GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(tItemAmount, new Object[] { aStack }), tCapsuleCount > 0L ? (int)tCapsuleCount : 0, (ItemStack)tList.get(0), tList.size() < 2 ? null : (ItemStack)tList.get(1), tList.size() < 3 ? null : (ItemStack)tList.get(2), tList.size() < 4 ? null : (ItemStack)tList.get(3), tList.size() < 5 ? null : (ItemStack)tList.get(4), tList.size() < 6 ? null : tCapsuleCount < 0L ? ItemList.Cell_Empty.get(-tCapsuleCount, new Object[0]) : (ItemStack)tList.get(5), (int)Math.max(1L, Math.abs(aMaterial.getMass() * 2L * tItemAmount))); - } + //GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(tItemAmount, new Object[] { aStack }), tCapsuleCount > 0L ? (int)tCapsuleCount : 0, (ItemStack)tList.get(0), tList.size() < 2 ? null : (ItemStack)tList.get(1), tList.size() < 3 ? null : (ItemStack)tList.get(2), tList.size() < 4 ? null : (ItemStack)tList.get(3), tList.size() < 5 ? null : (ItemStack)tList.get(4), tList.size() < 6 ? null : tCapsuleCount < 0L ? ItemList.Cell_Empty.get(-tCapsuleCount, new Object[0]) : (ItemStack)tList.get(5), (int)Math.max(1L, Math.abs(aMaterial.getMass() * 2L * tItemAmount))); + GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(tItemAmount, new Object[] { aStack }), tCapsuleCount <= 0L ? 0 : (int)tCapsuleCount, (ItemStack)tList.get(0), tList.size() >= 2 ? (ItemStack)tList.get(1) : null, tList.size() >= 3 ? (ItemStack)tList.get(2) : null, tList.size() >= 4 ? (ItemStack)tList.get(3) : null, tList.size() >= 5 ? (ItemStack)tList.get(4) : null, tCapsuleCount >= 0L ? tList.size() >= 6 ? (ItemStack)tList.get(5) : null : ItemList.Cell_Empty.get(-tCapsuleCount, new Object[0]), (int)Math.max(1L, Math.abs(aMaterial.getMass() * 2L * tItemAmount))); + } } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java index d161c37064..46ca89832d 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java @@ -28,6 +28,8 @@ public class ProcessingCircuit implements gregtech.api.interfaces.IOreRecipeRegi GT_ModHandler.removeRecipeByOutput(aStack); GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Basic.get(1L, new Object[0]), new Object[] { "WWW", "CPC", "WWW", Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Primitive), Character.valueOf('W'), OreDictNames.craftingWireCopper, Character.valueOf('P'), OrePrefixes.plate.get(Materials.Steel) }); GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Basic.get(1L, new Object[0]), new Object[] { "WCW", "WPW", "WCW", Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Primitive), Character.valueOf('W'), OreDictNames.craftingWireCopper, Character.valueOf('P'), OrePrefixes.plate.get(Materials.Steel) }); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Basic.get(1L, new Object[0]), new Object[] { "WWW", "CPC", "WWW", Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Primitive), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.RedAlloy), Character.valueOf('P'), OrePrefixes.plate.get(Materials.Steel) }); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Basic.get(1L, new Object[0]), new Object[] { "WCW", "WPW", "WCW", Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Primitive), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.RedAlloy), Character.valueOf('P'), OrePrefixes.plate.get(Materials.Steel) }); GT_ModHandler.addShapelessCraftingRecipe(ItemList.Circuit_Basic.get(1L, new Object[0]), new Object[] { ItemList.Circuit_Integrated.getWildcard(1L, new Object[0]) }); } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingDye.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingDye.java index 47431f6df5..67151a3d37 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingDye.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingDye.java @@ -27,8 +27,9 @@ public class ProcessingDye implements IOreRecipeRegistrator (GT_Utility.getContainerItem(aStack, true) == null)) { GT_ModHandler.addAlloySmelterRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glass, 8L), GT_Utility.copyAmount(1L, new Object[] { aStack }), new ItemStack(Blocks.stained_glass, 8, 15 - aDye.mIndex), 200, 8, false); GT_ModHandler.addAlloySmelterRecipe(new ItemStack(Blocks.glass, 8, 32767), GT_Utility.copyAmount(1L, new Object[] { aStack }), new ItemStack(Blocks.stained_glass, 8, 15 - aDye.mIndex), 200, 8, false); - GT_Values.RA.addMixerRecipe(GT_Utility.copyAmount(1L, new Object[] { aStack }), null, null, null, Materials.Water.getFluid(144L), FluidRegistry.getFluidStack("dye.watermixed." + aDye.name().toLowerCase(), 144), null, 16, 4); - GT_Values.RA.addMixerRecipe(GT_Utility.copyAmount(1L, new Object[] { aStack }), null, null, null, GT_ModHandler.getDistilledWater(144L), FluidRegistry.getFluidStack("dye.watermixed." + aDye.name().toLowerCase(), 144), null, 16, 4); + GT_Values.RA.addMixerRecipe(GT_Utility.copyAmount(1L, new Object[] { aStack }), null, null, null, Materials.Water.getFluid(216L), FluidRegistry.getFluidStack("dye.watermixed." + aDye.name().toLowerCase(), 192), null, 16, 4); + GT_Values.RA.addMixerRecipe(GT_Utility.copyAmount(1L, new Object[] { aStack }), null, null, null, GT_ModHandler.getDistilledWater(288L), FluidRegistry.getFluidStack("dye.watermixed." + aDye.name().toLowerCase(), 216), null, 16, 4); + GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(1L, new Object[] { aStack }), GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Salt,2), Materials.SulfuricAcid.getFluid(432), FluidRegistry.getFluidStack("dye.chemical." + aDye.name().toLowerCase(), 288), GT_Values.NI, 600, 48); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingLog.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingLog.java index cebd50ea24..035e5d4d8b 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingLog.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingLog.java @@ -29,7 +29,7 @@ public class ProcessingLog implements gregtech.api.interfaces.IOreRecipeRegistra if (aOreDictName.equals("logRubber")) { GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(1L, new Object[] { aStack }), null, null, Materials.Methane.getGas(60L), ItemList.IC2_Resin.get(1L, new Object[0]), GT_ModHandler.getIC2Item("plantBall", 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), null, null, new int[] { 5000, 3750, 2500, 2500 }, 200, 20); GT_ModHandler.addSawmillRecipe(GT_Utility.copyAmount(1L, new Object[] { aStack }), ItemList.IC2_Resin.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 16L)); - GT_ModHandler.addExtractionRecipe(GT_Utility.copyAmount(1L, new Object[] { aStack }), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Rubber, 1L)); + GT_ModHandler.addExtractionRecipe(GT_Utility.copyAmount(1L, new Object[] { aStack }), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RawRubber, 1L)); GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[] { aStack }), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 6L), ItemList.IC2_Resin.get(1L, new Object[0]), 33, false); } else { GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[] { aStack }), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 6L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), 80, false); @@ -44,13 +44,19 @@ public class ProcessingLog implements gregtech.api.interfaces.IOreRecipeRegistra int aMeta = aStack.getItemDamage(); if (aMeta == 32767) { - if ((GT_Utility.areStacksEqual(GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(1L, new Object[] { aStack }), false, null), new ItemStack(Items.coal, 1, 1))) && - (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", false))) { GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, new Object[] { aStack })); - } + if ((GT_Utility.areStacksEqual(GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(1L, new Object[] { aStack }), false, null), new ItemStack(Items.coal, 1, 1)))){ + GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, new Object[] { aStack }),null, 1, new ItemStack(Items.coal, 20, 1), Materials.Creosote.getFluid(4000), 640, 64); + GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, new Object[] { aStack }),Materials.Nitrogen.getGas(1000), 2, new ItemStack(Items.coal, 20, 1), Materials.Creosote.getFluid(4000), 320, 96); + GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, new Object[] { aStack }),null, 3, GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Ash,4), Materials.OilHeavy.getFluid(200), 320, 192); + if(GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", true)) { GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, new Object[] { aStack })); + }} for (int i = 0; i < 16; i++) { - if ((GT_Utility.areStacksEqual(GT_ModHandler.getSmeltingOutput(new ItemStack(aStack.getItem(), 1, i), false, null), new ItemStack(Items.coal, 1, 1))) && - (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", false))) { GT_ModHandler.removeFurnaceSmelting(new ItemStack(aStack.getItem(), 1, i)); - } + if ((GT_Utility.areStacksEqual(GT_ModHandler.getSmeltingOutput(new ItemStack(aStack.getItem(), 1, i), false, null), new ItemStack(Items.coal, 1, 1)))){ + GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, new Object[] { aStack }),null, 1, new ItemStack(Items.coal, 20, 1), Materials.Creosote.getFluid(4000), 640, 64); + GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, new Object[] { aStack }),Materials.Nitrogen.getGas(1000), 2, new ItemStack(Items.coal, 20, 1), Materials.Creosote.getFluid(4000), 320, 96); + GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, new Object[] { aStack }),null, 3, GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Ash,4), Materials.OilHeavy.getFluid(200), 320, 192); + if(GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", true)) { GT_ModHandler.removeFurnaceSmelting(new ItemStack(aStack.getItem(), 1, i)); + }} ItemStack tStack = GT_ModHandler.getRecipeOutput(new ItemStack[] { new ItemStack(aStack.getItem(), 1, i) }); if (tStack != null) { ItemStack tPlanks = GT_Utility.copy(new Object[] { tStack }); @@ -64,9 +70,12 @@ public class ProcessingLog implements gregtech.api.interfaces.IOreRecipeRegistra } } } else { - if ((GT_Utility.areStacksEqual(GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(1L, new Object[] { aStack }), false, null), new ItemStack(Items.coal, 1, 1))) && - (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", false))) { GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, new Object[] { aStack })); - } + if ((GT_Utility.areStacksEqual(GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(1L, new Object[] { aStack }), false, null), new ItemStack(Items.coal, 1, 1)))){ + GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, new Object[] { aStack }),null, 1, new ItemStack(Items.coal, 20, 1), Materials.Creosote.getFluid(4000), 640, 64); + GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, new Object[] { aStack }),Materials.Nitrogen.getGas(1000), 2, new ItemStack(Items.coal, 20, 1), Materials.Creosote.getFluid(4000), 320, 96); + GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, new Object[] { aStack }),null, 3, GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Ash,4), Materials.OilHeavy.getFluid(200), 320, 192); + if(GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", true)) { GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, new Object[] { aStack })); + }} ItemStack tStack = GT_ModHandler.getRecipeOutput(new ItemStack[] { GT_Utility.copyAmount(1L, new Object[] { aStack }) }); if (tStack != null) { ItemStack tPlanks = GT_Utility.copy(new Object[] { tStack }); @@ -80,9 +89,12 @@ public class ProcessingLog implements gregtech.api.interfaces.IOreRecipeRegistra } } - if ((GT_Utility.areStacksEqual(GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(1L, new Object[] { aStack }), false, null), new ItemStack(Items.coal, 1, 1))) && - (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", false))) GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, new Object[] { aStack })); - } + if ((GT_Utility.areStacksEqual(GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(1L, new Object[] { aStack }), false, null), new ItemStack(Items.coal, 1, 1)))){ + GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, new Object[] { aStack }),null, 1, new ItemStack(Items.coal, 20, 1), Materials.Creosote.getFluid(4000), 640, 64); + GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, new Object[] { aStack }),Materials.Nitrogen.getGas(1000), 2, new ItemStack(Items.coal, 20, 1), Materials.Creosote.getFluid(4000), 320, 96); + GT_Values.RA.addPyrolyseRecipe(GT_Utility.copyAmount(16L, new Object[] { aStack }),null, 3, GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Ash,4), Materials.OilHeavy.getFluid(200), 320, 192); + if(GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", true)) GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, new Object[] { aStack })); + }} } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingNugget.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingNugget.java index a5a09162c6..cfa1f3407b 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingNugget.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingNugget.java @@ -1,6 +1,5 @@ package gregtech.loaders.oreprocessing; -import appeng.api.config.TunnelType; import appeng.core.Api; import gregtech.GT_Mod; import gregtech.api.enums.GT_Values; @@ -30,10 +29,9 @@ public class ProcessingNugget implements gregtech.api.interfaces.IOreRecipeRegis if (aMaterial.mStandardMoltenFluid != null) GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Nugget.get(0L, new Object[0]), aMaterial.getMolten(16L), GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial, 1L), 16, 4); GT_RecipeRegistrator.registerReverseFluidSmelting(aStack, aMaterial, aPrefix.mMaterialAmount, null); GT_RecipeRegistrator.registerReverseMacerating(aStack, aMaterial, aPrefix.mMaterialAmount, null, null, null, false); - if(GT_Mod.gregtechproxy.mAE2Integration){ Api.INSTANCE.registries().matterCannon().registerAmmo(GT_OreDictUnificator.get(OrePrefixes.round, aMaterial, 1L), aMaterial.getMass());; - } + } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipeLarge.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipeLarge.java index a2007fb864..cfb54e185a 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipeLarge.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipeLarge.java @@ -19,8 +19,9 @@ public class ProcessingPipeLarge implements gregtech.api.interfaces.IOreRecipeRe public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if ((!aMaterial.contains(SubTag.NO_WORKING)) && ((aMaterial.contains(SubTag.WOOD)) || (!aMaterial.contains(SubTag.NO_SMASHING)))) { + if(!(aMaterial == Materials.Redstone|| aMaterial == Materials.Glowstone)){ GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1L, new Object[] { aStack }), GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "PHP", "P P", "PWP", Character.valueOf('P'), aMaterial == Materials.Wood ? OrePrefixes.plank.get(aMaterial) : OrePrefixes.plate.get(aMaterial), Character.valueOf('H'), aMaterial.contains(SubTag.WOOD) ? ToolDictNames.craftingToolSoftHammer : ToolDictNames.craftingToolHardHammer, Character.valueOf('W'), aMaterial.contains(SubTag.WOOD) ? ToolDictNames.craftingToolSaw : ToolDictNames.craftingToolWrench }); - } + }} } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipeMedium.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipeMedium.java index 569b942810..0e01069b32 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipeMedium.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipeMedium.java @@ -19,8 +19,9 @@ public class ProcessingPipeMedium implements gregtech.api.interfaces.IOreRecipeR public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if ((!aMaterial.contains(SubTag.NO_WORKING)) && ((aMaterial.contains(SubTag.WOOD)) || (!aMaterial.contains(SubTag.NO_SMASHING)))) { + if(!(aMaterial == Materials.Redstone|| aMaterial == Materials.Glowstone)){ GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(2L, new Object[] { aStack }), GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "PPP", "W H", "PPP", Character.valueOf('P'), aMaterial == Materials.Wood ? OrePrefixes.plank.get(aMaterial) : OrePrefixes.plate.get(aMaterial), Character.valueOf('H'), aMaterial.contains(SubTag.WOOD) ? ToolDictNames.craftingToolSoftHammer : ToolDictNames.craftingToolHardHammer, Character.valueOf('W'), aMaterial.contains(SubTag.WOOD) ? ToolDictNames.craftingToolSaw : ToolDictNames.craftingToolWrench }); - } + }} } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipeSmall.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipeSmall.java index 570c942f97..ac22b3d8dc 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipeSmall.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipeSmall.java @@ -19,8 +19,9 @@ public class ProcessingPipeSmall implements gregtech.api.interfaces.IOreRecipeRe public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if ((!aMaterial.contains(SubTag.NO_WORKING)) && ((aMaterial.contains(SubTag.WOOD)) || (!aMaterial.contains(SubTag.NO_SMASHING)))) { + if(!(aMaterial == Materials.Redstone|| aMaterial == Materials.Glowstone)){ GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(6L, new Object[] { aStack }), GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "PWP", "P P", "PHP", Character.valueOf('P'), aMaterial == Materials.Wood ? OrePrefixes.plank.get(aMaterial) : OrePrefixes.plate.get(aMaterial), Character.valueOf('H'), aMaterial.contains(SubTag.WOOD) ? ToolDictNames.craftingToolSoftHammer : ToolDictNames.craftingToolHardHammer, Character.valueOf('W'), aMaterial.contains(SubTag.WOOD) ? ToolDictNames.craftingToolSaw : ToolDictNames.craftingToolWrench }); - } + }} } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingShaping.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingShaping.java index e921cbe847..dc186d8d96 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingShaping.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingShaping.java @@ -43,9 +43,11 @@ public class ProcessingShaping implements gregtech.api.interfaces.IOreRecipeRegi } GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[] { aStack }), ItemList.Shape_Extruder_Pipe_Tiny.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.pipeTiny, aMaterial.mSmeltInto, tAmount * 2), 4 * tAmount, 8 * tVoltageMultiplier); + if(!(aMaterial == Materials.Redstone|| aMaterial == Materials.Glowstone)){ GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[] { aStack }), ItemList.Shape_Extruder_Pipe_Small.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.pipeSmall, aMaterial.mSmeltInto, tAmount), 8 * tAmount, 8 * tVoltageMultiplier); GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(3L, new Object[] { aStack }), ItemList.Shape_Extruder_Pipe_Medium.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, aMaterial.mSmeltInto, tAmount), 24 * tAmount, 8 * tVoltageMultiplier); GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(6L, new Object[] { aStack }), ItemList.Shape_Extruder_Pipe_Large.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.pipeLarge, aMaterial.mSmeltInto, tAmount), 48 * tAmount, 8 * tVoltageMultiplier); + } GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(12L, new Object[] { aStack }), ItemList.Shape_Extruder_Pipe_Huge.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.pipeHuge, aMaterial.mSmeltInto, tAmount), 96 * tAmount, 8 * tVoltageMultiplier); GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[] { aStack }), ItemList.Shape_Extruder_Plate.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial.mSmeltInto, tAmount), (int)Math.max(aMaterial.getMass() * 1L * tAmount, tAmount), 8 * tVoltageMultiplier); if (tAmount * 2 <= 64) GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[] { aStack }), ItemList.Shape_Extruder_Rod.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial.mSmeltInto, tAmount * 2), (int)Math.max(aMaterial.getMass() * 2L * tAmount, tAmount), 6 * tVoltageMultiplier); diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingWire01.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingWire01.java index 8efb652e22..8f10ec62d3 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingWire01.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingWire01.java @@ -1,7 +1,6 @@ package gregtech.loaders.oreprocessing; import appeng.api.config.TunnelType; -import appeng.api.features.IP2PTunnelRegistry; import appeng.core.Api; import gregtech.GT_Mod; import gregtech.api.enums.GT_Values; @@ -12,6 +11,8 @@ import gregtech.api.interfaces.internal.IGT_RecipeAdder; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; import net.minecraft.item.ItemStack; public class ProcessingWire01 implements gregtech.api.interfaces.IOreRecipeRegistrator @@ -23,13 +24,24 @@ public class ProcessingWire01 implements gregtech.api.interfaces.IOreRecipeRegis public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, aMaterial, 1L), new Object[] { aOreDictName, OrePrefixes.plate.get(Materials.Rubber) }); + if(aMaterial == Materials.Cobalt || aMaterial == Materials.Lead || aMaterial == Materials.Tin || aMaterial == Materials.Zinc || aMaterial == Materials.SolderingAlloy){ + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, aMaterial, 1L), new Object[] { aOreDictName, new ItemStack(Blocks.carpet, 1, 15), new ItemStack(Items.string, 1) }); + GT_Values.RA.addBoxingRecipe(GT_Utility.copyAmount(1L, new Object[] { aStack }), new ItemStack(Blocks.carpet, 1, 15), GT_OreDictUnificator.get(OrePrefixes.cableGt01, aMaterial, 1L), 100, 8); + GT_Values.RA.addUnboxingRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, aMaterial, 1L), GT_Utility.copyAmount(1L, new Object[] { aStack }), new ItemStack(Blocks.carpet, 1, 15), 100, 8); + }else if(aMaterial == Materials.RedAlloy){ + GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, aMaterial, 1L), new Object[] { aOreDictName, OrePrefixes.plate.get(Materials.Paper) }); + GT_Values.RA.addBoxingRecipe(GT_Utility.copyAmount(1L, new Object[] { aStack }), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Paper, 1L), GT_OreDictUnificator.get(OrePrefixes.cableGt01, aMaterial, 1L), 100, 8); + GT_Values.RA.addUnboxingRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, aMaterial, 1L), GT_Utility.copyAmount(1L, new Object[] { aStack }), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Paper, 1L), 100, 8); + + }else{ + GT_Values.RA.addAssemblerRecipe(aStack, ItemList.Circuit_Integrated.getWithDamage(0L, 24L, new Object[0]),Materials.Rubber.getMolten(144L), GT_OreDictUnificator.get(OrePrefixes.cableGt01, aMaterial, 1L), 100, 8); + GT_Values.RA.addUnboxingRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, aMaterial, 1L), GT_Utility.copyAmount(1L, new Object[] { aStack }), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Rubber, 1L), 100, 8); + } + if (!aMaterial.contains(gregtech.api.enums.SubTag.NO_SMASHING)) { GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(1L, new Object[] { aStack }), GT_OreDictUnificator.get(OrePrefixes.springSmall, aMaterial, 2L), 100, 8); GT_Values.RA.addWiremillRecipe(GT_Utility.copyAmount(1L, new Object[] { aStack }), GT_OreDictUnificator.get(OrePrefixes.wireFine, aMaterial, 4L), 200