From 60c2cc4710823ed0e0bab0c78d4379d7931026c4 Mon Sep 17 00:00:00 2001 From: SenseiKiwi Date: Fri, 7 Mar 2014 15:15:22 -0400 Subject: [PATCH] Dropped Support for Structure Gen Flag Dropped support for Minecraft's structure generation flag because several other mods ignore it and supporting it can give the appearance that DD isn't working properly. We already have settings for disabling gateways in our config file. --- .../world/gateways/GatewayGenerator.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/main/java/StevenDimDoors/mod_pocketDim/world/gateways/GatewayGenerator.java b/src/main/java/StevenDimDoors/mod_pocketDim/world/gateways/GatewayGenerator.java index 0257be30..a95ee24d 100644 --- a/src/main/java/StevenDimDoors/mod_pocketDim/world/gateways/GatewayGenerator.java +++ b/src/main/java/StevenDimDoors/mod_pocketDim/world/gateways/GatewayGenerator.java @@ -113,10 +113,9 @@ public class GatewayGenerator implements IWorldGenerator while (random.nextInt(MAX_CLUSTER_GROWTH_CHANCE) < CLUSTER_GROWTH_CHANCE); } - //Check if generating structures is enabled and randomly decide whether to place a Rift Gateway here. - //This only happens if a rift cluster was NOT generated. - else if (random.nextInt(MAX_GATEWAY_GENERATION_CHANCE) < properties.GatewayGenerationChance && - isStructureGenerationAllowed()) + // Randomly decide whether to place a Rift Gateway here. + // This only happens if a rift cluster was NOT generated. + else if (random.nextInt(MAX_GATEWAY_GENERATION_CHANCE) < properties.GatewayGenerationChance) { valid = false; x = y = z = 0; //Stop the compiler from freaking out @@ -177,9 +176,4 @@ public class GatewayGenerator implements IWorldGenerator return (material != Material.leaves && material != Material.wood && material != Material.pumpkin && world.isBlockOpaqueCube(x, y, z) && world.getBlockId(x, y, z) != Block.bedrock.blockID); } - - private static boolean isStructureGenerationAllowed() - { - return DimensionManager.getWorld(OVERWORLD_DIMENSION_ID).getWorldInfo().isMapFeaturesEnabled(); - } }