From 55abb429e5516587fe8946a1d1643e882e6f08c7 Mon Sep 17 00:00:00 2001 From: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> Date: Thu, 26 Apr 2018 03:43:23 +0200 Subject: fixed galactic greg & config differnce --- src/main/java/gregtech/api/world/GT_Worldgen.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/main/java/gregtech/api') 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; } -- cgit