Fixed Forced Decorators with grass and flowers

This commit is contained in:
Adubbz 2014-03-20 13:46:02 +11:00
parent 20228278dd
commit 3202b992a9
73 changed files with 704 additions and 510 deletions

View file

@ -12,7 +12,7 @@ import biomesoplenty.common.integration.TreecapitatorIntegration;
import biomesoplenty.common.network.PacketPipeline;
import biomesoplenty.common.utils.BOPModInfo;
import biomesoplenty.common.world.WorldTypeBOP;
import biomesoplenty.common.world.decoration.ForcedDecorators;
import biomesoplenty.common.world.decoration.BiomeTweaker;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
@ -53,12 +53,12 @@ public class BiomesOPlenty
BOPFluids.init();
BOPArmor.init();
BOPCrafting.init();
BOPWorld.init();
BOPBiomes.init();
BOPConfigurationBiomeGen.init(BOPConfiguration.biomeGenConfigFile);
BOPConfigurationVillages.init(BOPConfiguration.villagesConfigFile);
BOPConfigurationStrongholds.init(BOPConfiguration.strongholdsConfigFile);
BOPConfigurationWorldFeatures.init(BOPConfiguration.worldFeaturesConfigFile);
ForcedDecorators.init();
BiomeTweaker.init();
BOPEntities.init();
BOPVanillaCompat.init();
@ -82,6 +82,6 @@ public class BiomesOPlenty
{
packetPipeline.postInitialize();
BOPWorld.worldTypeBOP = new WorldTypeBOP();
BOPBiomes.worldTypeBOP = new WorldTypeBOP();
}
}

View file

@ -3,13 +3,9 @@ package biomesoplenty.common.biomes;
import biomesoplenty.common.world.decoration.BOPDecorationManager;
import biomesoplenty.common.world.decoration.BOPWorldFeatures;
import biomesoplenty.common.world.decoration.IBOPBiome;
import biomesoplenty.common.world.features.WorldGenBOPFlora;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenerator;
import java.util.HashMap;
import java.util.Map.Entry;
import java.util.Random;
public abstract class BOPBiome extends BiomeGenBase implements IBOPBiome
@ -20,7 +16,7 @@ public abstract class BOPBiome extends BiomeGenBase implements IBOPBiome
{
super(biomeID);
bopWorldFeatures = BOPDecorationManager.getBiomeFeatures(biomeID);
bopWorldFeatures = BOPDecorationManager.getOrCreateBiomeFeatures(biomeID);
}
@Override
@ -44,54 +40,6 @@ public abstract class BOPBiome extends BiomeGenBase implements IBOPBiome
}
}
@Override
public WorldGenBOPFlora getRandomWorldGenForBOPFlowers(Random random)
{
if (weightedFlowerGen != null && !weightedFlowerGen.isEmpty())
{
return getRandomWeightedWorldGenerator(weightedFlowerGen);
}
else
{
return null;
}
}
@Override
public WorldGenerator getRandomWorldGenForGrass(Random random)
{
if (weightedGrassGen != null && !weightedGrassGen.isEmpty())
{
return getRandomWeightedWorldGenerator(weightedGrassGen);
}
else
{
return super.getRandomWorldGenForGrass(random);
}
}
public static <T extends WorldGenerator> T getRandomWeightedWorldGenerator(HashMap<T, ? extends Number> worldGeneratorMap)
{
double completeWeight = 0D;
for (Number weight : worldGeneratorMap.values())
{
completeWeight += Double.parseDouble(weight.toString());
}
double random = Math.random() * completeWeight;
double countWeight = 0D;
for (Entry<T, ? extends Number> entry : worldGeneratorMap.entrySet())
{
countWeight += Double.parseDouble(entry.getValue().toString());
if (countWeight >= random) return entry.getKey();
}
return null;
}
@Override
public BOPWorldFeatures getBiomeFeatures()
{

View file

@ -54,9 +54,11 @@ public class BiomeGenBayou extends BOPBiome
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 10);
this.bopWorldFeatures.setFeature("generatePumpkins", false);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 15);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
}
@Override

View file

@ -49,10 +49,12 @@ public class BiomeGenBog extends BOPBiome
this.bopWorldFeatures.setFeature("seaweedPerChunk", 15);
this.bopWorldFeatures.setFeature("generatePumpkins", false);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 1D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 5);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 1D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
}
@Override

View file

@ -36,12 +36,14 @@ public class BiomeGenBorealForest extends BOPBiome
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 4);
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 10);
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(4, 5), 10);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 50);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 2D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPDoubleFlora(4, 5), 10);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 2D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
}
@Override

View file

@ -33,11 +33,13 @@ public class BiomeGenBrushland extends BOPBiome
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 2);
this.bopWorldFeatures.setFeature("generateQuicksand", true);
weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 2), 5);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 6);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 2), 5);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
}
@Override

View file

@ -38,7 +38,9 @@ public class BiomeGenCanyon extends BOPBiome
this.bopWorldFeatures.setFeature("generatePumpkins", false);
this.bopWorldFeatures.setFeature("generateCanyon", true);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 1D);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 5);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 1D);
}
@Override

View file

@ -44,13 +44,15 @@ public class BiomeGenChaparral extends BOPBiome
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 5);
this.bopWorldFeatures.setFeature("generatePumpkins", false);
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(4, 5), 8);
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(1, 5), 4);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 20);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPDoubleFlora(4, 5), 8);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPDoubleFlora(1, 5), 4);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
}
@Override

View file

@ -36,14 +36,16 @@ public class BiomeGenCherryBlossomGrove extends BOPBiome
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 15);
this.bopWorldFeatures.setFeature("generatePumpkins", false);
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 6), 12);
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 9), 8);
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 0), 6);
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(1, 5), 4);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 15);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 6), 12);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 9), 8);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 0), 6);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPDoubleFlora(1, 5), 4);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
}
@Override

View file

@ -47,12 +47,14 @@ public class BiomeGenConiferousForest extends BOPBiome
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 8);
this.bopWorldFeatures.setFeature("seaweedPerChunk", 5);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 1D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 0.5D);
weightedGrassGen.put(new WorldGenBOPDoubleFlora(3, 64), 0.5D);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 10);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 1D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPDoubleFlora(3, 64), 0.5D);
}
@Override

View file

@ -40,14 +40,16 @@ public class BiomeGenConiferousForestSnow extends BOPBiome
this.bopWorldFeatures.setFeature("shrubsPerChunk", 4);
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 8);
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 8), 8);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 5);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 1D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 0.25D);
weightedGrassGen.put(new WorldGenBOPDoubleFlora(3, 64), 0.25D);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 8), 8);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 1D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 0.25D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPDoubleFlora(3, 64), 0.25D);
}
@Override

View file

@ -33,10 +33,12 @@ public class BiomeGenDeadForest extends BOPBiome
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 2);
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 20);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 0), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 1);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 0), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
}
@Override

View file

@ -44,11 +44,13 @@ public class BiomeGenDeadSwamp extends BOPBiome
this.bopWorldFeatures.setFeature("koruPerChunk", 1);
this.bopWorldFeatures.setFeature("seaweedPerChunk", 5);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 1D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
weightedGrassGen.put(new WorldGenBOPDoubleFlora(2), 0.25D);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 25);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 1D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPDoubleFlora(2), 0.25D);
}
@Override

View file

@ -38,10 +38,12 @@ public class BiomeGenDeciduousForest extends BOPBiome
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 10);
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 10);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 1D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 10);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 1D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
}
@Override

View file

@ -51,14 +51,16 @@ public class BiomeGenFen extends BOPBiome
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 10);
this.bopWorldFeatures.setFeature("seaweedPerChunk", 15);
weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 2), 6);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 15);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 1D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
weightedGrassGen.put(new WorldGenBOPDoubleFlora(2), 0.25D);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 2), 6);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 1D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPDoubleFlora(2), 0.25D);
}
@Override

View file

@ -8,7 +8,6 @@ import net.minecraft.init.Blocks;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
import net.minecraft.world.gen.feature.WorldGenTallGrass;
import net.minecraft.world.gen.feature.WorldGenerator;
import java.util.Random;
@ -31,10 +30,19 @@ public class BiomeGenFrostForest extends BOPBiome
this.theBiomeDecorator.mushroomsPerChunk = -999;
this.bopWorldFeatures.setFeature("shrubsPerChunk", 1);
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 3);
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 2);
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 4);
this.bopWorldFeatures.setFeature("generatePumpkins", false);
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 3);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 1);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers2"), 7), 8);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 8), 8);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
}
@Override
@ -44,18 +52,6 @@ public class BiomeGenFrostForest extends BOPBiome
return worldGeneratorTrees;
}
@Override
public WorldGenerator getRandomWorldGenForGrass(Random random)
{
return random.nextInt(2) == 0 ? new WorldGenTallGrass(BOPBlockHelper.get("foliage"), 10) : (random.nextInt(4) == 0 ? new WorldGenTallGrass(BOPBlockHelper.get("foliage"), 11) : new WorldGenTallGrass(Blocks.tallgrass, 1));
}
@Override
public WorldGenBOPFlora getRandomWorldGenForBOPFlowers(Random random)
{
return random.nextInt(5) == 0 ? new WorldGenBOPFlora(BOPBlockHelper.get("flowers2"), 7) : new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 8);
}
@Override
public void decorate(World world, Random random, int chunkX, int chunkZ)
{

View file

@ -41,11 +41,13 @@ public class BiomeGenGrassland extends BOPBiome
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 2);
this.bopWorldFeatures.setFeature("generatePumpkins", false);
weightedGrassGen.put(new WorldGenTallGrass(BOPBlockHelper.get("foliage"), 1), 0.25D);
weightedGrassGen.put(new WorldGenTallGrass(BOPBlockHelper.get("foliage"), 2), 0.25D);
weightedGrassGen.put(new WorldGenTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
weightedGrassGen.put(new WorldGenTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 2);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenTallGrass(BOPBlockHelper.get("foliage"), 1), 0.25D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenTallGrass(BOPBlockHelper.get("foliage"), 2), 0.25D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenTallGrass(Blocks.tallgrass, 1), 1D);
}
@Override

View file

@ -40,14 +40,16 @@ public class BiomeGenGrove extends BOPBiome
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 5);
this.bopWorldFeatures.setFeature("generatePumpkins", false);
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 0), 16);
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 9), 6);
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(5, 3), 4);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 8);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 1D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 0), 16);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 9), 6);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPDoubleFlora(5, 3), 4);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 1D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
}
@Override

View file

@ -41,13 +41,15 @@ public class BiomeGenHeathland extends BOPBiome
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 5);
this.bopWorldFeatures.setFeature("generatePumpkins", false);
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 7), 8);
weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 2), 6);
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(1, 5), 4);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 10);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 7), 8);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 2), 6);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPDoubleFlora(1, 5), 4);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
}
@Override

View file

@ -27,10 +27,12 @@ public class BiomeGenHighland extends BOPBiome
this.bopWorldFeatures.setFeature("wildCarrotsPerChunk", 1);
this.bopWorldFeatures.setFeature("rockpilesPerChunk", 3);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.25D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.25D);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
weightedGrassGen.put(new WorldGenBOPDoubleFlora(2), 1D);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 99);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.25D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.25D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPDoubleFlora(2), 1D);
}
@Override

View file

@ -34,7 +34,9 @@ public class BiomeGenJadeCliffs extends BOPBiome
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 4);
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 2);
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(1, 5), 6);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 3);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPDoubleFlora(1, 5), 6);
}
@Override

View file

@ -51,13 +51,15 @@ public class BiomeGenLushDesert extends BOPBiome
this.bopWorldFeatures.setFeature("generateSand", true);
this.bopWorldFeatures.setFeature("generatePumpkins", false);
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(4, 5), 4);
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 7), 8);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 8);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("plants"), 1), 1D);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPDoubleFlora(4, 5), 4);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 7), 8);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("plants"), 1), 1D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
}
@Override

View file

@ -43,13 +43,15 @@ public class BiomeGenLushSwamp extends BOPBiome
this.bopWorldFeatures.setFeature("cloverPatchesPerChunk", 10);
this.bopWorldFeatures.setFeature("seaweedPerChunk", 10);
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 4), 8);
weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 2), 4);
weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 1), 6);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 4);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 4), 8);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 2), 4);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 1), 6);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
}
@Override

View file

@ -32,11 +32,13 @@ public class BiomeGenMapleWoods extends BOPBiome
this.bopWorldFeatures.setFeature("shrubsPerChunk", 2);
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 8);
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 8), 1);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 1);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 8), 1);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
}
@Override

View file

@ -42,10 +42,12 @@ public class BiomeGenMarsh extends BOPBiome
this.bopWorldFeatures.setFeature("seaweedPerChunk", 15);
this.bopWorldFeatures.setFeature("generatePumpkins", false);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
weightedGrassGen.put(new WorldGenBOPDoubleFlora(2), 0.25D);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 50);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPDoubleFlora(2), 0.25D);
}
@Override

View file

@ -40,15 +40,17 @@ public class BiomeGenMeadow extends BOPBiome
this.bopWorldFeatures.setFeature("seaweedPerChunk", 5);
this.bopWorldFeatures.setFeature("generatePumpkins", false);
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 0), 10);
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 4), 8);
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(5, 3), 5);
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(1, 5), 4);
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(0, 3), 2);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 10);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 0), 10);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 4), 8);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPDoubleFlora(5, 3), 5);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPDoubleFlora(1, 5), 4);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPDoubleFlora(0, 3), 2);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
}
@Override

View file

@ -43,13 +43,15 @@ public class BiomeGenMoor extends BOPBiome
this.bopWorldFeatures.setFeature("seaweedPerChunk", 5);
this.bopWorldFeatures.setFeature("generatePumpkins", false);
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 1), 14);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 15);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 1D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 1), 14);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 1D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
}
@Override

View file

@ -50,18 +50,20 @@ public class BiomeGenMysticGrove extends BOPBiome
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 10);
this.bopWorldFeatures.setFeature("seaweedPerChunk", 5);
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 6), 12);
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 3), 10);
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 4), 8);
weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 3), 6);
weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 2), 6);
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(1, 5), 4);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 15);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 1D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 6), 12);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 3), 10);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 4), 8);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 3), 6);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 2), 6);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPDoubleFlora(1, 5), 4);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 1D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
}
@Override

View file

@ -12,7 +12,6 @@ import net.minecraft.entity.passive.EntityBat;
import net.minecraft.init.Blocks;
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
import net.minecraft.world.gen.feature.WorldGenTallGrass;
import net.minecraft.world.gen.feature.WorldGenerator;
import java.util.Random;
@ -48,12 +47,21 @@ public class BiomeGenOminousWoods extends BOPBiome
this.theBiomeDecorator.sandPerChunk = -999;
this.theBiomeDecorator.sandPerChunk2 = -999;
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 1);
this.bopWorldFeatures.setFeature("thornsPerChunk", 9);
this.bopWorldFeatures.setFeature("poisonIvyPerChunk", 3);
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 2);
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 4);
//TODO: FEATURE customBiomeDecorator.poisonWaterPerChunk = 15;
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 1);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 1);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 2), 20);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenTallGrass(Blocks.tallgrass, 0), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
}
@Override
@ -62,18 +70,6 @@ public class BiomeGenOminousWoods extends BOPBiome
{
return random.nextInt(2) == 0 ? new WorldGenBOPTaiga2(BOPBlockHelper.get("logs1"), BOPBlockHelper.get("leaves1"), 2, 3, false, 14, 6, 0) : (random.nextInt(6) == 0 ? new WorldGenDeadTree1(false, Blocks.dirt, Blocks.grass, BOPBlockHelper.get("grass"), BOPBlockHelper.get("driedDirt"), BOPBlockHelper.get("redRock")) : new WorldGenBOPSwampTree(BOPBlockHelper.get("logs1"), BOPBlockHelper.get("leaves1"), 2, 3, 5, 4, BOPBlockHelper.get("treeMoss"), -1));
}
@Override
public WorldGenBOPFlora getRandomWorldGenForBOPFlowers(Random random)
{
return new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 2);
}
@Override
public WorldGenerator getRandomWorldGenForGrass(Random random)
{
return random.nextInt(4) == 0 ? (random.nextInt(2) == 0 ? new WorldGenTallGrass(BOPBlockHelper.get("foliage"), 10) : new WorldGenTallGrass(BOPBlockHelper.get("foliage"), 11)) : (random.nextInt(6) == 0 ? new WorldGenTallGrass(Blocks.tallgrass, 0) : new WorldGenTallGrass(Blocks.tallgrass, 1));
}
@Override
public int getBiomeGrassColor(int x, int y, int z)

View file

@ -39,8 +39,8 @@ public class BiomeGenOriginValley extends BOPBiome
//TODO: FEATURE this.theBiomeDecorator.generateUndergroundLakes = false;
this.bopWorldFeatures.setFeature("generatePumpkins", false);
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers2"), 8), 8);
weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.yellow_flower, 0), 10);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers2"), 8), 8);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.yellow_flower, 0), 10);
}
@Override

View file

@ -36,14 +36,16 @@ public class BiomeGenPrairie extends BOPBiome
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 4);
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 15);
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers2"), 4), 12);
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 9), 6);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 999);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers2"), 4), 12);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 9), 6);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
}
@Override

View file

@ -43,9 +43,11 @@ public class BiomeGenQuagmire extends BOPBiome
this.bopWorldFeatures.setFeature("koruPerChunk", 1);
this.bopWorldFeatures.setFeature("generateQuagmire", true);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 10);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
}
@Override

View file

@ -48,10 +48,10 @@ public class BiomeGenRainforest extends BOPBiome
this.bopWorldFeatures.setFeature("seaweedPerChunk", 15);
this.bopWorldFeatures.setFeature("generatePumpkins", false);
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 6), 12);
weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 1), 6);
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(4, 5), 4);
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(1, 5), 6);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 6), 12);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 1), 6);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPDoubleFlora(4, 5), 4);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPDoubleFlora(1, 5), 6);
}
@Override
@ -60,12 +60,6 @@ public class BiomeGenRainforest extends BOPBiome
{
return random.nextInt(15) == 0 ? this.worldGeneratorTrees : (random.nextInt(5) == 0 ? worldGeneratorBigTree : new WorldGenOriginalTree(Blocks.log, Blocks.leaves, 0, 0, false, 8, 2, false));
}
@Override
public WorldGenBOPFlora getRandomWorldGenForBOPFlowers(Random random)
{
return null;
}
@Override
public WorldGenerator getRandomWorldGenForGrass(Random random)

View file

@ -38,13 +38,15 @@ public class BiomeGenRedwoodForest extends BOPBiome
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 5);
this.bopWorldFeatures.setFeature("generatePumpkins", false);
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(4, 5), 10);
weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 1), 8);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 15);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPDoubleFlora(4, 5), 10);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 1), 8);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
}
@Override

View file

@ -38,9 +38,9 @@ public class BiomeGenSacredSprings extends BOPBiome
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 2);
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 6), 10);
weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 1), 6);
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(5, 5), 5);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 6), 10);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 1), 6);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPDoubleFlora(5, 5), 5);
}
@Override

View file

@ -36,10 +36,12 @@ public class BiomeGenSeasonalForest extends BOPBiome
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 8);
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 15);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 8);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
}
@Override

View file

@ -37,9 +37,11 @@ public class BiomeGenShield extends BOPBiome
this.bopWorldFeatures.setFeature("seaweedPerChunk", 5);
this.bopWorldFeatures.setFeature("generateStoneInGrass2", true);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 12);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
}
@Override

View file

@ -39,7 +39,7 @@ public class BiomeGenShrubland extends BOPBiome
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 3);
this.bopWorldFeatures.setFeature("generatePumpkins", false);
weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 2), 4);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 2), 4);
}
@Override

View file

@ -50,9 +50,11 @@ public class BiomeGenSilkglades extends BOPBiome
this.bopWorldFeatures.setFeature("cobwebNestsPerChunk", 2);
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 15);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 0), 1D);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 2);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 0), 1D);
}
@Override

View file

@ -50,10 +50,12 @@ public class BiomeGenSludgepit extends BOPBiome
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 5);
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 5);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 0), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 30);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 0), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
}
@Override

View file

@ -38,11 +38,13 @@ public class BiomeGenSpruceWoods extends BOPBiome
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 6);
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 3);
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers2"), 5), 15);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 100);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers2"), 5), 15);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
}
@Override

View file

@ -43,13 +43,15 @@ public class BiomeGenTemperateRainforest extends BOPBiome
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 15);
this.bopWorldFeatures.setFeature("seaweedPerChunk", 15);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 1D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 2D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 0.5D);
weightedGrassGen.put(new WorldGenBOPDoubleFlora(3), 0.25D);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 25);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 1D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 2D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPDoubleFlora(3), 0.25D);
}
@Override

View file

@ -33,7 +33,7 @@ public class BiomeGenThicket extends BOPBiome
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 5);
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 10);
weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 2), 4);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 2), 4);
}
@Override

View file

@ -35,10 +35,12 @@ public class BiomeGenTimber extends BOPBiome
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 5);
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 12);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 1D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 8);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 1D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
}

View file

@ -48,13 +48,15 @@ public class BiomeGenTropicalRainforest extends BOPBiome
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 10);
this.bopWorldFeatures.setFeature("seaweedPerChunk", 15);
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 5), 12);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 9);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 0.75D);
weightedGrassGen.put(new WorldGenBOPDoubleFlora(3), 1D);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 5), 12);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 0.75D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPDoubleFlora(3), 1D);
}
@Override

View file

@ -46,17 +46,19 @@ public class BiomeGenTropics extends BOPBiome
this.bopWorldFeatures.setFeature("seaweedPerChunk", 10);
this.bopWorldFeatures.setFeature("generatePumpkins", false);
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 9), 8);
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 5), 10);
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers2"), 0), 15);
weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 1), 7);
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(4, 5), 6);
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(0, 3), 2);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 7);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
weightedGrassGen.put(new WorldGenBOPDoubleFlora(3), 0.25D);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 9), 8);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 5), 10);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers2"), 0), 15);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 1), 7);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPDoubleFlora(4, 5), 6);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPDoubleFlora(0, 3), 2);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPDoubleFlora(3), 0.25D);
}
@Override

View file

@ -40,12 +40,14 @@ public class BiomeGenTundra extends BOPBiome
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 5);
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 5);
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 8), 4);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 8);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 1D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 8), 4);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 1D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
}
@Override

View file

@ -40,7 +40,9 @@ public class BiomeGenWasteland extends BOPBiome
this.bopWorldFeatures.setFeature("wasteland4PerChunk", 1);
this.bopWorldFeatures.setFeature("wastelandRockPilesPerChunk", 2);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("plants"), 0), 1D);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 20);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("plants"), 0), 1D);
}
@Override

View file

@ -61,14 +61,16 @@ public class BiomeGenWetland extends BOPBiome
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 10);
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 5);
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 1), 10);
weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 1), 6);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 10);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
weightedGrassGen.put(new WorldGenBOPDoubleFlora(3), 0.75D);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 1), 10);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 1), 6);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPDoubleFlora(3), 0.75D);
}
@Override

View file

@ -35,11 +35,13 @@ public class BiomeGenWoodland extends BOPBiome
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 10);
this.bopWorldFeatures.setFeature("logsPerChunk", 10);
weightedFlowerGen.put(new WorldGenBOPDoubleFlora(4, 5), 6);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 7);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPDoubleFlora(4, 5), 6);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
}

View file

@ -3,7 +3,7 @@ package biomesoplenty.common.configuration;
import biomesoplenty.api.BOPBiomeHelper;
import biomesoplenty.api.BOPBiomeHelper.BOPBiomeEntry;
import biomesoplenty.api.BOPBiomeHelper.TemperatureType;
import biomesoplenty.common.core.BOPWorld;
import biomesoplenty.common.core.BOPBiomes;
import biomesoplenty.common.world.layer.hell.BiomeLayerHellBiomes;
import cpw.mods.fml.common.FMLLog;
import net.minecraft.world.biome.BiomeGenBase;
@ -65,18 +65,18 @@ public class BOPConfigurationBiomeGen
if (config.get("Overworld Biomes To Generate (There must be at least one from each category)", name + " (" + WordUtils.capitalize(entry.temperatureType.toString().toLowerCase()) + ")", !disabledBiomes.contains(convertedName)).getBoolean(!disabledBiomes.contains(convertedName)))
{
if (BOPWorld.onlyBiome != null ? entry == BOPWorld.onlyBiome : true)
if (BOPBiomes.onlyBiome != null ? entry == BOPBiomes.onlyBiome : true)
{
entry.addToCorrespondingTemperatureTypeList();
}
}
}
if (BOPWorld.onlyBiome != null)
if (BOPBiomes.onlyBiome != null)
{
for (TemperatureType temperatureType : BOPBiomeHelper.TemperatureType.values())
{
BOPBiomeHelper.getCorrespondingTemperatureTypeList(temperatureType).add(BOPWorld.onlyBiome);
BOPBiomeHelper.getCorrespondingTemperatureTypeList(temperatureType).add(BOPBiomes.onlyBiome);
}
}
else

View file

@ -9,14 +9,13 @@ import biomesoplenty.common.configuration.BOPConfigurationMisc;
import biomesoplenty.common.world.WorldTypeBOP;
import biomesoplenty.common.world.decoration.BOPDecorationManager;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.init.Blocks;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.WorldChunkManager;
import net.minecraftforge.common.BiomeDictionary;
import net.minecraftforge.common.BiomeDictionary.Type;
import net.minecraftforge.common.BiomeManager;
public class BOPWorld
public class BOPBiomes
{
public static WorldTypeBOP worldTypeBOP;
@ -30,7 +29,6 @@ public class BOPWorld
registerBiomes();
addBiomesToDictionary();
addSpawnBiomes();
overrideBiomeProperties();
}
private static void registerBiomes()
@ -268,13 +266,6 @@ public class BOPWorld
BiomeDictionary.registerBiomeType(BOPBiomeHelper.get("wetland"), Type.SWAMP, Type.FOREST);
BiomeDictionary.registerBiomeType(BOPBiomeHelper.get("woodland"), Type.FOREST);
}
private static void overrideBiomeProperties()
{
BiomeGenBase.hell.topBlock = Blocks.netherrack;
BiomeGenBase.hell.fillerBlock = Blocks.netherrack;
}
public static void registerOnlyBiome(BOPBiomeEntry biome)
{
onlyBiome = biome;

View file

@ -5,8 +5,8 @@ import biomesoplenty.api.BOPItemHelper;
import biomesoplenty.common.configuration.BOPConfigurationMisc;
import biomesoplenty.common.entities.projectiles.dispenser.DispenserBehaviourDart;
import biomesoplenty.common.entities.projectiles.dispenser.DispenserBehaviourMudball;
import biomesoplenty.common.world.decoration.ForcedDecorators;
import biomesoplenty.common.world.decoration.IBOPBiome;
import biomesoplenty.common.world.decoration.BOPDecorationManager;
import biomesoplenty.common.world.decoration.BOPWorldFeatures;
import biomesoplenty.common.world.features.WorldGenBOPDoubleFlora;
import biomesoplenty.common.world.features.WorldGenBOPFlora;
import net.minecraft.block.BlockDispenser;
@ -97,22 +97,13 @@ public class BOPVanillaCompat
{
if (biome != null)
{
IBOPBiome bopDecoration = null;
BOPWorldFeatures biomeFeatures = BOPDecorationManager.getBiomeFeatures(biome.biomeID);
if (biome instanceof IBOPBiome)
if (biomeFeatures != null)
{
bopDecoration = (IBOPBiome)biome;
}
else if (ForcedDecorators.biomeHasForcedDecorator(biome.biomeID))
{
bopDecoration = ForcedDecorators.getForcedDecorator(biome.biomeID);
}
if (bopDecoration != null)
{
if (bopDecoration.weightedFlowerGen != null && !bopDecoration.weightedFlowerGen.isEmpty())
if (biomeFeatures.weightedFlowerGen != null && !biomeFeatures.weightedFlowerGen.isEmpty())
{
HashMap<WorldGenBOPFlora, Integer> flowerMap = bopDecoration.weightedFlowerGen;
HashMap<WorldGenBOPFlora, Integer> flowerMap = biomeFeatures.weightedFlowerGen;
for (Entry<WorldGenBOPFlora, Integer> entry : flowerMap.entrySet())
{

View file

@ -1,6 +1,6 @@
package biomesoplenty.common.eventhandler.world;
import biomesoplenty.common.world.decoration.ForcedDecorators;
import biomesoplenty.common.world.decoration.BiomeTweaker;
import biomesoplenty.common.world.decoration.IBOPBiome;
import cpw.mods.fml.common.eventhandler.Event.Result;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
@ -36,9 +36,9 @@ public class DecorationModificationEventHandler
{
bopDecoration = (IBOPBiome)biome;
}
else if (ForcedDecorators.biomeHasForcedDecorator(biome.biomeID))
else if (BiomeTweaker.biomeHasForcedDecorator(biome.biomeID))
{
bopDecoration = ForcedDecorators.getForcedDecorator(biome.biomeID);
bopDecoration = BiomeTweaker.getForcedDecorator(biome.biomeID);
}
if (bopDecoration != null)
@ -70,9 +70,9 @@ public class DecorationModificationEventHandler
{
bopDecoration = (IBOPBiome)biome;
}
else if (ForcedDecorators.biomeHasForcedDecorator(biome.biomeID))
else if (BiomeTweaker.biomeHasForcedDecorator(biome.biomeID))
{
bopDecoration = ForcedDecorators.getForcedDecorator(biome.biomeID);
bopDecoration = BiomeTweaker.getForcedDecorator(biome.biomeID);
}
if (bopDecoration != null)

View file

@ -6,9 +6,12 @@ import cpw.mods.fml.common.IWorldGenerator;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraft.world.gen.feature.WorldGenerator;
import net.minecraftforge.event.terraingen.DecorateBiomeEvent;
import net.minecraftforge.event.terraingen.TerrainGen;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
public class BOPDecorationManager implements IWorldGenerator
@ -21,48 +24,82 @@ public class BOPDecorationManager implements IWorldGenerator
chunkX <<= 4;
chunkZ <<= 4;
BiomeGenBase biome = world.getBiomeGenForCoords(chunkX, chunkZ);
BiomeGenBase biome = world.getBiomeGenForCoords(chunkX + 16, chunkZ + 16);
BOPWorldFeatures biomeFeatures = getBiomeFeatures(biome.biomeID);
for (String featureName : biomeFeatures.getFeatureNames())
if (biomeFeatures != null)
{
try
for (String featureName : biomeFeatures.getFeatureNames())
{
if (featureName.equals("bopFlowersPerChunk"))
{
if (!TerrainGen.decorate(world, random, chunkX, chunkZ, DecorateBiomeEvent.Decorate.EventType.FLOWERS)) continue;
}
WorldGenFieldAssociation.WorldFeature worldFeature = WorldGenFieldAssociation.getAssociatedFeature(featureName);
if (worldFeature != null)
try
{
IBOPWorldGenerator worldGenerator = worldFeature.getBOPWorldGenerator();
if (worldGenerator != null)
if (featureName.equals("bopFlowersPerChunk"))
{
worldGenerator.setupGeneration(world, random, biome, featureName, chunkX, chunkZ);
if (!TerrainGen.decorate(world, random, chunkX, chunkZ, DecorateBiomeEvent.Decorate.EventType.FLOWERS)) continue;
}
else if (featureName.equals("bopGrassPerChunk"))
{
if (!TerrainGen.decorate(world, random, chunkX, chunkZ, DecorateBiomeEvent.Decorate.EventType.GRASS)) continue;
}
WorldGenFieldAssociation.WorldFeature worldFeature = WorldGenFieldAssociation.getAssociatedFeature(featureName);
if (worldFeature != null)
{
IBOPWorldGenerator worldGenerator = worldFeature.getBOPWorldGenerator();
if (worldGenerator != null)
{
worldGenerator.setupGeneration(world, random, biome, featureName, chunkX, chunkZ);
}
}
}
}
catch (Exception e)
{
Throwable cause = e.getCause();
catch (Exception e)
{
Throwable cause = e.getCause();
if (e.getMessage() != null && e.getMessage().equals("Already decorating!!") || (cause != null && cause.getMessage() != null && cause.getMessage().equals("Already decorating!!")))
{
}
else
{
e.printStackTrace();
if (e.getMessage() != null && e.getMessage().equals("Already decorating!!") || (cause != null && cause.getMessage() != null && cause.getMessage().equals("Already decorating!!")))
{
}
else
{
e.printStackTrace();
}
}
}
}
}
public static BOPWorldFeatures getBiomeFeatures(int biomeID)
public static <T extends WorldGenerator> T getRandomWeightedWorldGenerator(HashMap<T, ? extends Number> worldGeneratorMap)
{
double completeWeight = 0D;
for (Number weight : worldGeneratorMap.values())
{
completeWeight += Double.parseDouble(weight.toString());
}
double random = Math.random() * completeWeight;
double countWeight = 0D;
for (Map.Entry<T, ? extends Number> entry : worldGeneratorMap.entrySet())
{
countWeight += Double.parseDouble(entry.getValue().toString());
if (countWeight >= random) return entry.getKey();
}
return null;
}
public static BOPWorldFeatures getOrCreateBiomeFeatures(int biomeID)
{
if (biomeFeaturesMap[biomeID] == null) return biomeFeaturesMap[biomeID] = new BOPWorldFeatures();
else return biomeFeaturesMap[biomeID];
}
public static BOPWorldFeatures getBiomeFeatures(int biomeID)
{
return biomeFeaturesMap[biomeID];
}
}

View file

@ -1,12 +1,17 @@
package biomesoplenty.common.world.decoration;
import biomesoplenty.common.world.features.WorldGenBOPFlora;
import biomesoplenty.common.world.generation.WorldGenFieldAssociation;
import net.minecraft.world.gen.feature.WorldGenerator;
import java.util.HashMap;
import java.util.Set;
public class BOPWorldFeatures
{
public HashMap<WorldGenerator, Double> weightedGrassGen = new HashMap<WorldGenerator, Double>();
public HashMap<WorldGenBOPFlora, Integer> weightedFlowerGen = new HashMap<WorldGenBOPFlora, Integer>();
private HashMap<String, Object> featureValueMap = new HashMap<String, Object>();
static
@ -16,71 +21,87 @@ public class BOPWorldFeatures
protected BOPWorldFeatures()
{
setFeature("generatePumpkins", true);
setFeature("generateQuicksand", false);
setFeature("generateCanyon", false);
setFeature("generateStoneInGrass", false);
setFeature("generateStoneInGrass2", false);
setFeature("generateGrass", false);
setFeature("generateSand", false);
setFeature("generateQuagmire", false);
setFeature("generateAsh", false);
setFeature("generateMelons", false);
addFeature("generatePumpkins", true);
addFeature("generateQuicksand", false);
addFeature("generateCanyon", false);
addFeature("generateStoneInGrass", false);
addFeature("generateStoneInGrass2", false);
addFeature("generateGrass", false);
addFeature("generateSand", false);
addFeature("generateQuagmire", false);
addFeature("generateAsh", false);
addFeature("generateMelons", false);
setFeature("waterPoolsPerChunk", 50);
setFeature("lavaPoolsPerChunk", 20);
addFeature("waterPoolsPerChunk", 50);
addFeature("lavaPoolsPerChunk", 20);
setFeature("waterLakesPerChunk", 0);
setFeature("lavaLakesPerChunk", 0);
addFeature("waterLakesPerChunk", 0);
addFeature("lavaLakesPerChunk", 0);
setFeature("mudPerChunk", 0);
setFeature("riverCanePerChunk", 0);
setFeature("shrubsPerChunk", 0);
setFeature("bushesPerChunk", 0);
setFeature("cloverPatchesPerChunk", 0);
setFeature("seaweedPerChunk", 0);
setFeature("leafPilesPerChunk", 0);
setFeature("deadLeafPilesPerChunk", 0);
setFeature("lavenderPerChunk", 0);
setFeature("thornsPerChunk", 0);
setFeature("stalagmitesPerChunk", 3);
setFeature("stalactitesPerChunk", 6);
setFeature("desertSproutsPerChunk", 0);
setFeature("bromeliadsPerChunk", 0);
setFeature("waterReedsPerChunk", 0);
setFeature("wildCarrotsPerChunk", 0);
setFeature("poisonIvyPerChunk", 0);
setFeature("berryBushesPerChunk", 0);
setFeature("portobellosPerChunk", 0);
setFeature("koruPerChunk", 0);
setFeature("toadstoolsPerChunk", 0);
setFeature("blueMilksPerChunk", 0);
setFeature("cattailsPerChunk", 0);
setFeature("highCattailsPerChunk", 0);
setFeature("algaePerChunk", 0);
setFeature("sproutsPerChunk", 0);
setFeature("tinyCactiPerChunk", 0);
setFeature("oasesPerChunk", 0);
setFeature("minersDelightPerChunk", 2);
setFeature("rootsPerChunk", 9);
setFeature("grassSplatterPerChunk", 0);
setFeature("rockpilesPerChunk", 0);
setFeature("logsPerChunk", 0);
setFeature("lavaSpoutsPerChunk", 0);
setFeature("cobwebsPerChunk", 0);
setFeature("cobwebNestsPerChunk", 0);
setFeature("wasteland1PerChunk", 0);
setFeature("wasteland2PerChunk", 0);
setFeature("wasteland3PerChunk", 0);
setFeature("wasteland4PerChunk", 0);
setFeature("wastelandRockPilesPerChunk", 0);
addFeature("mudPerChunk", 0);
addFeature("riverCanePerChunk", 0);
addFeature("shrubsPerChunk", 0);
addFeature("bushesPerChunk", 0);
addFeature("cloverPatchesPerChunk", 0);
addFeature("seaweedPerChunk", 0);
addFeature("leafPilesPerChunk", 0);
addFeature("deadLeafPilesPerChunk", 0);
addFeature("lavenderPerChunk", 0);
addFeature("thornsPerChunk", 0);
addFeature("stalagmitesPerChunk", 3);
addFeature("stalactitesPerChunk", 6);
addFeature("desertSproutsPerChunk", 0);
addFeature("bromeliadsPerChunk", 0);
addFeature("waterReedsPerChunk", 0);
addFeature("wildCarrotsPerChunk", 0);
addFeature("poisonIvyPerChunk", 0);
addFeature("berryBushesPerChunk", 0);
addFeature("portobellosPerChunk", 0);
addFeature("koruPerChunk", 0);
addFeature("toadstoolsPerChunk", 0);
addFeature("blueMilksPerChunk", 0);
addFeature("cattailsPerChunk", 0);
addFeature("highCattailsPerChunk", 0);
addFeature("algaePerChunk", 0);
addFeature("sproutsPerChunk", 0);
addFeature("tinyCactiPerChunk", 0);
addFeature("oasesPerChunk", 0);
addFeature("minersDelightPerChunk", 2);
addFeature("rootsPerChunk", 9);
addFeature("grassSplatterPerChunk", 0);
addFeature("rockpilesPerChunk", 0);
addFeature("logsPerChunk", 0);
addFeature("lavaSpoutsPerChunk", 0);
addFeature("cobwebsPerChunk", 0);
addFeature("cobwebNestsPerChunk", 0);
addFeature("wasteland1PerChunk", 0);
addFeature("wasteland2PerChunk", 0);
addFeature("wasteland3PerChunk", 0);
addFeature("wasteland4PerChunk", 0);
addFeature("wastelandRockPilesPerChunk", 0);
setFeature("bopFlowersPerChunk", 0);
addFeature("bopFlowersPerChunk", 0);
addFeature("bopGrassPerChunk", 0);
}
private <T extends Object> void setFeature(String name, T value, boolean initialize)
{
if (!initialize)
{
if (!featureValueMap.containsKey(name)) throw new NoSuchFeatureException(name);
}
featureValueMap.put(name, value);
}
public <T extends Object> void setFeature(String name, T value)
{
featureValueMap.put(name, value);
this.setFeature(name, value, false);
}
protected <T extends Object> void addFeature(String name, T value)
{
this.setFeature(name, value, true);
}
public Object getFeature(String name)
@ -92,4 +113,12 @@ public class BOPWorldFeatures
{
return featureValueMap.keySet();
}
public class NoSuchFeatureException extends RuntimeException
{
public NoSuchFeatureException(String name)
{
super("Feature " + name + " does not exist!");
}
}
}

View file

@ -1,17 +1,21 @@
package biomesoplenty.common.world.decoration;
import biomesoplenty.common.world.forceddecorators.*;
import cpw.mods.fml.relauncher.ReflectionHelper;
import net.minecraft.init.Blocks;
import net.minecraft.world.biome.BiomeGenBase;
import java.util.HashMap;
import java.util.List;
public class ForcedDecorators
public class BiomeTweaker
{
public static HashMap<Integer, ForcedDecorator> forcedDecoratorMap = new HashMap();
public static void init()
{
addForcedDecorators();
tweakDecorationProperties();
}
private static void addForcedDecorators()
@ -56,6 +60,34 @@ public class ForcedDecorators
addForcedDecorator(BiomeGenBase.coldTaiga.biomeID, TaigaForcedDecorator.class);
addForcedDecorator(BiomeGenBase.coldTaigaHills.biomeID, TaigaForcedDecorator.class);
}
private static void tweakDecorationProperties()
{
BiomeGenBase.hell.topBlock = Blocks.netherrack;
BiomeGenBase.hell.fillerBlock = Blocks.netherrack;
for (int i = 0; i < BiomeGenBase.getBiomeGenArray().length; i++)
{
BiomeGenBase biome = BiomeGenBase.getBiome(i);
if (biome != null)
{
BOPWorldFeatures biomeFeatures = BOPDecorationManager.getBiomeFeatures(i);
if (biomeFeatures != null)
{
List<BiomeGenBase.FlowerEntry> flowers = ReflectionHelper.getPrivateValue(BiomeGenBase.class, biome, "flowers");
flowers.clear();
biome.addDefaultFlowers();
biome.theBiomeDecorator.flowersPerChunk = 0;
biome.theBiomeDecorator.grassPerChunk = 0;
}
}
}
}
public static void addForcedDecorator(int biomeID, Class<? extends ForcedDecorator> decoratorClass)
{

View file

@ -1,24 +1,14 @@
package biomesoplenty.common.world.decoration;
import biomesoplenty.common.world.features.WorldGenBOPFlora;
import java.util.Random;
public class ForcedDecorator implements IBOPBiome
{
protected BOPWorldFeatures bopWorldFeatures;
public ForcedDecorator(int id)
{
bopWorldFeatures = BOPDecorationManager.getBiomeFeatures(id);
bopWorldFeatures = BOPDecorationManager.getOrCreateBiomeFeatures(id);
}
@Override
public WorldGenBOPFlora getRandomWorldGenForBOPFlowers(Random random)
{
return null;
}
@Override
public BOPWorldFeatures getBiomeFeatures()
{

View file

@ -1,17 +1,6 @@
package biomesoplenty.common.world.decoration;
import biomesoplenty.common.world.features.WorldGenBOPFlora;
import net.minecraft.world.gen.feature.WorldGenerator;
import java.util.HashMap;
import java.util.Random;
public interface IBOPBiome
{
public HashMap<WorldGenerator, Double> weightedGrassGen = new HashMap<WorldGenerator, Double>();
public HashMap<WorldGenBOPFlora, Integer> weightedFlowerGen = new HashMap<WorldGenBOPFlora, Integer>();
public WorldGenBOPFlora getRandomWorldGenForBOPFlowers(Random random);
public BOPWorldFeatures getBiomeFeatures();
}

View file

@ -0,0 +1,46 @@
package biomesoplenty.common.world.features.managers;
import biomesoplenty.common.world.decoration.BOPDecorationManager;
import biomesoplenty.common.world.decoration.BOPWorldFeatures;
import biomesoplenty.common.world.features.WorldGenBOPFlora;
import biomesoplenty.common.world.generation.WorldGeneratorBOP;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import java.util.Random;
public class WorldGenBOPFlowerManager extends WorldGeneratorBOP
{
private BOPWorldFeatures biomeFeatures;
@Override
public boolean generate(World world, Random random, int x, int y, int z)
{
if (biomeFeatures != null)
{
if (biomeFeatures.weightedFlowerGen != null && !biomeFeatures.weightedFlowerGen.isEmpty())
{
WorldGenBOPFlora flowerGenerator = BOPDecorationManager.getRandomWeightedWorldGenerator(biomeFeatures.weightedFlowerGen);
return flowerGenerator.generate(world, random, x, y, z);
}
}
return false;
}
@Override
public void setupGeneration(World world, Random random, BiomeGenBase biome, String featureName, int x, int z)
{
this.biomeFeatures = BOPDecorationManager.getBiomeFeatures(biome.biomeID);
for (int i = 0; i < (Integer)biomeFeatures.getFeature(featureName); ++i)
{
int randX = x + random.nextInt(16) + 8;
int randZ = z + random.nextInt(16) + 8;
int randY = random.nextInt(world.getHeightValue(randX, randZ) + 32);
this.generate(world, random, randX, randY, randZ);
}
}
}

View file

@ -0,0 +1,46 @@
package biomesoplenty.common.world.features.managers;
import biomesoplenty.common.world.decoration.BOPDecorationManager;
import biomesoplenty.common.world.decoration.BOPWorldFeatures;
import biomesoplenty.common.world.generation.WorldGeneratorBOP;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenerator;
import java.util.Random;
public class WorldGenBOPGrassManager extends WorldGeneratorBOP
{
private BOPWorldFeatures biomeFeatures;
@Override
public boolean generate(World world, Random random, int x, int y, int z)
{
if (biomeFeatures != null)
{
if (biomeFeatures.weightedGrassGen != null && !biomeFeatures.weightedGrassGen.isEmpty())
{
WorldGenerator grassGenerator = BOPDecorationManager.getRandomWeightedWorldGenerator(biomeFeatures.weightedGrassGen);
return grassGenerator.generate(world, random, x, y, z);
}
}
return false;
}
@Override
public void setupGeneration(World world, Random random, BiomeGenBase biome, String featureName, int x, int z)
{
this.biomeFeatures = BOPDecorationManager.getBiomeFeatures(biome.biomeID);
for (int i = 0; i < (Integer)biomeFeatures.getFeature(featureName); ++i)
{
int randX = x + random.nextInt(16) + 8;
int randZ = z + random.nextInt(16) + 8;
int randY = random.nextInt(world.getHeightValue(randX, randZ) * 2);
this.generate(world, random, randX, randY, randZ);
}
}
}

View file

@ -17,12 +17,14 @@ public class BirchForestForcedDecorator extends ForcedDecorator
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 4);
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 2);
this.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 0), 10);
this.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 1), 15);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 5);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 0.5D);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.25D);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.25D);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 0), 10);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 1), 15);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.25D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.25D);
}
}

View file

@ -12,17 +12,18 @@ public class ExtremeHillsForcedDecorator extends ForcedDecorator
{
super(id);
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 3);
this.bopWorldFeatures.setFeature("shrubsPerChunk", 1);
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 3);
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 1);
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 3);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 5);
this.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 8), 8);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 8), 8);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
}
}

View file

@ -14,7 +14,6 @@ public class ForestForcedDecorator extends ForcedDecorator
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 15);
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 5);
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 5);
this.bopWorldFeatures.setFeature("cloverPatchesPerChunk", 5);
this.bopWorldFeatures.setFeature("riverCanePerChunk", 5);
this.bopWorldFeatures.setFeature("shrubsPerChunk", 2);
@ -24,12 +23,15 @@ public class ForestForcedDecorator extends ForcedDecorator
this.bopWorldFeatures.setFeature("berryBushesPerChunk", 1);
this.bopWorldFeatures.setFeature("toadstoolsPerChunk", 2);
this.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 4), 8);
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 5);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 5);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 0.5D);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 4), 8);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
}
}

View file

@ -11,7 +11,8 @@ public class IcePlainsForcedDecorator extends ForcedDecorator
super(id);
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 1);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 5);
this.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 8), 8);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 8), 8);
}
}

View file

@ -13,17 +13,19 @@ public class JungleForcedDecorator extends ForcedDecorator
super(id);
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 10);
this.bopWorldFeatures.setFeature("generatePumpkins", 10);
this.bopWorldFeatures.setFeature("generatePumpkins", 15);
this.bopWorldFeatures.setFeature("generatePumpkins", 1);
this.bopWorldFeatures.setFeature("seaweedPerChunk", 15);
this.bopWorldFeatures.setFeature("poisonIvyPerChunk", 1);
this.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 5), 12);
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 10);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 5);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 1D);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 0.5D);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 5), 12);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 2), 1D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
}
}

View file

@ -14,7 +14,9 @@ public class MesaForcedDecorator extends ForcedDecorator
this.bopWorldFeatures.setFeature("tinyCactiPerChunk", 10);
this.bopWorldFeatures.setFeature("bromeliadsPerChunk", 10);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("plants"), 1), 1D);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 5);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("plants"), 1), 1D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
}
}

View file

@ -13,14 +13,15 @@ public class PlainsForcedDecorator extends ForcedDecorator
super(id);
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 8);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 5);
this.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 0), 10);
this.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 9), 5);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 0), 10);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 9), 5);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 0.5D);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
}
}

View file

@ -17,11 +17,13 @@ public class RoofedForestForcedDecorator extends ForcedDecorator
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 4);
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 2);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 5);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 0.5D);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.25D);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.25D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.25D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.25D);
}
}

View file

@ -14,15 +14,17 @@ public class SavannaForcedDecorator extends ForcedDecorator
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 10);
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 5);
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 10);
this.bopWorldFeatures.setFeature("bushesPerChunk", 3);
this.bopWorldFeatures.setFeature("waterReedsPerChunk", 5);
weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 7), 8);
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 10);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 20);
weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 7), 8);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
}
}

View file

@ -23,12 +23,14 @@ public class SwampForcedDecorator extends ForcedDecorator
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 2);
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 4);
this.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 1), 15);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 5);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 0.5D);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 1), 15);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
this.bopWorldFeatures.weightedGrassGen.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
}
}

View file

@ -10,10 +10,12 @@ public class TaigaForcedDecorator extends ForcedDecorator
{
super(id);
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 2);
this.bopWorldFeatures.setFeature("leafPilesPerChunk", 2);
this.bopWorldFeatures.setFeature("deadLeafPilesPerChunk", 4);
this.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 8), 8);
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 2);
this.bopWorldFeatures.setFeature("bopGrassPerChunk", 5);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 8), 8);
}
}

View file

@ -2,11 +2,16 @@ package biomesoplenty.common.world.generation;
import biomesoplenty.api.BOPBlockHelper;
import biomesoplenty.common.world.features.*;
import biomesoplenty.common.world.features.managers.WorldGenBOPFlowerManager;
import biomesoplenty.common.world.features.managers.WorldGenBOPGrassManager;
import biomesoplenty.common.world.forcedgenerators.LakesForcedGenerator;
import biomesoplenty.common.world.forcedgenerators.MelonForcedGenerator;
import biomesoplenty.common.world.forcedgenerators.PondForcedGenerator;
import net.minecraft.init.Blocks;
import net.minecraft.world.gen.feature.*;
import net.minecraft.world.gen.feature.WorldGenLakes;
import net.minecraft.world.gen.feature.WorldGenLiquids;
import net.minecraft.world.gen.feature.WorldGenMelon;
import net.minecraft.world.gen.feature.WorldGenerator;
import java.util.HashMap;
@ -72,6 +77,9 @@ public class WorldGenFieldAssociation
associateFeature("wasteland2PerChunk", new WorldGenWasteland2());
associateFeature("wasteland3PerChunk", new WorldGenWasteland3());
associateFeature("wasteland4PerChunk", new WorldGenWasteland4());
associateFeature("bopFlowersPerChunk", new WorldGenBOPFlowerManager());
associateFeature("bopGrassPerChunk", new WorldGenBOPGrassManager());
}
private static void associateFeaturesForced()
{