Readded the Meadow
This commit is contained in:
parent
9ed744df02
commit
ed244a8364
|
@ -60,7 +60,7 @@ public abstract class BOPBiome extends BiomeGenBase implements IBOPDecoration
|
|||
@Override
|
||||
public WorldGenerator getRandomWorldGenForGrass(Random random)
|
||||
{
|
||||
if (getWeightedWorldGenForBOPFlowers() != null && !getWeightedWorldGenForGrass().isEmpty())
|
||||
if (getWeightedWorldGenForGrass() != null && !getWeightedWorldGenForGrass().isEmpty())
|
||||
{
|
||||
return getRandomWeightedWorldGenerator(getWeightedWorldGenForGrass());
|
||||
}
|
||||
|
|
|
@ -1,82 +1,113 @@
|
|||
package biomesoplenty.common.biomes;
|
||||
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import java.util.HashMap;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase.Height;
|
||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||
import net.minecraft.world.gen.feature.WorldGenDoublePlant;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
import biomesoplenty.api.BOPBlockHelper;
|
||||
import biomesoplenty.common.world.features.WorldGenBOPFlora;
|
||||
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
|
||||
import biomesoplenty.common.world.features.trees.WorldGenBOPShrub;
|
||||
import biomesoplenty.common.world.features.trees.WorldGenBOPTaiga2;
|
||||
|
||||
public class BiomeGenMeadow extends BOPBiome
|
||||
{
|
||||
|
||||
public BiomeGenMeadow(int par1)
|
||||
public BiomeGenMeadow(int id)
|
||||
{
|
||||
super(par1);
|
||||
/*
|
||||
theBiomeDecorator = new BiomeDecoratorBOP(this);
|
||||
customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
|
||||
customBiomeDecorator.treesPerChunk = 2;
|
||||
customBiomeDecorator.grassPerChunk = 10;
|
||||
customBiomeDecorator.wheatGrassPerChunk = 5;
|
||||
customBiomeDecorator.tinyFlowersPerChunk = 14;
|
||||
customBiomeDecorator.mushroomsPerChunk = 2;
|
||||
customBiomeDecorator.flowersPerChunk = 10;
|
||||
customBiomeDecorator.carrotsPerChunk = 1;
|
||||
customBiomeDecorator.sandPerChunk = -999;
|
||||
customBiomeDecorator.sandPerChunk2 = -999;
|
||||
customBiomeDecorator.hydrangeasPerChunk = 3;
|
||||
customBiomeDecorator.sunflowersPerChunk = 1;
|
||||
customBiomeDecorator.shrubsPerChunk = 5;
|
||||
customBiomeDecorator.cloverPatchesPerChunk = 15;
|
||||
customBiomeDecorator.generatePumpkins = false;
|
||||
spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 5, 2, 6));
|
||||
*/
|
||||
super(id);
|
||||
|
||||
//TODO: setColor()
|
||||
this.setColor(6533741);
|
||||
this.setTemperatureRainfall(0.7F, 0.7F);
|
||||
|
||||
this.spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 5, 2, 6));
|
||||
|
||||
this.theBiomeDecorator.treesPerChunk = 2;
|
||||
this.theBiomeDecorator.grassPerChunk = 10;
|
||||
this.theBiomeDecorator.sandPerChunk = -999;
|
||||
this.theBiomeDecorator.sandPerChunk2 = -999;
|
||||
this.theBiomeDecorator.mushroomsPerChunk = 2;
|
||||
this.theBiomeDecorator.flowersPerChunk = 10;
|
||||
|
||||
this.bopWorldFeatures.bopFlowersPerChunk = 14;
|
||||
this.bopWorldFeatures.wildCarrotsPerChunk = 1;
|
||||
this.bopWorldFeatures.sunflowersPerChunk = 1;
|
||||
this.bopWorldFeatures.shrubsPerChunk = 5;
|
||||
this.bopWorldFeatures.cloverPatchesPerChunk = 15;
|
||||
this.bopWorldFeatures.generatePumpkins = false;
|
||||
}
|
||||
|
||||
/*
|
||||
@Override
|
||||
public void decorate(World par1World, Random par2Random, int par3, int par4)
|
||||
{
|
||||
super.decorate(par1World, par2Random, par3, par4);
|
||||
int var5 = 12 + par2Random.nextInt(6);
|
||||
@Override
|
||||
//TODO: getRandomWorldGenForTrees()
|
||||
public WorldGenAbstractTree func_150567_a(Random random)
|
||||
{
|
||||
return random.nextInt(5) == 0 ? new WorldGenBOPTaiga2(Blocks.log, Blocks.leaves, 1, 1, false, 6, 4, 0) : new WorldGenBOPShrub(Blocks.log, Blocks.leaves, 0, 1, Blocks.dirt, Blocks.grass);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForBOPFlowers()
|
||||
{
|
||||
HashMap<WorldGenerator, Double> flowerMap = new HashMap();
|
||||
|
||||
flowerMap.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 0), 3D);
|
||||
flowerMap.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 4), 1D);
|
||||
|
||||
return flowerMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
|
||||
{
|
||||
HashMap<WorldGenerator, Double> grassMap = new HashMap();
|
||||
|
||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
|
||||
grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
|
||||
grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
|
||||
|
||||
return grassMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void decorate(World world, Random random, int chunkX, int chunkZ)
|
||||
{
|
||||
super.decorate(world, random, chunkX, chunkZ);
|
||||
int var5 = 12 + random.nextInt(6);
|
||||
|
||||
for (int var6 = 0; var6 < var5; ++var6)
|
||||
{
|
||||
int var7 = par3 + par2Random.nextInt(16);
|
||||
int var8 = par2Random.nextInt(28) + 4;
|
||||
int var9 = par4 + par2Random.nextInt(16);
|
||||
int var10 = par1World.getBlockId(var7, var8, var9);
|
||||
for (int var6 = 0; var6 < var5; ++var6)
|
||||
{
|
||||
int x = chunkX + random.nextInt(16);
|
||||
int y = random.nextInt(28) + 4;
|
||||
int z = chunkZ + random.nextInt(16);
|
||||
|
||||
//TODO: getBlock()
|
||||
Block block = world.func_147439_a(x, y, z);
|
||||
|
||||
Block block = Block.blocksList[var10];
|
||||
if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID))
|
||||
{
|
||||
par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 4, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
|
||||
{
|
||||
//TODO: setBlock()
|
||||
world.func_147465_d(x, y, z, BOPBlockHelper.get("gemOre"), 4, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a WorldGen appropriate for this biome.
|
||||
*/
|
||||
/*
|
||||
@Override
|
||||
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
|
||||
{
|
||||
return par1Random.nextInt(5) == 0 ? new WorldGenTaiga2(false) : new WorldGenShrub(0, 1);
|
||||
}
|
||||
*/
|
||||
@Override
|
||||
//TODO: getBiomeGrassColor()
|
||||
public int func_150558_b(int p_150558_1_, int p_150558_2_, int p_150558_3_)
|
||||
{
|
||||
return 6533741;
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides the basic grass color based on the biome temperature and rainfall
|
||||
*/
|
||||
/*
|
||||
@Override
|
||||
public int getBiomeGrassColor()
|
||||
{
|
||||
return 6533741;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBiomeFoliageColor()
|
||||
{
|
||||
return 6533741;
|
||||
}
|
||||
*/
|
||||
@Override
|
||||
//TODO: getBiomeFoliageColor()
|
||||
public int func_150571_c(int x, int y, int z)
|
||||
{
|
||||
return 6533741;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ import biomesoplenty.common.biomes.BiomeGenLushDesert;
|
|||
import biomesoplenty.common.biomes.BiomeGenLushSwamp;
|
||||
import biomesoplenty.common.biomes.BiomeGenMapleWoods;
|
||||
import biomesoplenty.common.biomes.BiomeGenMarsh;
|
||||
import biomesoplenty.common.biomes.BiomeGenMeadow;
|
||||
import biomesoplenty.common.biomes.BiomeGenMountain;
|
||||
import biomesoplenty.common.biomes.BiomeGenOminousWoods;
|
||||
import biomesoplenty.common.biomes.BiomeGenPasture;
|
||||
|
@ -113,7 +114,7 @@ public class BOPBiomes
|
|||
registerBiome(new BOPBiomeListEntry(new BiomeGenLushSwamp(BOPConfigurationIDs.lushSwampID).setBiomeName("Lush Swamp"), BOPBiomeTemperatureType.WARM));
|
||||
registerBiome(new BOPBiomeListEntry(new BiomeGenMapleWoods(BOPConfigurationIDs.mapleWoodsID).setBiomeName("Maple Woods"), BOPBiomeTemperatureType.COOL));
|
||||
registerBiome(new BOPBiomeListEntry(new BiomeGenMarsh(BOPConfigurationIDs.marshID).setBiomeName("Marsh"), BOPBiomeTemperatureType.WARM));
|
||||
//registerBiome(new BOPBiomeListEntry(new BiomeGenMeadow(BOPConfigurationIDs.meadowID).setBiomeName("Meadow"), BOPBiomeTemperatureType.COOL));
|
||||
registerOnlyBiome(new BOPBiomeListEntry(new BiomeGenMeadow(BOPConfigurationIDs.meadowID).setBiomeName("Meadow"), BOPBiomeTemperatureType.COOL));
|
||||
//registerBiome(new BOPBiomeListEntry(new BiomeGenMoor(BOPConfigurationIDs.moorID).setBiomeName("Moor"), BOPBiomeTemperatureType.COOL));
|
||||
registerBiome(new BOPBiomeListEntry(new BiomeGenMountain(BOPConfigurationIDs.mountainID).setBiomeName("Mountain"), BOPBiomeTemperatureType.WARM));
|
||||
//registerBiome(new BOPBiomeListEntry(new BiomeGenMysticGrove(BOPConfigurationIDs.mysticGroveID).setBiomeName("Mystic Grove"), BOPBiomeTemperatureType.WARM));
|
||||
|
|
|
@ -41,6 +41,7 @@ public class BOPWorldFeatures
|
|||
public int sproutsPerChunk = 0;
|
||||
public int tinyCactiPerChunk = 0;
|
||||
public int oasesPerChunk = 0;
|
||||
public int sunflowersPerChunk = 0;
|
||||
|
||||
public int bopFlowersPerChunk = 0;
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ public class WorldGenBOPTaiga2 extends WorldGenAbstractTree
|
|||
default:
|
||||
i1 = 1 + random.nextInt(2);
|
||||
j1 = l - i1;
|
||||
k1 = 1 + random.nextInt(2);
|
||||
k1 = 2 + random.nextInt(2);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -65,10 +65,8 @@ public class WorldGenFieldAssociation
|
|||
associateField("tinyCactiPerChunk", new WorldGenBOPFlora(BOPBlockHelper.get("plants"), 12));
|
||||
associateField("oasesPerChunk", new WorldGenWaterside(Blocks.grass, 7, Blocks.sand, BOPBlockHelper.get("redRock")));
|
||||
|
||||
WorldGenDoublePlant doubleTallGrass = new WorldGenDoublePlant();
|
||||
//TODO: setMetadata() ?
|
||||
doubleTallGrass.func_150548_a(2);
|
||||
associateField("doubleTallGrassPerChunk", doubleTallGrass);
|
||||
associateField("doubleTallGrassPerChunk", new WorldGenBOPDoubleFlora(Blocks.double_plant, Blocks.double_plant, 2, 8));
|
||||
associateField("sunflowersPerChunk", new WorldGenBOPDoubleFlora(Blocks.double_plant, Blocks.double_plant, 0, 8));
|
||||
}
|
||||
|
||||
public static void associateField(String fieldName, WorldGenerator generator)
|
||||
|
|
Loading…
Reference in New Issue