Quote Originally Posted by laggyluk View Post
can you explain to me how it works? (because in the process you'll probably find the bug yourself )
Sure! First program generates ground using Perlin noise, then it carves cave then it is supposed to place grass tiles (INVINCIBLEBLOCKID) and traps but it doesn't work.

@SilverWarrior: Yeah, I thought so about setting dimensions bu wasn't sure. Will change that bit of code. Also let's say I'd make 2d minecraft (which isn't something I want to do): Grass can only grow on ground, so it is unlikely I'll need to check for other ground tiles, especially in Super Heli Land where it is like 3-4 tiles max.

@User137: Thanks. But that is optimization part. I need first to make my code WORK. After that, I'll do as you say.