Readded the thicket and dunes, hopefully fixed some placement issues too

This commit is contained in:
Adubbz 2014-01-04 12:46:29 +11:00
parent c392723576
commit 78c414ab7c
13 changed files with 208 additions and 115 deletions

View File

@ -1,5 +1,5 @@
minecraft_version=1.7.2
forge_version=10.12.0.985
forge_version=10.12.0.986
mod_version=2.0.0
worldcore_version=1.1.0.17
fmp_version=1.0.0.182

View File

@ -1,50 +1,62 @@
package biomesoplenty.common.biomes;
import net.minecraft.world.biome.BiomeGenBase;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenerator;
import biomesoplenty.api.BOPBlockHelper;
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
public class BiomeGenDunes extends BOPBiome
{
public BiomeGenDunes(int par1)
public BiomeGenDunes(int id)
{
super(par1);
/*
super(id);
spawnableCreatureList.clear();
topBlock = (byte)Block.sand.blockID;
fillerBlock = (byte)Block.sand.blockID;
theBiomeDecorator = new BiomeDecoratorBOP(this);
customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
customBiomeDecorator.treesPerChunk = -999;
customBiomeDecorator.deadBushPerChunk = 5;
customBiomeDecorator.duneGrassPerChunk = 75;
customBiomeDecorator.desertSproutsPerChunk = 25;
customBiomeDecorator.aloePerChunk = 5;
customBiomeDecorator.reedsPerChunk = -999;
customBiomeDecorator.waterReedsPerChunk = 4;
customBiomeDecorator.generateLakes = false;
*/
topBlock = Blocks.sand;
fillerBlock = Blocks.sand;
this.theBiomeDecorator.treesPerChunk = -999;
this.theBiomeDecorator.deadBushPerChunk = 5;
this.theBiomeDecorator.reedsPerChunk = -999;
this.theBiomeDecorator.grassPerChunk = 75;
this.theBiomeDecorator.generateLakes = false;
this.bopWorldFeatures.perChunk.desertSproutsPerChunk = 25;
this.bopWorldFeatures.perChunk.bromeliadsPerChunk = 5;
this.bopWorldFeatures.perChunk.waterReedsPerChunk = 4;
}
/*
@Override
public void decorate(World par1World, Random par2Random, int par3, int par4)
public WorldGenerator getRandomWorldGenForGrass(Random random)
{
super.decorate(par1World, par2Random, par3, par4);
int var5 = 12 + par2Random.nextInt(6);
return new WorldGenBOPTallGrass(BOPBlockHelper.get("plants"), 1);
}
@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);
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))
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
{
par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 2, 2);
//TODO: setBlock()
world.func_147465_d(x, y, z, BOPBlockHelper.get("gemOre"), 2, 2);
}
}
}
*/
}

View File

@ -8,6 +8,7 @@ public class BiomeGenOriginValley extends BOPBiome
public BiomeGenOriginValley(int par1)
{
super(par1);
/*
theBiomeDecorator = new BiomeDecoratorBOP(this);
customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
@ -37,31 +38,18 @@ public class BiomeGenOriginValley extends BOPBiome
}
*/
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
/*
@Override
/*@Override
public int getBiomeGrassColor()
{
return 10682207;
}
*/
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
/*
@Override
public int getBiomeFoliageColor()
{
return 3866368;
}
*/
}*/
/**
* takes temperature, returns color
*/
/*
@Override
public int getSkyColorByTemp(float par1)

View File

@ -17,14 +17,14 @@ import cpw.mods.fml.relauncher.SideOnly;
public class BiomeGenSacredSprings extends BOPBiome
{
private static final Height sacredSpringsHeight = new Height(0.4F, 1.2F);
private static final Height biomeHeight = new Height(0.4F, 1.2F);
public BiomeGenSacredSprings(int id)
{
super(id);
//TODO: setHeight()
this.func_150570_a(sacredSpringsHeight);
this.func_150570_a(biomeHeight);
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityJungleSpider.class, 12, 6, 6));

View File

@ -1,32 +1,46 @@
package biomesoplenty.common.biomes;
import net.minecraft.world.biome.BiomeGenBase;
import java.util.Random;
import net.minecraft.init.Blocks;
import net.minecraft.world.biome.BiomeGenBase.Height;
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
import net.minecraft.world.gen.feature.WorldGenShrub;
import net.minecraft.world.gen.feature.WorldGenTallGrass;
import net.minecraft.world.gen.feature.WorldGenerator;
import biomesoplenty.api.BOPBlockHelper;
public class BiomeGenThicket extends BOPBiome
{
public BiomeGenThicket(int par1)
private static final Height biomeHeight = new Height(0.2F, 0.2F);
public BiomeGenThicket(int id)
{
super(par1);
/*
theBiomeDecorator = new BiomeDecoratorBOP(this);
customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
customBiomeDecorator.treesPerChunk = 17;
customBiomeDecorator.grassPerChunk = 1;
customBiomeDecorator.wheatGrassPerChunk = 1;
customBiomeDecorator.thornsPerChunk = 25;
customBiomeDecorator.shrubsPerChunk = 15;
*/
super(id);
//TODO: setHeight()
this.func_150570_a(biomeHeight);
//TODO: setColor()
this.setColor(7248193);
this.setTemperatureRainfall(0.6F, 0.2F);
this.theBiomeDecorator.treesPerChunk = 17;
this.theBiomeDecorator.grassPerChunk = 1;
this.bopWorldFeatures.perChunk.thornsPerChunk = 25;
this.bopWorldFeatures.perChunk.shrubsPerChunk = 15;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
/*
@Override
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
@Override
//TODO: getRandomWorldGenForTrees()
public WorldGenAbstractTree func_150567_a(Random random)
{
return par1Random.nextInt(5) == 0 ? worldGeneratorTrees : new WorldGenShrub(0, 0);
return random.nextInt(5) == 0 ? worldGeneratorTrees : new WorldGenShrub(0, 0);
}
@Override
public WorldGenerator getRandomWorldGenForGrass(Random random)
{
return random.nextInt(4) == 0 ? new WorldGenTallGrass(Blocks.tallgrass, 1) : new WorldGenTallGrass(BOPBlockHelper.get("foliage"), 10);
}
*/
}

View File

@ -225,7 +225,7 @@ public class BlockBOPFlower extends BOPBlockWorldDecor
case 11: // Rainbow Flower
return block == BOPBlockHelper.get("holyGrass") || block == BOPBlockHelper.get("holyDirt") || block == Blocks.grass || block == Blocks.dirt;
case 12: // Aloe
case 12: // Bromeliad
return block == BOPBlockHelper.get("hardDirt") || block == BOPBlockHelper.get("redRock") || block == Blocks.sand;
case 14: // Sunflower Top
@ -271,10 +271,8 @@ public class BlockBOPFlower extends BOPBlockWorldDecor
//TODO damageDropped()
public int func_149692_a(int meta)
{
if (meta == 14)
return 13 & 15;
else
return meta & 15;
if (meta == 14) return 13;
else return meta;
}
@Override

View File

@ -32,9 +32,6 @@ public abstract class BOPBlockWorldDecor extends BlockBush
//TODO: getBlock()
Block block = world.func_147439_a(x, y, z);
//TODO: updateTick()
super.func_149695_a(world, x, y, z, block);
this.dropIfCantStay(world, x, y, z, new ItemStack(block, 1, world.getBlockMetadata(x, y, z)));
}

View File

@ -8,9 +8,11 @@ import biomesoplenty.common.biomes.BiomeGenAlps;
import biomesoplenty.common.biomes.BiomeGenArctic;
import biomesoplenty.common.biomes.BiomeGenBambooForest;
import biomesoplenty.common.biomes.BiomeGenCrag;
import biomesoplenty.common.biomes.BiomeGenDunes;
import biomesoplenty.common.biomes.BiomeGenFlowerField;
import biomesoplenty.common.biomes.BiomeGenLavenderFields;
import biomesoplenty.common.biomes.BiomeGenSacredSprings;
import biomesoplenty.common.biomes.BiomeGenThicket;
import biomesoplenty.common.configuration.BOPConfigurationIDs;
import biomesoplenty.common.world.WorldTypeBOP;
@ -67,17 +69,17 @@ public class BOPBiomes
registerBiome(new BOPBiomeListEntry(new BiomeGenCrag(BOPConfigurationIDs.cragID).setBiomeName("Crag"), BOPBiomeTemperatureType.HOT));
/*registerBiome(new BOPBiomeListEntry(new BiomeGenDeadForest(BOPConfigurationIDs.deadForestID).setBiomeName("Dead Forest"), BOPBiomeTemperatureType.COOL));
registerBiome(new BOPBiomeListEntry(new BiomeGenDeadSwamp(BOPConfigurationIDs.deadSwampID).setBiomeName("Dead Swamp"), BOPBiomeTemperatureType.WARM));
registerBiome(new BOPBiomeListEntry(new BiomeGenDeciduousForest(BOPConfigurationIDs.deciduousForestID).setBiomeName("Deciduous Forest"), BOPBiomeTemperatureType.WARM));
registerBiome(new BOPBiomeListEntry(new BiomeGenDunes(BOPConfigurationIDs.dunesID).setBiomeName("Dunes"), BOPBiomeTemperatureType.HOT));
registerBiome(new BOPBiomeListEntry(new BiomeGenFen(BOPConfigurationIDs.fenID).setBiomeName("Fen"), BOPBiomeTemperatureType.WARM));*/;
registerBiome(new BOPBiomeListEntry(new BiomeGenDeciduousForest(BOPConfigurationIDs.deciduousForestID).setBiomeName("Deciduous Forest"), BOPBiomeTemperatureType.WARM));*/
registerOnlyBiome(new BOPBiomeListEntry(new BiomeGenDunes(BOPConfigurationIDs.dunesID).setBiomeName("Dunes"), BOPBiomeTemperatureType.HOT));
/*registerBiome(new BOPBiomeListEntry(new BiomeGenFen(BOPConfigurationIDs.fenID).setBiomeName("Fen"), BOPBiomeTemperatureType.WARM));*/;
registerBiome(new BOPBiomeListEntry(new BiomeGenFlowerField(BOPConfigurationIDs.flowerFieldID).setBiomeName("Flower Field"), BOPBiomeTemperatureType.WARM));
/*registerBiome(new BOPBiomeListEntry(new BiomeGenFrostForest(BOPConfigurationIDs.frostForestID).setBiomeName("Frost Forest"), BOPBiomeTemperatureType.ICY));
registerBiome(new BOPBiomeListEntry(new BiomeGenGrassland(BOPConfigurationIDs.grasslandID).setBiomeName("Grassland"), BOPBiomeTemperatureType.WARM));
registerBiome(new BOPBiomeListEntry(new BiomeGenGrove(BOPConfigurationIDs.groveID).setBiomeName("Grove"), BOPBiomeTemperatureType.WARM));
registerBiome(new BOPBiomeListEntry(new BiomeGenHeathland(BOPConfigurationIDs.heathlandID).setBiomeName("Heathland"), BOPBiomeTemperatureType.WARM));
registerBiome(new BOPBiomeListEntry(new BiomeGenGrassland(BOPConfigurationIDs.grasslandID).setBiomeName("Grassland"), BOPBiomeTemperatureType.WARM));*/
//registerBiome(new BOPBiomeListEntry(new BiomeGenGrove(BOPConfigurationIDs.groveID).setBiomeName("Grove"), BOPBiomeTemperatureType.WARM));
/*registerBiome(new BOPBiomeListEntry(new BiomeGenHeathland(BOPConfigurationIDs.heathlandID).setBiomeName("Heathland"), BOPBiomeTemperatureType.WARM));
registerBiome(new BOPBiomeListEntry(new BiomeGenHighland(BOPConfigurationIDs.highlandID).setBiomeName("Highland"), BOPBiomeTemperatureType.WARM));
registerBiome(new BOPBiomeListEntry(new BiomeGenJadeCliffs(BOPConfigurationIDs.jadeCliffsID).setBiomeName("Jade Cliffs"), BOPBiomeTemperatureType.WARM));*/
registerOnlyBiome(new BOPBiomeListEntry(new BiomeGenLavenderFields(BOPConfigurationIDs.lavenderFieldsID).setBiomeName("Lavender Fields"), BOPBiomeTemperatureType.WARM));
registerBiome(new BOPBiomeListEntry(new BiomeGenLavenderFields(BOPConfigurationIDs.lavenderFieldsID).setBiomeName("Lavender Fields"), BOPBiomeTemperatureType.WARM));
/*registerBiome(new BOPBiomeListEntry(new BiomeGenLushDesert(BOPConfigurationIDs.lushDesertID).setBiomeName("Lush Desert"), BOPBiomeTemperatureType.HOT));
registerBiome(new BOPBiomeListEntry(new BiomeGenLushSwamp(BOPConfigurationIDs.lushSwampID).setBiomeName("Lush Swamp"), BOPBiomeTemperatureType.WARM));
registerBiome(new BOPBiomeListEntry(new BiomeGenMapleWoods(BOPConfigurationIDs.mapleWoodsID).setBiomeName("Maple Woods"), BOPBiomeTemperatureType.COOL));
@ -86,9 +88,9 @@ public class BOPBiomes
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));
registerBiome(new BOPBiomeListEntry(new BiomeGenOminousWoods(BOPConfigurationIDs.ominousWoodsID).setBiomeName("Ominous Woods"), BOPBiomeTemperatureType.COOL));
registerBiome(new BOPBiomeListEntry(new BiomeGenOriginValley(BOPConfigurationIDs.originValleyID).setBiomeName("Origin Valley"), BOPBiomeTemperatureType.WARM));
registerBiome(new BOPBiomeListEntry(new BiomeGenOutback(BOPConfigurationIDs.outbackID).setBiomeName("Outback"), BOPBiomeTemperatureType.HOT));
registerBiome(new BOPBiomeListEntry(new BiomeGenOminousWoods(BOPConfigurationIDs.ominousWoodsID).setBiomeName("Ominous Woods"), BOPBiomeTemperatureType.COOL));*/
//registerBiome(new BOPBiomeListEntry(new BiomeGenOriginValley(BOPConfigurationIDs.originValleyID).setBiomeName("Origin Valley"), BOPBiomeTemperatureType.WARM));
/*registerBiome(new BOPBiomeListEntry(new BiomeGenOutback(BOPConfigurationIDs.outbackID).setBiomeName("Outback"), BOPBiomeTemperatureType.HOT));
registerBiome(new BOPBiomeListEntry(new BiomeGenPasture(BOPConfigurationIDs.pastureID).setBiomeName("Pasture"), BOPBiomeTemperatureType.WARM));
registerBiome(new BOPBiomeListEntry(new BiomeGenPrairie(BOPConfigurationIDs.prairieID).setBiomeName("Prairie"), BOPBiomeTemperatureType.WARM));
registerBiome(new BOPBiomeListEntry(new BiomeGenQuagmire(BOPConfigurationIDs.quagmireID).setBiomeName("Quagmire"), BOPBiomeTemperatureType.WARM));
@ -97,13 +99,13 @@ public class BOPBiomes
registerBiome(new BOPBiomeListEntry(new BiomeGenSacredSprings(BOPConfigurationIDs.sacredSpringsID).setBiomeName("Sacred Springs"), BOPBiomeTemperatureType.WARM));
/*registerBiome(new BOPBiomeListEntry(new BiomeGenSeasonalForest(BOPConfigurationIDs.seasonalForestID).setBiomeName("Seasonal Forest"), BOPBiomeTemperatureType.COOL));
registerBiome(new BOPBiomeListEntry(new BiomeGenShield(BOPConfigurationIDs.shieldID).setBiomeName("Shield"), BOPBiomeTemperatureType.COOL));
registerBiome(new BOPBiomeListEntry(new BiomeGenShrubland(BOPConfigurationIDs.shrublandID).setBiomeName("Shrubland"), BOPBiomeTemperatureType.COOL));
registerBiome(new BOPBiomeListEntry(new BiomeGenSilkglades(BOPConfigurationIDs.silkgladesID).setBiomeName("Silkglades"), BOPBiomeTemperatureType.COOL));
registerBiome(new BOPBiomeListEntry(new BiomeGenSludgepit(BOPConfigurationIDs.sludgepitID).setBiomeName("Sludgepit"), BOPBiomeTemperatureType.WARM));
registerBiome(new BOPBiomeListEntry(new BiomeGenShrubland(BOPConfigurationIDs.shrublandID).setBiomeName("Shrubland"), BOPBiomeTemperatureType.COOL));*/
//registerBiome(new BOPBiomeListEntry(new BiomeGenSilkglades(BOPConfigurationIDs.silkgladesID).setBiomeName("Silkglades"), BOPBiomeTemperatureType.COOL));
/*registerBiome(new BOPBiomeListEntry(new BiomeGenSludgepit(BOPConfigurationIDs.sludgepitID).setBiomeName("Sludgepit"), BOPBiomeTemperatureType.WARM));
registerBiome(new BOPBiomeListEntry(new BiomeGenSpruceWoods(BOPConfigurationIDs.spruceWoodsID).setBiomeName("Spruce Woods"), BOPBiomeTemperatureType.WARM));
registerBiome(new BOPBiomeListEntry(new BiomeGenTemperateRainforest(BOPConfigurationIDs.temperateRainforestID).setBiomeName("Temperate Rainforest"), BOPBiomeTemperatureType.WARM));
registerBiome(new BOPBiomeListEntry(new BiomeGenTemperateRainforest(BOPConfigurationIDs.temperateRainforestID).setBiomeName("Temperate Rainforest"), BOPBiomeTemperatureType.WARM));*/
registerBiome(new BOPBiomeListEntry(new BiomeGenThicket(BOPConfigurationIDs.thicketID).setBiomeName("Thicket"), BOPBiomeTemperatureType.WARM));
registerBiome(new BOPBiomeListEntry(new BiomeGenTimber(BOPConfigurationIDs.timberID).setBiomeName("Timber"), BOPBiomeTemperatureType.COOL));
/*registerBiome(new BOPBiomeListEntry(new BiomeGenTimber(BOPConfigurationIDs.timberID).setBiomeName("Timber"), BOPBiomeTemperatureType.COOL));
registerBiome(new BOPBiomeListEntry(new BiomeGenTropicalRainforest(BOPConfigurationIDs.tropicalRainforestID).setBiomeName("Tropical Rainforest"), BOPBiomeTemperatureType.HOT));
registerBiome(new BOPBiomeListEntry(new BiomeGenTropics(BOPConfigurationIDs.tropicsID).setBiomeName("Tropics"), BOPBiomeTemperatureType.HOT));
registerBiome(new BOPBiomeListEntry(new BiomeGenTundra(BOPConfigurationIDs.tundraID).setBiomeName("Tundra"), BOPBiomeTemperatureType.ICY));

View File

@ -1,23 +0,0 @@
package biomesoplenty.common.world;
public class BOPWorldFeatures
{
public PerChunk perChunk = new PerChunk();
public DoGeneration doGeneration = new DoGeneration();
public class PerChunk
{
public int mudPerChunk = 0;
public int riverCanePerChunk = 0;
public int shrubsPerChunk = 0;
public int bushesPerChunk = 0;
public int cloverPatchesPerChunk = 0;
public int bopFlowersPerChunk;
}
public class DoGeneration
{
public boolean generatePumpkins = true;
}
}

View File

@ -1,13 +1,14 @@
package biomesoplenty.common.world;
import java.util.HashMap;
import java.util.Set;
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.WorldGenMud;
import biomesoplenty.common.world.features.WorldGenRiverCane;
import biomesoplenty.common.world.features.WorldGenWaterReeds;
public class WorldGenFieldAssociation
{
@ -26,6 +27,12 @@ public class WorldGenFieldAssociation
associateField("bushesPerChunk", new WorldGenBOPFlora(BOPBlockHelper.get("foliage"), 4));
associateField("cloverPatchesPerChunk", new WorldGenBOPFlora(BOPBlockHelper.get("foliage"), 13, 128));
associateField("lavenderPerChunk", new WorldGenBOPFlora(BOPBlockHelper.get("flowers2"), 3));
associateField("thornsPerChunk", new WorldGenBOPFlora(BOPBlockHelper.get("plants"), 5));
associateField("stalagmitesPerChunk", new WorldGenBOPTallGrass(BOPBlockHelper.get("stoneFormations"), 0));
associateField("stalactitesPerChunk", new WorldGenBOPTallGrass(BOPBlockHelper.get("stoneFormations"), 1));
associateField("desertSproutsPerChunk", new WorldGenBOPFlora(BOPBlockHelper.get("plants"), 2));
associateField("bromeliadsPerChunk", new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 12));
associateField("waterReedsPerChunk", new WorldGenWaterReeds());
}
public static void associateField(String fieldName, WorldGenerator generator)

View File

@ -13,6 +13,12 @@ public class BOPWorldFeatures
public int bushesPerChunk = 0;
public int cloverPatchesPerChunk = 0;
public int lavenderPerChunk = 0;
public int thornsPerChunk = 0;
public int stalagmitesPerChunk = 3;
public int stalactitesPerChunk = 6;
public int desertSproutsPerChunk = 0;
public int bromeliadsPerChunk = 0;
public int waterReedsPerChunk = 0;
public int bopFlowersPerChunk = 0;
}

View File

@ -0,0 +1,51 @@
package biomesoplenty.common.world.features;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenerator;
public class WorldGenBOPTallGrass extends WorldGenerator
{
private Block tallGrass;
private int tallGrassMetadata;
public WorldGenBOPTallGrass(Block p_i45466_1_, int p_i45466_2_)
{
this.tallGrass = p_i45466_1_;
this.tallGrassMetadata = p_i45466_2_;
}
@Override
public boolean generate(World world, Random random, int x, int y, int z)
{
Block block;
do
{
block = world.func_147439_a(x, y, z);
if (!(block.isLeaves(world, x, y, z) || block.isAir(world, x, y, z)))
{
break;
}
--y;
} while (y > 0);
for (int l = 0; l < 128; ++l)
{
int i1 = x + random.nextInt(8) - random.nextInt(8);
int j1 = y + random.nextInt(4) - random.nextInt(4);
int k1 = z + random.nextInt(8) - random.nextInt(8);
//TODO: isAirBlock() canReplace()
if (world.func_147437_c(i1, j1, k1) && this.tallGrass.func_149705_a(world, i1, j1, k1, 0, new ItemStack(this.tallGrass, 1, this.tallGrassMetadata)))
{
world.func_147465_d(i1, j1, k1, this.tallGrass, this.tallGrassMetadata, 2);
}
}
return true;
}
}

View File

@ -0,0 +1,41 @@
package biomesoplenty.common.world.features;
import java.util.Random;
import biomesoplenty.api.BOPBlockHelper;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenerator;
public class WorldGenWaterReeds extends WorldGenerator
{
@Override
public boolean generate(World world, Random random, int x, int y, int z)
{
for (int var6 = 0; var6 < 64; ++var6)
{
int i1 = x + random.nextInt(8) - random.nextInt(8);
int j1 = y + random.nextInt(2) - random.nextInt(2);
int k1 = z + random.nextInt(8) - random.nextInt(8);
//TODO: isAirBlock() canReplace()
if (world.func_147437_c(i1, j1, j1) && BOPBlockHelper.get("plants").func_149705_a(world, i1, j1, k1, 0, new ItemStack(BOPBlockHelper.get("plants"), 1, 14)))
{
for (int i = 2; i > -2; --i)
{
//TODO: getBlock() getBlock()
if (world.func_147439_a(i1 - i, j1 - 1, j1 - i) != Blocks.water && world.func_147439_a(i1 - i, j1 - 1, j1 - i) != Blocks.flowing_water)
{
//TODO: setBlock()
world.func_147465_d(i1, j1, j1, BOPBlockHelper.get("plants"), 14, 2);
}
}
}
}
return true;
}
}