From 45a2057b69ef0942d6c9fdf423d98aff1b78202d Mon Sep 17 00:00:00 2001 From: redmage17 Date: Wed, 1 Nov 2017 10:43:34 -0400 Subject: [PATCH] Configed Storage Blocks Added config for removal of shapless recipes for storage blocks --- src/main/java/gregtech/GT_Mod.java | 1 + src/main/java/gregtech/common/GT_Proxy.java | 1 + .../loaders/oreprocessing/ProcessingBlock.java | 18 +++++++++++------- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index 848791bb..6336254b 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -220,6 +220,7 @@ public class GT_Mod implements IGT_Mod { gregtechproxy.mSkeletonsShootGTArrows = tMainConfig.get(aTextGeneral, "SkeletonsShootGTArrows", 16).getInt(16); gregtechproxy.mFlintChance = tMainConfig.get(aTextGeneral, "FlintAndSteelChance", 30).getInt(30); gregtechproxy.mItemDespawnTime = tMainConfig.get(aTextGeneral, "ItemDespawnTime", 6000).getInt(6000); + gregtechproxy.mNerfStorageBlocks = tMainConfig.get(aTextGeneral,"NerfStorageBlocks",true).getBoolean(true); gregtechproxy.mDisableVanillaOres = tMainConfig.get(aTextGeneral, "DisableVanillaOres", true).getBoolean(true); gregtechproxy.mNerfDustCrafting = tMainConfig.get(aTextGeneral, "NerfDustCrafting", true).getBoolean(true); gregtechproxy.mIncreaseDungeonLoot = tMainConfig.get(aTextGeneral, "IncreaseDungeonLoot", true).getBoolean(true); diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index c0e1134c..eed43ab8 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -129,6 +129,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { public ArrayList mBufferedPlayerActivity = new ArrayList(); public boolean mHardcoreCables = false; public boolean mDisableVanillaOres = true; + public boolean mNerfStorageBlocks = true; public boolean mNerfDustCrafting = true; public boolean mSortToTheEnd = true; public boolean mCraftingUnification = true; diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingBlock.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingBlock.java index 3558e08f..def5ed7b 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingBlock.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingBlock.java @@ -1,5 +1,6 @@ package gregtech.loaders.oreprocessing; +import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.*; import gregtech.api.util.GT_ModHandler; @@ -19,14 +20,17 @@ public class ProcessingBlock implements gregtech.api.interfaces.IOreRecipeRegist ItemStack tStack2 = GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L); ItemStack tStack3 = GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L); - GT_ModHandler.removeRecipe(new ItemStack[]{GT_Utility.copyAmount(1L, new Object[]{aStack})}); + if (GT_Mod.gregtechproxy.mNerfStorageBlocks) { - if (tStack1 != null) - GT_ModHandler.removeRecipe(new ItemStack[]{tStack1, tStack1, tStack1, tStack1, tStack1, tStack1, tStack1, tStack1, tStack1}); - if (tStack2 != null) - GT_ModHandler.removeRecipe(new ItemStack[]{tStack2, tStack2, tStack2, tStack2, tStack2, tStack2, tStack2, tStack2, tStack2}); - if (tStack3 != null) { - GT_ModHandler.removeRecipe(new ItemStack[]{tStack3, tStack3, tStack3, tStack3, tStack3, tStack3, tStack3, tStack3, tStack3}); + GT_ModHandler.removeRecipe(new ItemStack[]{GT_Utility.copyAmount(1L, new Object[]{aStack})}); + + if (tStack1 != null) + GT_ModHandler.removeRecipe(new ItemStack[]{tStack1, tStack1, tStack1, tStack1, tStack1, tStack1, tStack1, tStack1, tStack1}); + if (tStack2 != null) + GT_ModHandler.removeRecipe(new ItemStack[]{tStack2, tStack2, tStack2, tStack2, tStack2, tStack2, tStack2, tStack2, tStack2}); + if (tStack3 != null) { + GT_ModHandler.removeRecipe(new ItemStack[]{tStack3, tStack3, tStack3, tStack3, tStack3, tStack3, tStack3, tStack3, tStack3}); + } } if (aMaterial.mStandardMoltenFluid != null) { GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Block.get(0L, new Object[0]), aMaterial.getMolten(1296L), GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L), 288, 8);