aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common
diff options
context:
space:
mode:
authorMuramasa <haydenkilloh@gmail.com>2016-09-09 14:25:59 +0100
committerMuramasa <haydenkilloh@gmail.com>2016-09-09 14:25:59 +0100
commitf53fb2b84b32a9f55b6be8d84a9afc016c21e4d0 (patch)
treed7776b5f043cf1da7888daacd2a95c4ea45e6103 /src/main/java/gregtech/common
parentac013d92c789ae5a17723c6a6de9ae9fb8d3dd38 (diff)
downloadGT5-Unofficial-f53fb2b84b32a9f55b6be8d84a9afc016c21e4d0.tar.gz
GT5-Unofficial-f53fb2b84b32a9f55b6be8d84a9afc016c21e4d0.tar.bz2
GT5-Unofficial-f53fb2b84b32a9f55b6be8d84a9afc016c21e4d0.zip
Bugfixes and now using built in OrePrefixes enabled/disabled lists
Diffstat (limited to 'src/main/java/gregtech/common')
-rw-r--r--src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java
index 45afe9c81a..77de60a67a 100644
--- a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java
+++ b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java
@@ -53,6 +53,12 @@ public class GT_Worldgen_GT_Ore_Layer
this.mBetweenMeta = ((short) GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "OreSporadiclyInbetween", aBetween.mMetaItemSubID));
this.mSporadicMeta = ((short) GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "OreSporaticlyAround", aSporadic.mMetaItemSubID));
this.mRestrictBiome = GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "RestrictToBiomeName", "None");
+
+ if (mPrimaryMeta != -1 && GregTech_API.sGeneratedMaterials[(mPrimaryMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied Material ID " + mPrimaryMeta + " for " + mWorldGenName + " does not exist");
+ if (mSecondaryMeta != -1 && GregTech_API.sGeneratedMaterials[(mSecondaryMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied Material ID " + mSecondaryMeta + " for " + mWorldGenName + " does not exist");
+ if (mBetweenMeta != -1 && GregTech_API.sGeneratedMaterials[(mBetweenMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied Material ID " + mBetweenMeta + " for " + mWorldGenName + " does not exist");
+ if (mPrimaryMeta != -1 && GregTech_API.sGeneratedMaterials[(mSporadicMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied Material ID " + mSporadicMeta + " for " + mWorldGenName + " does not exist");
+
if (this.mEnabled) {
GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mPrimaryMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd);
GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mSecondaryMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd);