aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBlood-Asp <bloodasphendrik@gmail.com>2017-09-12 22:53:02 +0200
committerBlood-Asp <bloodasphendrik@gmail.com>2017-09-12 22:53:02 +0200
commit51a4389f7c78fd5581d3844e2b57c2bf8f45f0ed (patch)
tree1b6fb337f6a63977750ad94293d33700f968fbe1 /src
parent34ee89fc4b2fcc14975c018d21f83270427e3844 (diff)
downloadGT5-Unofficial-51a4389f7c78fd5581d3844e2b57c2bf8f45f0ed.tar.gz
GT5-Unofficial-51a4389f7c78fd5581d3844e2b57c2bf8f45f0ed.tar.bz2
GT5-Unofficial-51a4389f7c78fd5581d3844e2b57c2bf8f45f0ed.zip
Hard remove ores that might be exploitable by MRF laser drill
Diffstat (limited to 'src')
-rw-r--r--src/main/java/gregtech/GT_Mod.java8
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java7
-rw-r--r--src/main/java/gregtech/loaders/materialprocessing/ProcessingModSupport.java1
3 files changed, 14 insertions, 2 deletions
diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java
index 055bfcf13e..1944502360 100644
--- a/src/main/java/gregtech/GT_Mod.java
+++ b/src/main/java/gregtech/GT_Mod.java
@@ -19,6 +19,7 @@ import gregtech.common.GT_DummyWorld;
import gregtech.common.GT_Network;
import gregtech.common.GT_Proxy;
import gregtech.common.GT_RecipeAdder;
+import gregtech.common.blocks.GT_Block_Ores_Abstract;
import gregtech.common.entities.GT_Entity_Arrow;
import gregtech.common.entities.GT_Entity_Arrow_Potion;
import gregtech.common.items.armor.components.LoadArmorComponents;
@@ -279,6 +280,13 @@ public class GT_Mod implements IGT_Mod {
gregtechproxy.enableGCOres = GregTech_API.sWorldgenFile.get("general", "enableGCOres", gregtechproxy.enableGCOres);
gregtechproxy.enableUBOres = GregTech_API.sWorldgenFile.get("general", "enableUBOres", gregtechproxy.enableUBOres);
+ Materials[] tDisableOres = new Materials[]{Materials.Chrome, Materials.Naquadria, Materials.Silicon, Materials.Cobalt, Materials.Cadmium, Materials.Indium, Materials.Tungsten,
+ Materials.Adamantium, Materials.Mithril, Materials.DarkIron, Materials.Rutile, Materials.Alduorite, Materials.Magnesium, Materials.Nikolite};
+ for(Materials tMat : tDisableOres){
+ if(!GregTech_API.sMaterialComponents.get("disableLaserDrillOres", tMat.mName, false))
+ GT_Block_Ores_Abstract.aBlockedOres.add(tMat);
+ }
+
GregTech_API.mUseOnlyGoodSolderingMaterials = GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "useonlygoodsolderingmaterials", GregTech_API.mUseOnlyGoodSolderingMaterials);
if (tMainConfig.get("general", "hardermobspawners", true).getBoolean(true)) {
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java b/src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java
index 540651fd21..5595fa8673 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java
@@ -30,7 +30,9 @@ import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import java.util.ArrayList;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements ITileEntityProvider {
public static ThreadLocal<GT_TileEntity_Ores> mTemporaryTileEntity = new ThreadLocal();
@@ -38,6 +40,7 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements
public static boolean tHideOres;
private final String aTextName = ".name";
private final String aTextSmall = "Small ";
+ public static Set aBlockedOres = new HashSet<Materials>();
protected GT_Block_Ores_Abstract(String aUnlocalizedName, int aOreMetaCount, boolean aHideFirstMeta, Material aMaterial) {
super(GT_Item_Ores.class, aUnlocalizedName, aMaterial);
@@ -56,7 +59,7 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements
if (!this.getEnabledMetas()[j]) continue;
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + (j * 1000)) + aTextName, getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + ((i + 16000) + (j * 1000)) + aTextName, aTextSmall + getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
- if ((GregTech_API.sGeneratedMaterials[i].mTypes & 0x8) != 0) {
+ if ((GregTech_API.sGeneratedMaterials[i].mTypes & 0x8) != 0 && !aBlockedOres.contains(GregTech_API.sGeneratedMaterials[i])) {
GT_OreDictUnificator.registerOre(this.getProcessingPrefix()[j] != null ? this.getProcessingPrefix()[j].get(GregTech_API.sGeneratedMaterials[i]) : "", new ItemStack(this, 1, i + (j * 1000)));
if (tHideOres) {
if (!(j == 0 && !aHideFirstMeta)) {
@@ -247,7 +250,7 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements
public void getSubBlocks(Item aItem, CreativeTabs aTab, List aList) {
for (int i = 0; i < GregTech_API.sGeneratedMaterials.length; i++) {
Materials tMaterial = GregTech_API.sGeneratedMaterials[i];
- if ((tMaterial != null) && ((tMaterial.mTypes & 0x8) != 0)) {
+ if ((tMaterial != null) && ((tMaterial.mTypes & 0x8) != 0)&& !aBlockedOres.contains(tMaterial)) {
if (!(new ItemStack(aItem, 1, i).getDisplayName().contains(aTextName))) aList.add(new ItemStack(aItem, 1, i));
if (!(new ItemStack(aItem, 1, i + 1000).getDisplayName().contains(aTextName))) aList.add(new ItemStack(aItem, 1, i + 1000));
if (!(new ItemStack(aItem, 1, i + 2000).getDisplayName().contains(aTextName))) aList.add(new ItemStack(aItem, 1, i + 2000));
diff --git a/src/main/java/gregtech/loaders/materialprocessing/ProcessingModSupport.java b/src/main/java/gregtech/loaders/materialprocessing/ProcessingModSupport.java
index 68ee13322c..9df8bc056a 100644
--- a/src/main/java/gregtech/loaders/materialprocessing/ProcessingModSupport.java
+++ b/src/main/java/gregtech/loaders/materialprocessing/ProcessingModSupport.java
@@ -79,6 +79,7 @@ public class ProcessingModSupport implements gregtech.api.interfaces.IMaterialHa
Materials.ShadowSteel.mHasParentMod = false;
Materials.AstralSilver.mHasParentMod = false;
Materials.Midasium.mHasParentMod = false;
+ Materials.Adamantium.mHasParentMod = false;
}
if (!aEnableThaumcraftMats) {
Materials.Amber.mHasParentMod = false;