Added customization option for hot springs and nether hives (for when they're re-added), and fixed some of the other options

This commit is contained in:
Forstride 2016-02-01 13:42:25 -05:00
parent 2389a1e0ff
commit ebbfc36e99
15 changed files with 57 additions and 18 deletions

View file

@ -187,7 +187,9 @@ public class GuiBOPConfigureWorld extends GuiScreen implements GuiSlider.FormatH
GENERATE_WILD_CARROTS (118),
GENERATE_THORNS (119),
GENERATE_QUICKSAND (120),
GENERATE_LIQUID_POISON (121),;
GENERATE_LIQUID_POISON (121),
GENERATE_HOT_SPRINGS (122),
GENERATE_NETHER_HIVES (123);
private int id;
@ -248,7 +250,9 @@ public class GuiBOPConfigureWorld extends GuiScreen implements GuiSlider.FormatH
new GuiBOPPageList.GuiButtonEntry(GuiEntries.GENERATE_WILD_CARROTS.getId(), "Generate Wild Carrots", true, this.settings.generateWildCarrots),
new GuiBOPPageList.GuiButtonEntry(GuiEntries.GENERATE_THORNS.getId(), "Generate Thorns", true, this.settings.generateThorns),
new GuiBOPPageList.GuiButtonEntry(GuiEntries.GENERATE_QUICKSAND.getId(), "Generate Quicksand", true, this.settings.generateQuicksand),
new GuiBOPPageList.GuiButtonEntry(GuiEntries.GENERATE_LIQUID_POISON.getId(), "Generate Liquid Poison", true, this.settings.generateLiquidPoison)
new GuiBOPPageList.GuiButtonEntry(GuiEntries.GENERATE_LIQUID_POISON.getId(), "Generate Liquid Poison", true, this.settings.generateLiquidPoison),
new GuiBOPPageList.GuiButtonEntry(GuiEntries.GENERATE_HOT_SPRINGS.getId(), "Generate Hot Springs", true, this.settings.generateHotSprings),
new GuiBOPPageList.GuiButtonEntry(GuiEntries.GENERATE_NETHER_HIVES.getId(), "Generate Nether Hives", true, this.settings.generateNetherHives)
};
this.pageManager = new GuiBOPPageManager(createTableForFields(page0Fields, page1Fields, page2Fields));
@ -385,6 +389,12 @@ public class GuiBOPConfigureWorld extends GuiScreen implements GuiSlider.FormatH
case GENERATE_LIQUID_POISON:
this.settings.generateLiquidPoison = value;
break;
case GENERATE_HOT_SPRINGS:
this.settings.generateHotSprings = value;
break;
case GENERATE_NETHER_HIVES:
this.settings.generateNetherHives = value;
break;
default:
break;
}

View file

@ -53,7 +53,7 @@ public class BiomeGenAlps extends BOPBiome
@Override
public void applySettings(BOPWorldSettings settings)
{
if (!settings.generateBopGems) {this.removeGenerator("emeralds");}
if (!settings.generateHotSprings) {this.removeGenerator("hot_springs");}
if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");}
}

View file

@ -84,8 +84,6 @@ public class BiomeGenCanyon extends BOPBiome
@Override
public void applySettings(BOPWorldSettings settings)
{
if (!settings.generateBopGems) {this.removeGenerator("emeralds");}
if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");}
if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("algae"); this.removeGenerator("duckweed"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");}

View file

@ -48,8 +48,6 @@ public class BiomeGenCrag extends BOPBiome
@Override
public void applySettings(BOPWorldSettings settings)
{
if (!settings.generateBopGems) {this.removeGenerator("emeralds");}
if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");}
}

View file

@ -18,6 +18,7 @@ import net.minecraft.world.biome.BiomeGenBase.SpawnListEntry;
import biomesoplenty.api.biome.BOPBiome;
import biomesoplenty.api.biome.generation.GeneratorStage;
import biomesoplenty.api.biome.generation.GeneratorWeighted;
import biomesoplenty.common.block.BlockBOPLilypad;
import biomesoplenty.common.entities.EntityButterfly;
import biomesoplenty.common.enums.BOPClimates;
import biomesoplenty.common.enums.BOPGems;
@ -78,7 +79,10 @@ public class BiomeGenEucalyptusForest extends BOPBiome
this.addGenerator("melons", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(0.015625F).placeOn(this.topBlock).with(Blocks.melon_block.getDefaultState()).create());
// water plants
this.addGenerator("mixed_lily", GeneratorStage.LILYPAD, (new GeneratorMixedLily.Builder()).amountPerChunk(0.8F).create());
this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(Blocks.waterlily.getDefaultState()).create());
this.addGenerator("medium_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(BlockBOPLilypad.LilypadType.MEDIUM).create());
this.addGenerator("small_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.SMALL).create());
this.addGenerator("tiny_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.TINY).create());
// gem
this.addGenerator("topaz", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.TOPAZ).create());

View file

@ -24,6 +24,7 @@ import biomesoplenty.common.block.BlockBOPCoral;
import biomesoplenty.common.block.BlockBOPDirt;
import biomesoplenty.common.block.BlockBOPDoublePlant;
import biomesoplenty.common.block.BlockBOPGrass;
import biomesoplenty.common.block.BlockBOPLilypad;
import biomesoplenty.common.block.BlockBOPMushroom;
import biomesoplenty.common.block.BlockBOPPlant;
import biomesoplenty.common.entities.EntitySnail;
@ -106,7 +107,10 @@ public class BiomeGenFen extends BOPBiome
// water plants
this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(1.0F).with(BOPPlants.REED).generationAttempts(32).create());
this.addGenerator("mixed_lily", GeneratorStage.LILYPAD, (new GeneratorMixedLily.Builder()).amountPerChunk(2.0F).generationAttempts(96).create());
this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(Blocks.waterlily.getDefaultState()).create());
this.addGenerator("medium_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.MEDIUM).create());
this.addGenerator("small_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.SMALL).create());
this.addGenerator("tiny_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.TINY).create());
this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(3.0F).replace(Blocks.water).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).generationAttempts(32).scatterYMethod(ScatterYMethod.AT_GROUND).create());
// shrooms

View file

@ -20,6 +20,7 @@ import biomesoplenty.api.biome.generation.GeneratorStage;
import biomesoplenty.api.biome.generation.GeneratorWeighted;
import biomesoplenty.api.block.BOPBlocks;
import biomesoplenty.api.block.BlockQueries;
import biomesoplenty.common.block.BlockBOPLilypad;
import biomesoplenty.common.block.BlockBOPMushroom;
import biomesoplenty.common.block.BlockBOPPlant;
import biomesoplenty.common.entities.EntitySnail;
@ -90,7 +91,10 @@ public class BiomeGenFungiForest extends BOPBiome
this.addGenerator("melons", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(0.015625F).placeOn(this.topBlock).with(Blocks.melon_block.getDefaultState()).create());
// water plants
this.addGenerator("mixed_lily", GeneratorStage.LILYPAD, (new GeneratorMixedLily.Builder()).amountPerChunk(1.2F).create());
this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(Blocks.waterlily.getDefaultState()).create());
this.addGenerator("medium_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(BlockBOPLilypad.LilypadType.MEDIUM).create());
this.addGenerator("small_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.SMALL).create());
this.addGenerator("tiny_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.TINY).create());
// flowers
GeneratorWeighted flowerGenerator = new GeneratorWeighted(1.0F);

View file

@ -64,7 +64,6 @@ public class BiomeGenHighland extends BOPBiome
@Override
public void applySettings(BOPWorldSettings settings)
{
if (!settings.generateBopGems) {this.removeGenerator("emerald");}
if (!settings.generateWildCarrots) {this.removeGenerator("wild_carrots");}
if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");}

View file

@ -170,7 +170,6 @@ public class BiomeGenMountain extends BOPBiome
@Override
public void applySettings(BOPWorldSettings settings)
{
if (!settings.generateBopGems) {this.removeGenerator("emeralds");}
if (!settings.generateFlax) {this.removeGenerator("flax");}
if (!settings.generateBerryBushes) {this.removeGenerator("berry_bushes");}

View file

@ -78,12 +78,14 @@ public class BiomeGenOutback extends BOPBiome
{
if (!settings.generateBopGems) {this.removeGenerator("ruby");}
IBlockPosQuery emptyHardSand = BlockQuery.buildAnd().withAirAbove().states(this.topBlock).create();
if (!settings.generateBopSoils) {this.removeGenerator("grass_splatter"); this.addGenerator("grass_splatter_new", GeneratorStage.SAND, (new GeneratorSplatter.Builder()).amountPerChunk(8.0F).generationAttempts(128).replace(emptyHardSand).with(Blocks.grass.getDefaultState()).create());}
if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");}
if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
if (!settings.generateBopGrasses) {this.removeGenerator("grass");}
}
}

View file

@ -92,14 +92,16 @@ public class BiomeGenQuagmire extends BOPBiome
{
if (!settings.generateBopGems) {this.removeGenerator("malachite");}
IBlockPosQuery emptyMud = BlockQuery.buildAnd().withAirAbove().states(this.topBlock).create();
if (!settings.generateBopSoils) {this.removeGenerator("grass_splatter"); this.addGenerator("grass_splatter_new", GeneratorStage.SAND, (new GeneratorSplatter.Builder()).amountPerChunk(1.0F).generationAttempts(128).replace(emptyMud).with(Blocks.grass.getDefaultState()).create());}
if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");}
if (!settings.generateBopPlants) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");}
if (!settings.generateBopWaterPlants) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("algae"); this.removeGenerator("duckweed"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
if (!settings.generateBopGrasses) {this.removeGenerator("grass");}
}
@Override

View file

@ -87,7 +87,10 @@ public class BiomeGenRainforest extends BOPBiome
// water plants
this.addGenerator("duckweed", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(1.0F).with(BlockBOPLilypad.LilypadType.DUCKWEED).generationAttempts(32).create());
this.addGenerator("mixed_lily", GeneratorStage.LILYPAD, (new GeneratorMixedLily.Builder()).amountPerChunk(1.0F).generationAttempts(96).create());
this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(Blocks.waterlily.getDefaultState()).create());
this.addGenerator("medium_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(BlockBOPLilypad.LilypadType.MEDIUM).create());
this.addGenerator("small_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.SMALL).create());
this.addGenerator("tiny_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.TINY).create());
// gem
this.addGenerator("topaz", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.TOPAZ).create());

View file

@ -3,6 +3,7 @@ package biomesoplenty.common.biome.overworld;
import biomesoplenty.api.biome.BOPBiome;
import biomesoplenty.api.biome.generation.GeneratorStage;
import biomesoplenty.api.biome.generation.GeneratorWeighted;
import biomesoplenty.common.block.BlockBOPLilypad;
import biomesoplenty.common.enums.BOPClimates;
import biomesoplenty.common.enums.BOPFlowers;
import biomesoplenty.common.enums.BOPGems;
@ -22,6 +23,7 @@ import net.minecraft.block.BlockFlower;
import net.minecraft.block.BlockTallGrass;
import net.minecraft.block.BlockFlower.EnumFlowerType;
import net.minecraft.entity.passive.EntityOcelot;
import net.minecraft.init.Blocks;
import net.minecraft.util.BlockPos;
import net.minecraft.world.biome.BiomeGenBase.SpawnListEntry;
@ -69,7 +71,10 @@ public class BiomeGenSacredSprings extends BOPBiome
this.addGenerator("rafflesia", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BOPPlants.RAFFLESIA).create());
// water plants
this.addGenerator("mixed_lily", GeneratorStage.LILYPAD, (new GeneratorMixedLily.Builder()).amountPerChunk(1.0F).generationAttempts(96).create());
this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(Blocks.waterlily.getDefaultState()).create());
this.addGenerator("medium_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(BlockBOPLilypad.LilypadType.MEDIUM).create());
this.addGenerator("small_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.SMALL).create());
this.addGenerator("tiny_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.TINY).create());
// gem
this.addGenerator("topaz", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.TOPAZ).create());

View file

@ -85,6 +85,9 @@ public class BiomeGenXericShrubland extends BOPBiome
{
if (!settings.generateBopGems) {this.removeGenerator("ruby");}
IBlockPosQuery emptySand = BlockQuery.buildAnd().withAirAbove().states(this.topBlock).create();
if (!settings.generateBopSoils) {this.removeGenerator("grass_splatter"); this.addGenerator("grass_splatter_new", GeneratorStage.SAND, (new GeneratorSplatter.Builder()).amountPerChunk(5.0F).generationAttempts(128).replace(emptySand).with(Blocks.grass.getDefaultState()).create());}
if (!settings.generateBopFoliage) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");}
if (!settings.generateBopGrasses) {this.removeGenerator("dune_grass"); this.removeGenerator("desertgrass");}

View file

@ -87,6 +87,8 @@ public class BOPWorldSettings
public boolean generateThorns = true;
public boolean generateQuicksand = true;
public boolean generateLiquidPoison = true;
public boolean generateHotSprings = true;
public boolean generateNetherHives = true;
// Vanilla properties - not configurable (yet) but included for consistency with vanilla ChunkProviderSettings
@ -142,6 +144,8 @@ public class BOPWorldSettings
obj.addProperty("generateThorns", this.generateThorns);
obj.addProperty("generateQuicksand", this.generateQuicksand);
obj.addProperty("generateLiquidPoison", this.generateLiquidPoison);
obj.addProperty("generateHotSprings", this.generateHotSprings);
obj.addProperty("generateNetherHives", this.generateNetherHives);
return serializer.toJson(obj);
}
@ -173,6 +177,8 @@ public class BOPWorldSettings
this.generateThorns = worldConfig.getBool("generateThorns", this.generateThorns);
this.generateQuicksand = worldConfig.getBool("generateQuicksand", this.generateQuicksand);
this.generateLiquidPoison = worldConfig.getBool("generateLiquidPoison", this.generateLiquidPoison);
this.generateHotSprings = worldConfig.getBool("generateHotSprings", this.generateHotSprings);
this.generateNetherHives = worldConfig.getBool("generateNetherHives", this.generateNetherHives);
}
public void setDefault()
@ -199,6 +205,8 @@ public class BOPWorldSettings
this.generateThorns = true;
this.generateQuicksand = true;
this.generateLiquidPoison = true;
this.generateHotSprings = true;
this.generateNetherHives = true;
// Vanilla default values
this.seaLevel = 63;