Going to be looking at putting trees in myself. Did you create a method that would not put any blocks on top of a tree?

Thanks

I don't think you'd need that if you're only using 2D perlin/simplex noise. If you plant the trees at random locations, its impossible for a block to be above it. Just make sure you're planting the trees on grass

So, you are saying when I have done that I can place a tree anywhere as long as it is grass? I think I need to call the above, then create another method which would plant a tree at random locations within this chunk as long as the height of the block we are putting it on is not going to allow our tree to go out of the bounds of the chunk. i.e. if our tree is going to be 12 blocks in height, we need to put it on a block that is less than 4 on the Y-axis - this make sense or am I talking garbage?!

Going to be looking at putting trees in myself. Did you create a method that would not put any blocks on top of a tree?

Thanks

I don't use any advanced methods to generate my world. I just generate some random ints for each block type, and then I call my my generateTree function which generates 2 number from 1 to 6 (one for x, and on for z axis) and I just spawn a tree there.

Steg, how I would do it is first generate the whole entire world. Then pick out random X and Z values that have space in your world, get the highest block in that place, and spawn a tree on that block above it. That's how I would do it atm. You can also check the distance from other trees to make sure they aren't too close together.

Also, if you want, you can just loop through your X and Z width and spawn trees every 5x5 or so blocks.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org