added config for crystal clusters

Closes #700
This commit is contained in:
Ellpeck 2017-03-29 12:05:37 +02:00
parent 66cc7f59b3
commit ab5a4d29b1
2 changed files with 13 additions and 10 deletions

View file

@ -32,6 +32,7 @@ public enum ConfigBoolValues{
DO_COFFEE_GEN("Coffee Gen", ConfigCategories.WORLD_GEN, true, "Should Coffee Plants generate in the World?"),
DO_LOTUS_GEN("Black Lotus Gen", ConfigCategories.WORLD_GEN, true, "Should Black Lotus generate in the World?"),
DO_TREASURE_CHEST_GEN("Treasure Chest Gen", ConfigCategories.WORLD_GEN, true, "Should Treasure Chests generate in the World?"),
DO_CRYSTAL_CLUSTERS("Crystal Clusters in Lush Caves", ConfigCategories.WORLD_GEN, true, "If Crystal Clusters should generate in Lush Caves"),
DO_SPIDER_DROPS("Spider Cobweb Drop", ConfigCategories.MOB_DROPS, true, "Should Cobwebs drop from spiders?"),
DO_BAT_DROPS("Bat Wing Drop", ConfigCategories.MOB_DROPS, true, "Should Bat wings drop from Bats?"),

View file

@ -79,7 +79,8 @@ public class WorldGenLushCaves{
possiblePoses.add(pos);
}
}
else if(rand.nextInt(20) == 0){
else{
if(ConfigBoolValues.DO_CRYSTAL_CLUSTERS.isEnabled() && rand.nextInt(20) == 0){
EnumFacing[] values = EnumFacing.values();
EnumFacing side = values[rand.nextInt(values.length)];
BlockPos posSide = pos.offset(side);
@ -98,6 +99,7 @@ public class WorldGenLushCaves{
}
}
}
}
if(!possiblePoses.isEmpty()){
boolean crateGenDone = false;