diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index 589e7f88..b2fc618a 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -58,8 +58,7 @@ import java.util.*; import java.util.Map.Entry; @Mod(modid = "gregtech", name = "GregTech", version = "MC1710", useMetadata = false, dependencies = "required-after:IC2; after:Forestry; after:PFAAGeologica; after:Thaumcraft; after:Railcraft; after:appliedenergistics2; after:ThermalExpansion; after:TwilightForest; after:harvestcraft; after:magicalcrops; after:BuildCraft|Transport; after:BuildCraft|Silicon; after:BuildCraft|Factory; after:BuildCraft|Energy; after:BuildCraft|Core; after:BuildCraft|Builders; after:GalacticraftCore; after:GalacticraftMars; after:GalacticraftPlanets; after:ThermalExpansion|Transport; after:ThermalExpansion|Energy; after:ThermalExpansion|Factory; after:RedPowerCore; after:RedPowerBase; after:RedPowerMachine; after:RedPowerCompat; after:RedPowerWiring; after:RedPowerLogic; after:RedPowerLighting; after:RedPowerWorld; after:RedPowerControl; after:UndergroundBiomes;") -public class GT_Mod - implements IGT_Mod { +public class GT_Mod implements IGT_Mod { public static final int VERSION = 509; public static final int REQUIRED_IC2 = 624; @Mod.Instance("gregtech") @@ -231,6 +230,7 @@ public class GT_Mod gregtechproxy.mAchievements = tMainConfig.get(aTextGeneral, "EnableAchievements", true).getBoolean(true); gregtechproxy.mAE2Integration = GregTech_API.sSpecialFile.get(ConfigCategories.general, "EnableAE2Integration", Loader.isModLoaded("appliedenergistics2")); gregtechproxy.mNerfedCombs = tMainConfig.get(aTextGeneral, "NerfCombs", true).getBoolean(true); + gregtechproxy.mNerfedCrops = tMainConfig.get(aTextGeneral, "NerfCrops", true).getBoolean(true); gregtechproxy.mHideUnusedOres = tMainConfig.get(aTextGeneral, "HideUnusedOres", true).getBoolean(true); gregtechproxy.mHideRecyclingRecipes = tMainConfig.get(aTextGeneral, "HideRecyclingRecipes", true).getBoolean(true); //gregtechproxy.mArcSmeltIntoAnnealed = tMainConfig.get(aTextGeneral, "ArcSmeltIntoAnnealedWrought", true).getBoolean(true); @@ -251,13 +251,13 @@ public class GT_Mod gregtechproxy.mChangeHarvestLevels = GregTech_API.sMaterialProperties.get("havestLevel", "activateHarvestLevelChange", false); if(gregtechproxy.mChangeHarvestLevels){ - gregtechproxy.mGraniteHavestLevel = (int) GregTech_API.sMaterialProperties.get("havestLevel", "graniteHarvestLevel", 3); - gregtechproxy.mMaxHarvestLevel=(int) Math.min(15, GregTech_API.sMaterialProperties.get("havestLevel", "maxLevel",7)); - for(Materials tMaterial : Materials.values()){ - if(tMaterial!=null&&tMaterial.mToolQuality>0&&tMaterial.mMetaItemSubID=0){ - gregtechproxy.mHarvestLevel[tMaterial.mMetaItemSubID] = GregTech_API.sMaterialProperties.get("materialHavestLevel", tMaterial.mDefaultLocalName,tMaterial.mToolQuality); - } - }} + gregtechproxy.mGraniteHavestLevel = (int) GregTech_API.sMaterialProperties.get("havestLevel", "graniteHarvestLevel", 3); + gregtechproxy.mMaxHarvestLevel=(int) Math.min(15, GregTech_API.sMaterialProperties.get("havestLevel", "maxLevel",7)); + for(Materials tMaterial : Materials.values()){ + if(tMaterial!=null&&tMaterial.mToolQuality>0&&tMaterial.mMetaItemSubID=0){ + gregtechproxy.mHarvestLevel[tMaterial.mMetaItemSubID] = GregTech_API.sMaterialProperties.get("materialHavestLevel", tMaterial.mDefaultLocalName,tMaterial.mToolQuality); + } + }} if (tMainConfig.get(aTextGeneral, "hardermobspawners", true).getBoolean(true)) { Blocks.mob_spawner.setHardness(500.0F).setResistance(6000000.0F); @@ -395,7 +395,7 @@ public class GT_Mod } catch (Throwable e) {e.printStackTrace(GT_Log.err);} new GT_Bees(); - + gregtechproxy.onLoad(); if (gregtechproxy.mSortToTheEnd) { new GT_ItemIterator().run(); @@ -685,11 +685,11 @@ public class GT_Mod } if(GregTech_API.mOutputRF||GregTech_API.mInputRF){ - GT_Utility.checkAvailabilities(); - if(!GT_Utility.RF_CHECK){ - GregTech_API.mOutputRF = false; - GregTech_API.mInputRF = false; - } + GT_Utility.checkAvailabilities(); + if(!GT_Utility.RF_CHECK){ + GregTech_API.mOutputRF = false; + GregTech_API.mInputRF = false; + } } achievements = new GT_Achievements(); diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index e45ddfa2..a6a3c544 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -153,6 +153,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { private boolean mOreDictActivated = false; public boolean mChangeHarvestLevels=false; public boolean mNerfedCombs = true; + public boolean mNerfedCrops = true; public boolean mGTBees = true; public boolean mHideUnusedOres = true; public boolean mHideRecyclingRecipes = true; diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index 583dd765..03021e0f 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -1750,113 +1750,131 @@ public class GT_MachineRecipeLoader implements Runnable { ItemStack tCrop; // Metals Line tCrop = ItemList.Crop_Drop_Coppon.get(1, new Object[0]); - addProcess(tCrop, Materials.Copper, 100); - addProcess(tCrop, Materials.Tetrahedrite, 100); - addProcess(tCrop, Materials.Chalcopyrite, 100); - addProcess(tCrop, Materials.Malachite, 100); - addProcess(tCrop, Materials.Pyrite, 100); - addProcess(tCrop, Materials.Stibnite, 100); + addProcess(tCrop, Materials.Copper, 100, true); + addProcess(tCrop, Materials.Tetrahedrite, 100, false); + addProcess(tCrop, Materials.Chalcopyrite, 100, false); + addProcess(tCrop, Materials.Malachite, 100, false); + addProcess(tCrop, Materials.Pyrite, 100, false); + addProcess(tCrop, Materials.Stibnite, 100, false); tCrop = ItemList.Crop_Drop_Tine.get(1, new Object[0]); - addProcess(tCrop, Materials.Tin, 100); - addProcess(tCrop, Materials.Cassiterite, 100); + addProcess(tCrop, Materials.Tin, 100, true); + addProcess(tCrop, Materials.Cassiterite, 100, false); tCrop = ItemList.Crop_Drop_Plumbilia.get(1, new Object[0]); - addProcess(tCrop, Materials.Lead, 100); - addProcess(tCrop, Materials.Galena, 100); + addProcess(tCrop, Materials.Lead, 100, true); + addProcess(tCrop, Materials.Galena, 100, false); tCrop = ItemList.Crop_Drop_Ferru.get(1, new Object[0]); - addProcess(tCrop, Materials.Iron, 100); - addProcess(tCrop, Materials.Magnetite, 100); - addProcess(tCrop, Materials.BrownLimonite, 100); - addProcess(tCrop, Materials.YellowLimonite, 100); - addProcess(tCrop, Materials.VanadiumMagnetite, 100); - addProcess(tCrop, Materials.BandedIron, 100); - addProcess(tCrop, Materials.Pyrite, 100); - addProcess(tCrop, Materials.MeteoricIron, 100); + addProcess(tCrop, Materials.Iron, 100, true); + addProcess(tCrop, Materials.Magnetite, 100, false); + addProcess(tCrop, Materials.BrownLimonite, 100, false); + addProcess(tCrop, Materials.YellowLimonite, 100, false); + addProcess(tCrop, Materials.VanadiumMagnetite, 100, false); + addProcess(tCrop, Materials.BandedIron, 100, false); + addProcess(tCrop, Materials.Pyrite, 100, false); + addProcess(tCrop, Materials.MeteoricIron, 100, false); tCrop = ItemList.Crop_Drop_Nickel.get(1, new Object[0]); - addProcess(tCrop, Materials.Nickel, 100); - addProcess(tCrop, Materials.Garnierite, 100); - addProcess(tCrop, Materials.Pentlandite, 100); - addProcess(tCrop, Materials.Cobaltite, 100); - addProcess(tCrop, Materials.Wulfenite, 100); - addProcess(tCrop, Materials.Powellite, 100); + addProcess(tCrop, Materials.Nickel, 100, true); + addProcess(tCrop, Materials.Garnierite, 100, false); + addProcess(tCrop, Materials.Pentlandite, 100, false); + addProcess(tCrop, Materials.Cobaltite, 100, false); + addProcess(tCrop, Materials.Wulfenite, 100, false); + addProcess(tCrop, Materials.Powellite, 100, false); tCrop = ItemList.Crop_Drop_Zinc.get(1, new Object[0]); - addProcess(tCrop, Materials.Zinc, 100); - addProcess(tCrop, Materials.Sphalerite, 100); - addProcess(tCrop, Materials.Sulfur, 100); + addProcess(tCrop, Materials.Zinc, 100, true); + addProcess(tCrop, Materials.Sphalerite, 100, false); + addProcess(tCrop, Materials.Sulfur, 100, false); tCrop = ItemList.Crop_Drop_Argentia.get(1, new Object[0]); - addProcess(tCrop, Materials.Silver, 100); - addProcess(tCrop, Materials.Galena, 100); + addProcess(tCrop, Materials.Silver, 100, true); + addProcess(tCrop, Materials.Galena, 100, false); tCrop = ItemList.Crop_Drop_Aurelia.get(1, new Object[0]); - addProcess(tCrop, Materials.Gold, 100); - addProcess(tCrop, Materials.Magnetite, Materials.Gold, 100); + addProcess(tCrop, Materials.Gold, 100, true); + addProcess(tCrop, Materials.Magnetite, Materials.Gold, 100, false); // Rare Metals Line tCrop = ItemList.Crop_Drop_Bauxite.get(1, new Object[0]); - addProcess(tCrop,Materials.Aluminium,60); - addProcess(tCrop,Materials.Bauxite,100); + addProcess(tCrop,Materials.Aluminium,60, true); + addProcess(tCrop,Materials.Bauxite,100, false); tCrop = ItemList.Crop_Drop_Manganese.get(1, new Object[0]); - addProcess(tCrop,Materials.Manganese,30); - addProcess(tCrop,Materials.Grossular,100); - addProcess(tCrop,Materials.Spessartine,100); - addProcess(tCrop,Materials.Pyrolusite,100); - addProcess(tCrop,Materials.Tantalite,100); + addProcess(tCrop,Materials.Manganese,30, true); + addProcess(tCrop,Materials.Grossular,100, false); + addProcess(tCrop,Materials.Spessartine,100, false); + addProcess(tCrop,Materials.Pyrolusite,100, false); + addProcess(tCrop,Materials.Tantalite,100, false); tCrop = ItemList.Crop_Drop_Ilmenite.get(1, new Object[0]); - addProcess(tCrop,Materials.Titanium,100); - addProcess(tCrop,Materials.Ilmenite,100); - addProcess(tCrop,Materials.Bauxite,100); + addProcess(tCrop,Materials.Titanium,100, true); + addProcess(tCrop,Materials.Ilmenite,100, false); + addProcess(tCrop,Materials.Bauxite,100, false); tCrop = ItemList.Crop_Drop_Scheelite.get(1, new Object[0]); - addProcess(tCrop,Materials.Scheelite,100); - addProcess(tCrop,Materials.Tungstate,100); - addProcess(tCrop,Materials.Lithium,100); + addProcess(tCrop,Materials.Scheelite,100, true); + addProcess(tCrop,Materials.Tungstate,100, false); + addProcess(tCrop,Materials.Lithium,100, false); tCrop = ItemList.Crop_Drop_Platinum.get(1, new Object[0]); - addProcess(tCrop,Materials.Platinum,40); - addProcess(tCrop,Materials.Cooperite,40); - addProcess(tCrop,Materials.Palladium,40); - addProcess(tCrop, Materials.Neodymium, 100); - addProcess(tCrop, Materials.Bastnasite, 100); + addProcess(tCrop,Materials.Platinum,40, true); + addProcess(tCrop,Materials.Cooperite,40, false); + addProcess(tCrop,Materials.Palladium,40, false); + addProcess(tCrop, Materials.Neodymium, 100, false); + addProcess(tCrop, Materials.Bastnasite, 100, false); tCrop = ItemList.Crop_Drop_Iridium.get(1, new Object[0]); - addProcess(tCrop,Materials.Iridium,20); + addProcess(tCrop,Materials.Iridium,20, true); tCrop = ItemList.Crop_Drop_Osmium.get(1, new Object[0]); - addProcess(tCrop,Materials.Osmium,20); + addProcess(tCrop,Materials.Osmium,20, true); // Radioactive Line - tCrop = ItemList.Crop_Drop_Pitchblende.get(1, new Object[0]); - addProcess(tCrop,Materials.Pitchblende,50); + tCrop = ItemList.Crop_Drop_Pitchblende.get(1, new Object[0]); + addProcess(tCrop,Materials.Pitchblende,50, true); tCrop = ItemList.Crop_Drop_Uraninite.get(1, new Object[0]); - addProcess(tCrop,Materials.Uraninite,50); - addProcess(tCrop,Materials.Uranium,50); - addProcess(tCrop,Materials.Pitchblende,50); - addProcess(tCrop,Materials.Uranium235,50); + addProcess(tCrop,Materials.Uraninite,50, false); + addProcess(tCrop,Materials.Uranium,50, true); + addProcess(tCrop,Materials.Pitchblende,50, false); + addProcess(tCrop,Materials.Uranium235,50, false); tCrop = ItemList.Crop_Drop_Thorium.get(1, new Object[0]); - addProcess(tCrop,Materials.Thorium,50); + addProcess(tCrop,Materials.Thorium,50, true); tCrop = ItemList.Crop_Drop_Naquadah.get(1, new Object[0]); - addProcess(tCrop,Materials.Naquadah,10); - addProcess(tCrop,Materials.NaquadahEnriched,10); - addProcess(tCrop,Materials.Naquadria,10); + addProcess(tCrop,Materials.Naquadah,10, true); + addProcess(tCrop,Materials.NaquadahEnriched,10, false); + addProcess(tCrop,Materials.Naquadria,10, false); //Gem Line tCrop = ItemList.Crop_Drop_BobsYerUncleRanks.get(1, new Object[0]); - addProcess(tCrop, Materials.Emerald, 100); - addProcess(tCrop, Materials.Beryllium, 100); + addProcess(tCrop, Materials.Emerald, 100, true); + addProcess(tCrop, Materials.Beryllium, 100, false); } - public void addProcess(ItemStack tCrop, Materials aMaterial, int chance){ - if(GT_Mod.gregtechproxy.mNerfedCombs){ - GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(9, tCrop), GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1), Materials.Water.getFluid(1000), aMaterial.mOreByProducts.isEmpty() ? null : aMaterial.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4), 96, 24); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(16, tCrop), Materials.UUMatter.getFluid(Math.max(1, ((aMaterial.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 1), 10000, (int) (aMaterial.getMass() * 128), 384); - }else{ - GT_ModHandler.addExtractionRecipe(tCrop, GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 1)); -} - } - - public void addProcess(ItemStack tCrop, Materials aMaterial, Materials aMaterialOut, int chance){ - if(GT_Mod.gregtechproxy.mNerfedCombs){ - GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(9, tCrop), GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1), Materials.Water.getFluid(1000), aMaterialOut.mOreByProducts.isEmpty() ? null : aMaterialOut.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterialOut, 4), 96, 24); - GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(16, tCrop), Materials.UUMatter.getFluid(Math.max(1, ((aMaterial.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 1), 10000, (int) (aMaterial.getMass() * 128), 384); - }else{ - GT_ModHandler.addExtractionRecipe(tCrop, GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 1)); -} - } + public void addProcess(ItemStack tCrop, Materials aMaterial, int chance, boolean aMainOutput) { + if (GT_Mod.gregtechproxy.mNerfedCrops) { + GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(9, tCrop), GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1), Materials.Water.getFluid(1000), aMaterial.mOreByProducts.isEmpty() ? null : aMaterial.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4), 96, 24); + GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(16, tCrop), Materials.UUMatter.getFluid(Math.max(1, ((aMaterial.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 1), 10000, (int) (aMaterial.getMass() * 128), 384); + } else { + if (aMainOutput) GT_ModHandler.addExtractionRecipe(tCrop, GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 1)); + } + } + + public void addProcess(ItemStack tCrop, Materials aMaterial, int chance){ + if (GT_Mod.gregtechproxy.mNerfedCrops) { + GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(9, tCrop), GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1), Materials.Water.getFluid(1000), aMaterial.mOreByProducts.isEmpty() ? null : aMaterial.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4), 96, 24); + GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(16, tCrop), Materials.UUMatter.getFluid(Math.max(1, ((aMaterial.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 1), 10000, (int) (aMaterial.getMass() * 128), 384); + } else { + GT_ModHandler.addExtractionRecipe(tCrop, GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 1)); + } + } + + public void addProcess(ItemStack tCrop, Materials aMaterial, Materials aMaterialOut, int chance, boolean aMainOutput){ + if (GT_Mod.gregtechproxy.mNerfedCrops) { + GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(9, tCrop), GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1), Materials.Water.getFluid(1000), aMaterialOut.mOreByProducts.isEmpty() ? null : aMaterialOut.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterialOut, 4), 96, 24); + GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(16, tCrop), Materials.UUMatter.getFluid(Math.max(1, ((aMaterial.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 1), 10000, (int) (aMaterial.getMass() * 128), 384); + } else { + if (aMainOutput) GT_ModHandler.addExtractionRecipe(tCrop, GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 1)); + } + } + + public void addProcess(ItemStack tCrop, Materials aMaterial, Materials aMaterialOut, int chance){ + if (GT_Mod.gregtechproxy.mNerfedCrops) { + GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(9, tCrop), GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1), Materials.Water.getFluid(1000), aMaterialOut.mOreByProducts.isEmpty() ? null : aMaterialOut.mOreByProducts.get(0).getMolten(144), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterialOut, 4), 96, 24); + GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(16, tCrop), Materials.UUMatter.getFluid(Math.max(1, ((aMaterial.getMass()+9)/10))), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 1), 10000, (int) (aMaterial.getMass() * 128), 384); + } else { + GT_ModHandler.addExtractionRecipe(tCrop, GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 1)); + } + } private void run2(){