The Flower Field now actually has flowers in it...

This commit is contained in:
Adubbz 2014-03-22 10:40:49 +11:00
parent 8472ceb3c8
commit 02bcd1fbea

View file

@ -2,13 +2,12 @@ package biomesoplenty.common.biomes.overworld;
import biomesoplenty.api.BOPBlockHelper;
import biomesoplenty.common.biomes.BOPBiome;
import biomesoplenty.common.world.features.WorldGenBOPFlora;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenTallGrass;
import net.minecraft.world.gen.feature.WorldGenerator;
import java.util.Random;
@ -19,17 +18,19 @@ public class BiomeGenFlowerField extends BOPBiome
public BiomeGenFlowerField(int par1)
{
super(par1);
//TODO: setHeight()
this.setHeight(biomeHeight);
//TODO: setColor()
this.setColor(4044093);
this.setTemperatureRainfall(0.6F, 0.7F);
this.theBiomeDecorator.treesPerChunk = -999;
this.theBiomeDecorator.flowersPerChunk = -999;
this.theBiomeDecorator.grassPerChunk = 90;
this.bopWorldFeatures.setFeature("bopFlowersPerChunk", 999);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 7), 10);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 6), 10);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 5), 10);
this.bopWorldFeatures.weightedFlowerGen.put(new WorldGenBOPFlora(Blocks.red_flower, 4), 10);
}
@Override
@ -43,33 +44,23 @@ public class BiomeGenFlowerField extends BOPBiome
int x = chunkX + random.nextInt(16);
int y = random.nextInt(28) + 4;
int z = chunkZ + random.nextInt(16);
//TODO: getBlock()
Block block = world.getBlock(x, y, z);
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
{
//TODO: setBlock()
world.setBlock(x, y, z, BOPBlockHelper.get("gemOre"), 4, 2);
}
}
}
@Override
public WorldGenerator getRandomWorldGenForGrass(Random random)
{
return random.nextInt(7) == 0 ? new WorldGenTallGrass(Blocks.red_flower, 7) : (random.nextInt(5) == 0 ? new WorldGenTallGrass(Blocks.red_flower, 6) : (random.nextInt(3) == 0 ? new WorldGenTallGrass(Blocks.red_flower, 5) : (random.nextInt(2) == 0 ? new WorldGenTallGrass(Blocks.red_flower, 4) : new WorldGenTallGrass(Blocks.tallgrass, 1))));
}
@Override
//TODO: getBiomeGrassColor()
public int getBiomeGrassColor(int x, int y, int z)
{
return 7390273;
}
@SideOnly(Side.CLIENT)
//TODO: getBiomeFoliageColor()
public int getBiomeFoliageColor(int x, int y, int z)
{
return 7390273;