Various Small Changes #142

Merged
SenseiKiwi merged 9 commits from master into master 2014-03-08 02:53:14 +00:00
Showing only changes of commit 60c2cc4710 - Show all commits

View File

@@ -113,10 +113,9 @@ public class GatewayGenerator implements IWorldGenerator
while (random.nextInt(MAX_CLUSTER_GROWTH_CHANCE) < CLUSTER_GROWTH_CHANCE); 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. // Randomly decide whether to place a Rift Gateway here.
//This only happens if a rift cluster was NOT generated. // This only happens if a rift cluster was NOT generated.
else if (random.nextInt(MAX_GATEWAY_GENERATION_CHANCE) < properties.GatewayGenerationChance && else if (random.nextInt(MAX_GATEWAY_GENERATION_CHANCE) < properties.GatewayGenerationChance)
isStructureGenerationAllowed())
{ {
valid = false; valid = false;
x = y = z = 0; //Stop the compiler from freaking out 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 return (material != Material.leaves && material != Material.wood && material != Material.pumpkin
&& world.isBlockOpaqueCube(x, y, z) && world.getBlockId(x, y, z) != Block.bedrock.blockID); && 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();
}
} }