aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api
diff options
context:
space:
mode:
authorbartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com>2018-04-26 03:43:23 +0200
committerbartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com>2018-04-26 03:43:23 +0200
commit55abb429e5516587fe8946a1d1643e882e6f08c7 (patch)
tree6a1312872dce0b08cb2c651e55918bc688a9c353 /src/main/java/gregtech/api
parente687d6d9258169b6e2476b3367f636d6c8eb1fd1 (diff)
downloadGT5-Unofficial-55abb429e5516587fe8946a1d1643e882e6f08c7.tar.gz
GT5-Unofficial-55abb429e5516587fe8946a1d1643e882e6f08c7.tar.bz2
GT5-Unofficial-55abb429e5516587fe8946a1d1643e882e6f08c7.zip
fixed galactic greg & config differnce
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;
}