Posted May 28, 20187 yr I'm trying to generate terrain in my custom dimension using noise, but I don't really know how to. When I did plugin development, this was pretty easy (and I also just want simple, hilly terrain): SimplexOctaveGenerator generator = new SimplexOctaveGenerator(new Random(world.getSeed()), 8); ChunkData chunk = createChunkData(world); generator.setScale(0.007D); for (int X = 0; X < 16; X++) { for (int Z = 0; Z < 16; Z++) { currentHeight = (int) (generator.noise(chunkX * 16 + X, chunkZ * 16 + Z, 0.5D, 0.5D) * 15D + 50D); chunk.setBlock(X, currentHeight, Z, Material.GRASS); chunk.setBlock(X, currentHeight-1, Z, Material.DIRT); for (int i = currentHeight-2; i > 0; i--) { chunk.setBlock(X, i, Z, Material.STONE); } chunk.setBlock(X, 0, Z, Material.BEDROCK); } } but it looks like it isn't that simple with forge. Any help is appreciated Thanks, MasterComlud
May 29, 20187 yr Author So, I tried to import the source code used for noise from bukkit and changed it to fit my mod, but without success. Can stuff like that even work? (probably, if you're experienced, which I'm not) I just need a good and easy way to use noise. Please help, MasterComlud
May 29, 20187 yr I'm not quite sure what your concern is regarding Bukkit versus Forge. Terrain generation is just a matter of placing blocks, and the "noise" is meant to add natural variety in the choice of where to place the blocks. The math behind the noise generation should be the same (or can be made the same easily). The tricky part with noise though is the "tuning". Just a minor difference in a parameter for the noise generator, or just a minor difference in the threshold for deciding whether a block is placed or not, can make a large practical difference to the world that gets generated. You didn't really explain what you're trying to achieve specifically in terms of the resulting terrain. But you can either start with your plugin code and just make sure the math matches up, or you can start with the Minecraft vanilla generators and see if you can tweak them. You could also try using the custom terrain generator and seeing if you can get what you want and then use those values to hard-code a generator specific for your mod. Check out my tutorials here: http://jabelarminecraft.blogspot.com/
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.