Added customization option for BOP grasses

This commit is contained in:
Forstride 2016-02-01 00:58:13 -05:00
parent 8e2908a9aa
commit 1130e30911
53 changed files with 177 additions and 8 deletions

View file

@ -223,6 +223,11 @@ public class BOPBiome extends BiomeGenBase implements IExtendedBiome
this.generationManager.addGenerator(name, stage, generator);
}
public IGenerator getGenerator(String name)
{
return this.generationManager.getGenerator(name);
}
public void removeGenerator(String name)
{
this.generationManager.removeGenerator(name);

View file

@ -179,7 +179,8 @@ public class GuiBOPConfigureWorld extends GuiScreen implements GuiSlider.FormatH
GENERATE_BERRY_BUSHES (110),
GENERATE_WILD_CARROTS (111),
GENERATE_THORNS (112),
GENERATE_QUICKSAND (113);
GENERATE_QUICKSAND (113),
GENERATE_BOP_GRASSES (114);
private int id;
@ -232,7 +233,8 @@ public class GuiBOPConfigureWorld extends GuiScreen implements GuiSlider.FormatH
new GuiBOPPageList.GuiButtonEntry(GuiEntries.GENERATE_BERRY_BUSHES.getId(), "Generate Berry Bushes", true, this.settings.generateBerryBushes),
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_QUICKSAND.getId(), "Generate Quicksand", true, this.settings.generateQuicksand),
new GuiBOPPageList.GuiButtonEntry(GuiEntries.GENERATE_BOP_GRASSES.getId(), "Generate BOP Grasses", true, this.settings.generateBopGrasses)
};
this.pageManager = new GuiBOPPageManager(createTableForFields(page0Fields, page1Fields, page2Fields));
@ -343,7 +345,10 @@ public class GuiBOPConfigureWorld extends GuiScreen implements GuiSlider.FormatH
this.settings.generateThorns = value;
break;
case GENERATE_QUICKSAND:
this.settings.generateThorns = value;
this.settings.generateQuicksand = value;
break;
case GENERATE_BOP_GRASSES:
this.settings.generateBopGrasses = value;
break;
default:
break;

View file

@ -19,17 +19,16 @@ import net.minecraft.entity.passive.EntityOcelot;
import net.minecraft.init.Blocks;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase.SpawnListEntry;
import net.minecraft.world.chunk.ChunkPrimer;
import biomesoplenty.api.biome.BOPBiome;
import biomesoplenty.api.biome.generation.GeneratorStage;
import biomesoplenty.api.biome.generation.GeneratorWeighted;
import biomesoplenty.api.biome.generation.IGenerator;
import biomesoplenty.api.block.BOPBlocks;
import biomesoplenty.api.block.BlockQueries;
import biomesoplenty.common.block.BlockBOPPlant;
import biomesoplenty.common.block.BlockBOPCoral;
import biomesoplenty.common.block.BlockBOPPlant;
import biomesoplenty.common.enums.BOPClimates;
import biomesoplenty.common.enums.BOPFlowers;
import biomesoplenty.common.enums.BOPGems;
import biomesoplenty.common.enums.BOPPlants;
import biomesoplenty.common.enums.BOPTrees;
@ -119,6 +118,9 @@ public class BiomeGenBambooForest extends BOPBiome
public void applySettings(BOPWorldSettings settings)
{
if (!settings.generateBopGems) {this.removeGenerator("topaz");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -118,6 +118,9 @@ public class BiomeGenBayou extends BOPBiome
public void applySettings(BOPWorldSettings settings)
{
if (!settings.generateBopGems) {this.removeGenerator("malachite");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -126,6 +126,9 @@ public class BiomeGenBog extends BOPBiome
{
if (!settings.generateBopGems) {this.removeGenerator("malachite");}
if (!settings.generatePoisonIvy) {this.removeGenerator("poison_ivy");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -93,6 +93,9 @@ public class BiomeGenBorealForest extends BOPBiome
if (!settings.generateBopGems) {this.removeGenerator("amber");}
if (!settings.generatePoisonIvy) {this.removeGenerator("poison_ivy");}
if (!settings.generateFlax) {this.removeGenerator("flax");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -84,6 +84,9 @@ public class BiomeGenBrushland extends BOPBiome
if (!settings.generateBopGems) {this.removeGenerator("ruby");}
if (!settings.generateThorns) {this.removeGenerator("thorns");}
if (!settings.generateQuicksand) {this.removeGenerator("quicksand");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -85,6 +85,9 @@ public class BiomeGenCanyon extends BOPBiome
public void applySettings(BOPWorldSettings settings)
{
if (!settings.generateBopGems) {this.removeGenerator("emeralds");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -96,6 +96,9 @@ public class BiomeGenChaparral extends BOPBiome
if (!settings.generateBopGems) {this.removeGenerator("peridot");}
if (!settings.generateBerryBushes) {this.removeGenerator("berry_bushes");}
if (!settings.generateWildCarrots) {this.removeGenerator("wild_carrots");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}

View file

@ -100,6 +100,9 @@ public class BiomeGenCherryBlossomGrove extends BOPBiome
{
if (!settings.generateBopGems) {this.removeGenerator("topaz");}
if (!settings.generateFlax) {this.removeGenerator("flax");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -113,6 +113,9 @@ public class BiomeGenConiferousForest extends BOPBiome
if (!settings.generatePoisonIvy) {this.removeGenerator("poison_ivy");}
if (!settings.generateFlax) {this.removeGenerator("flax");}
if (!settings.generateBerryBushes) {this.removeGenerator("berry_bushes");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
}

View file

@ -86,6 +86,9 @@ public class BiomeGenDeadForest extends BOPBiome
{
if (!settings.generateBopGems) {this.removeGenerator("tanzanite");}
if (!settings.generateThorns) {this.removeGenerator("thorns");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -99,6 +99,9 @@ public class BiomeGenDeadSwamp extends BOPBiome
public void applySettings(BOPWorldSettings settings)
{
if (!settings.generateBopGems) {this.removeGenerator("malachite");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -109,6 +109,9 @@ public class BiomeGenDeciduousForest extends BOPBiome
{
if (!settings.generateBopGems) {this.removeGenerator("amber");}
if (!settings.generateFlax) {this.removeGenerator("flax");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -89,6 +89,9 @@ public class BiomeGenEucalyptusForest extends BOPBiome
public void applySettings(BOPWorldSettings settings)
{
if (!settings.generateBopGems) {this.removeGenerator("topaz");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
/*

View file

@ -125,6 +125,9 @@ public class BiomeGenFen extends BOPBiome
public void applySettings(BOPWorldSettings settings)
{
if (!settings.generateBopGems) {this.removeGenerator("malachite");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}

View file

@ -48,7 +48,7 @@ public class BiomeGenFlowerField extends BOPBiome
flowerGenerator.add("red_tulip", 10, (new GeneratorFlora.Builder().with(EnumFlowerType.RED_TULIP).create()));
// grasses
GeneratorWeighted grassGenerator = new GeneratorWeighted(0.2F);
GeneratorWeighted grassGenerator = new GeneratorWeighted(0.5F);
this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator);
grassGenerator.add("shortgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.SHORTGRASS).create());
grassGenerator.add("mediumgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.MEDIUMGRASS).create());
@ -65,6 +65,9 @@ public class BiomeGenFlowerField extends BOPBiome
public void applySettings(BOPWorldSettings settings)
{
if (!settings.generateBopGems) {this.removeGenerator("peridot");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -80,6 +80,9 @@ public class BiomeGenFrostForest extends BOPBiome
public void applySettings(BOPWorldSettings settings)
{
if (!settings.generateBopGems) {this.removeGenerator("tanzanite");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -127,6 +127,9 @@ public class BiomeGenFungiForest extends BOPBiome
public void applySettings(BOPWorldSettings settings)
{
if (!settings.generateBopGems) {this.removeGenerator("amber");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -101,6 +101,9 @@ public class BiomeGenGarden extends BOPBiome
public void applySettings(BOPWorldSettings settings)
{
if (!settings.generateBopGems) {this.removeGenerator("peridot");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -86,6 +86,9 @@ public class BiomeGenGrassland extends BOPBiome {
{
if (!settings.generateBopGems) {this.removeGenerator("peridot");}
if (!settings.generateFlax) {this.removeGenerator("flax");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -92,6 +92,9 @@ public class BiomeGenGrove extends BOPBiome
{
if (!settings.generateBopGems) {this.removeGenerator("amber");}
if (!settings.generateBerryBushes) {this.removeGenerator("berry_bushes");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -99,6 +99,9 @@ public class BiomeGenHeathland extends BOPBiome
{
if (!settings.generateBopGems) {this.removeGenerator("peridot");}
if (!settings.generateBerryBushes) {this.removeGenerator("berry_bushes");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}

View file

@ -66,6 +66,9 @@ public class BiomeGenHighland extends BOPBiome
{
if (!settings.generateBopGems) {this.removeGenerator("emerald");}
if (!settings.generateWildCarrots) {this.removeGenerator("wild_carrots");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
}

View file

@ -116,6 +116,9 @@ public class BiomeGenLandOfLakes extends BOPBiome
public void applySettings(BOPWorldSettings settings)
{
if (!settings.generateBopGems) {this.removeGenerator("malachite");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -69,6 +69,9 @@ public class BiomeGenLavenderFields extends BOPBiome
public void applySettings(BOPWorldSettings settings)
{
if (!settings.generateBopGems) {this.removeGenerator("peridot");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -109,5 +109,8 @@ public class BiomeGenLushDesert extends BOPBiome
public void applySettings(BOPWorldSettings settings)
{
if (!settings.generateBopGems) {this.removeGenerator("ruby");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
}

View file

@ -135,6 +135,9 @@ public class BiomeGenLushSwamp extends BOPBiome
public void applySettings(BOPWorldSettings settings)
{
if (!settings.generateBopGems) {this.removeGenerator("malachite");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
}

View file

@ -87,5 +87,8 @@ public class BiomeGenMapleWoods extends BOPBiome
{
if (!settings.generateBopGems) {this.removeGenerator("tanzanite");}
if (!settings.generatePoisonIvy) {this.removeGenerator("poison_ivy");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
}

View file

@ -97,6 +97,9 @@ public class BiomeGenMarsh extends BOPBiome
public void applySettings(BOPWorldSettings settings)
{
if (!settings.generateBopGems) {this.removeGenerator("malachite");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
}

View file

@ -100,6 +100,9 @@ public class BiomeGenMeadow extends BOPBiome
if (!settings.generateBopGems) {this.removeGenerator("peridot");}
if (!settings.generateFlax) {this.removeGenerator("flax");}
if (!settings.generateWildCarrots) {this.removeGenerator("wild_carrots");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -91,6 +91,9 @@ public class BiomeGenMoor extends BOPBiome
{
if (!settings.generateBopGems) {this.removeGenerator("malachite");}
if (!settings.generateFlax) {this.removeGenerator("flax");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -173,6 +173,9 @@ public class BiomeGenMountain extends BOPBiome
if (!settings.generateBopGems) {this.removeGenerator("emeralds");}
if (!settings.generateFlax) {this.removeGenerator("flax");}
if (!settings.generateBerryBushes) {this.removeGenerator("berry_bushes");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}

View file

@ -127,6 +127,9 @@ public class BiomeGenMysticGrove extends BOPBiome
public void applySettings(BOPWorldSettings settings)
{
if (!settings.generateBopGems) {this.removeGenerator("topaz");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -114,6 +114,9 @@ public class BiomeGenOminousWoods extends BOPBiome
if (!settings.generateBopGems) {this.removeGenerator("malachite");}
if (!settings.generatePoisonIvy) {this.removeGenerator("poison_ivy");}
if (!settings.generateThorns) {this.removeGenerator("thorns");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -77,6 +77,9 @@ public class BiomeGenOutback extends BOPBiome
public void applySettings(BOPWorldSettings settings)
{
if (!settings.generateBopGems) {this.removeGenerator("ruby");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
}

View file

@ -91,6 +91,9 @@ public class BiomeGenPrairie extends BOPBiome
if (!settings.generateBopGems) {this.removeGenerator("tanzanite");}
if (!settings.generateFlax) {this.removeGenerator("flax");}
if (!settings.generateBerryBushes) {this.removeGenerator("berry_bushes");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -91,6 +91,9 @@ public class BiomeGenQuagmire extends BOPBiome
public void applySettings(BOPWorldSettings settings)
{
if (!settings.generateBopGems) {this.removeGenerator("malachite");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -98,6 +98,9 @@ public class BiomeGenRainforest extends BOPBiome
public void applySettings(BOPWorldSettings settings)
{
if (!settings.generateBopGems) {this.removeGenerator("topaz");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -109,6 +109,9 @@ public class BiomeGenRedwoodForest extends BOPBiome
public void applySettings(BOPWorldSettings settings)
{
if (!settings.generateBopGems) {this.removeGenerator("amber");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -79,6 +79,9 @@ public class BiomeGenSacredSprings extends BOPBiome
public void applySettings(BOPWorldSettings settings)
{
if (!settings.generateBopGems) {this.removeGenerator("topaz");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -100,6 +100,9 @@ public class BiomeGenSeasonalForest extends BOPBiome
if (!settings.generateBopGems) {this.removeGenerator("amber");}
if (!settings.generatePoisonIvy) {this.removeGenerator("poison_ivy");}
if (!settings.generateFlax) {this.removeGenerator("flax");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -128,6 +128,9 @@ public class BiomeGenShield extends BOPBiome
public void applySettings(BOPWorldSettings settings)
{
if (!settings.generateBopGems) {this.removeGenerator("amber");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -85,5 +85,8 @@ public class BiomeGenShrubland extends BOPBiome
{
if (!settings.generateBopGems) {this.removeGenerator("peridot");}
if (!settings.generateFlax) {this.removeGenerator("flax");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
}

View file

@ -93,6 +93,9 @@ public class BiomeGenSnowyConiferousForest extends BOPBiome
public void applySettings(BOPWorldSettings settings)
{
if (!settings.generateBopGems) {this.removeGenerator("tanzanite");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
}

View file

@ -8,11 +8,13 @@
package biomesoplenty.common.biome.overworld;
import net.minecraft.block.BlockTallGrass;
import net.minecraft.entity.passive.EntityHorse;
import net.minecraft.init.Blocks;
import net.minecraft.util.BlockPos;
import biomesoplenty.api.biome.BOPBiome;
import biomesoplenty.api.biome.generation.GeneratorStage;
import biomesoplenty.api.biome.generation.GeneratorWeighted;
import biomesoplenty.api.block.BOPBlocks;
import biomesoplenty.common.block.BlockBOPDirt;
import biomesoplenty.common.block.BlockBOPGrass;
@ -53,7 +55,11 @@ public class BiomeGenSteppe extends BOPBiome
this.addGenerator("dead_bushes", GeneratorStage.DEAD_BUSH,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(Blocks.deadbush.getDefaultState()).generationAttempts(4).create());
// grasses
this.addGenerator("shrubs", GeneratorStage.GRASS,(new GeneratorGrass.Builder()).amountPerChunk(15).with(BlockBOPPlant.paging.getVariantState(BOPPlants.SHORTGRASS)).create());
GeneratorWeighted grassGenerator = new GeneratorWeighted(7.0F);
this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator);
grassGenerator.add("shortgrass", 5, (new GeneratorGrass.Builder()).with(BOPPlants.SHORTGRASS).create());
grassGenerator.add("mediumgrass", 3, (new GeneratorGrass.Builder()).with(BOPPlants.MEDIUMGRASS).create());
grassGenerator.add("tallgrass", 1, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.GRASS).create());
// gem
this.addGenerator("ruby", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.RUBY).create());
@ -63,6 +69,9 @@ public class BiomeGenSteppe extends BOPBiome
public void applySettings(BOPWorldSettings settings)
{
if (!settings.generateBopGems) {this.removeGenerator("ruby");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -121,6 +121,9 @@ public class BiomeGenTemperateRainforest extends BOPBiome
if (!settings.generatePoisonIvy) {this.removeGenerator("poison_ivy");}
if (!settings.generateFlax) {this.removeGenerator("flax");}
if (!settings.generateWildCarrots) {this.removeGenerator("wild_carrots");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -117,6 +117,9 @@ public class BiomeGenTropicalRainforest extends BOPBiome
if (!settings.generateBopGems) {this.removeGenerator("topaz");}
if (!settings.generatePoisonIvy) {this.removeGenerator("poison_ivy");}
if (!settings.generateQuicksand) {this.removeGenerator("quicksand");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -87,6 +87,9 @@ public class BiomeGenTundra extends BOPBiome
public void applySettings(BOPWorldSettings settings)
{
if (!settings.generateBopGems) {this.removeGenerator("tanzanite");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -132,6 +132,9 @@ public class BiomeGenWetland extends BOPBiome
{
if (!settings.generateBopGems) {this.removeGenerator("malachite");}
if (!settings.generateBerryBushes) {this.removeGenerator("berry_bushes");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -116,6 +116,9 @@ public class BiomeGenWoodland extends BOPBiome
if (!settings.generateBopGems) {this.removeGenerator("amber");}
if (!settings.generatePoisonIvy) {this.removeGenerator("poison_ivy");}
if (!settings.generateFlax) {this.removeGenerator("flax");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -84,6 +84,9 @@ public class BiomeGenXericShrubland extends BOPBiome
public void applySettings(BOPWorldSettings settings)
{
if (!settings.generateBopGems) {this.removeGenerator("ruby");}
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
if (!settings.generateBopGrasses) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
}
@Override

View file

@ -79,6 +79,7 @@ public class BOPWorldSettings
public boolean generateWildCarrots = true;
public boolean generateThorns = true;
public boolean generateQuicksand = true;
public boolean generateBopGrasses = true;
// Vanilla properties - not configurable (yet) but included for consistency with vanilla ChunkProviderSettings
@ -126,6 +127,7 @@ public class BOPWorldSettings
obj.addProperty("generateWildCarrots", this.generateWildCarrots);
obj.addProperty("generateThorns", this.generateThorns);
obj.addProperty("generateQuicksand", this.generateQuicksand);
obj.addProperty("generateBopGrasses", this.generateBopGrasses);
return serializer.toJson(obj);
}
@ -149,6 +151,7 @@ public class BOPWorldSettings
this.generateWildCarrots = worldConfig.getBool("generateWildCarrots", this.generateWildCarrots);
this.generateThorns = worldConfig.getBool("generateThorns", this.generateThorns);
this.generateQuicksand = worldConfig.getBool("generateQuicksand", this.generateQuicksand);
this.generateBopGrasses = worldConfig.getBool("generateBopGrasses", this.generateBopGrasses);
}
public void setDefault()
@ -167,6 +170,7 @@ public class BOPWorldSettings
this.generateWildCarrots = true;
this.generateThorns = true;
this.generateQuicksand = true;
this.generateBopGrasses = true;
// Vanilla default values
this.seaLevel = 63;