Posted June 16, 201411 yr Greetings! I've been working on a mod and I'm trying to generate random snow blocks on the surface of a custom biome. I've made it generate although not the way I intended. When I use the following code. public void decorate(World par1World, Random par2Random, int chunk_X, int chunk_Z) { super.decorate(par1World, par2Random, chunk_X, chunk_Z); WorldGenFlowers snow = new WorldGenFlowers(Block.blockSnow.blockID); boolean doGen = TerrainGen.decorate(par1World, par2Random, chunk_X, chunk_Z, FLOWERS); for (int j = 0; doGen && j < 10; ++j) { int k = chunk_X + par2Random.nextInt(16); int l = par2Random.nextInt(128); int i1 = chunk_Z + par2Random.nextInt(16); int i = par1World.getBlockId(k, l, i1); if( i == Main.blockSulfur.blockID) { par1World.setBlock(k, l, i1, i); } } } It just generates snow blocks in groups on top of the surface block. I'd like to make it so it will generate snow blocks randomly replacing random surface blocks. Anyone have any ideas or suggestions? Any help is greatly appreciated!
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.