aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api
diff options
context:
space:
mode:
authorMartin Robertz <dream-master@gmx.net>2018-04-26 11:05:18 +0700
committerGitHub <noreply@github.com>2018-04-26 11:05:18 +0700
commit2893b1901293a1738a9288d1fa9efd0978cef978 (patch)
tree6a1312872dce0b08cb2c651e55918bc688a9c353 /src/main/java/gregtech/api
parentf23abac381d91416fb03b7a229217c7fb590b9d3 (diff)
parent55abb429e5516587fe8946a1d1643e882e6f08c7 (diff)
downloadGT5-Unofficial-2893b1901293a1738a9288d1fa9efd0978cef978.tar.gz
GT5-Unofficial-2893b1901293a1738a9288d1fa9efd0978cef978.tar.bz2
GT5-Unofficial-2893b1901293a1738a9288d1fa9efd0978cef978.zip
Merge pull request #115 from GTNewHorizons/bartimaeusnek'sOregenUpdate
OreVein Hardcode Update
Diffstat (limited to 'src/main/java/gregtech/api')
-rw-r--r--src/main/java/gregtech/api/world/GT_Worldgen.java15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/main/java/gregtech/api/world/GT_Worldgen.java b/src/main/java/gregtech/api/world/GT_Worldgen.java
index 0b73ac7331..c2bbdd1e21 100644
--- a/src/main/java/gregtech/api/world/GT_Worldgen.java
+++ b/src/main/java/gregtech/api/world/GT_Worldgen.java
@@ -51,11 +51,22 @@ public abstract class GT_Worldgen {
return false;
}
+ /**
+ *
+ * @param aWorld The World Object
+ * @param aDimensionType The Type of Worldgeneration to add. -1 = Nether, 0 = Overworld, +1 = End
+ * @param aAllowedDimensionType The Type of allowed Worldgeneration
+ * @return if generation for this world is allowed for MoronTech (tm) OreGen (ATM (2.0.3.1Dev) only End, Nether, Overworld, Twilight Forest and Deep Dark)
+ */
public boolean isGenerationAllowed(World aWorld, int aDimensionType, int aAllowedDimensionType) {
- String aDimName = aWorld.provider.getDimensionName();
+
+ if (!((aWorld.provider.getDimensionName().equalsIgnoreCase("Overworld")) || (aWorld.provider.getDimensionName().equalsIgnoreCase("Nether"))||(aWorld.provider.getDimensionName().equalsIgnoreCase("The End"))||(aWorld.provider.getDimensionName().equalsIgnoreCase("Twilight Forest"))||(aWorld.provider.getDimensionName().equalsIgnoreCase("Underdark"))))
+ return false;
+
+ String aDimName = aWorld.provider.getDimensionName();
Boolean tAllowed = mDimensionMap.get(aDimName);
if (tAllowed == null) {
- boolean tValue = GregTech_API.sWorldgenFile.get("worldgen.dimensions." + mWorldGenName, aDimName, aDimensionType == aAllowedDimensionType);
+ boolean tValue = GregTech_API.sWorldgenFile.get("worldgen." + mWorldGenName, aDimName, aDimensionType == aAllowedDimensionType);
mDimensionMap.put(aDimName, tValue);
return tValue;
}