I have been working on my game for the past couple of days, and for some odd reason the following code won't work:
for (int i = ChunkSize; i > 0; i--)
for (int j = ChunkSize; j > 0; j--)
if (ChunkY > 0 || (ChunkY == 0 && j > World.ChunkSize / 2))
Block = (char)BlockID.BLOCK_GRASS;
Block = (char)BlockID.BLOCK_AIR;
_ReturnString = _ReturnString + Block.ToString();
Well, in fact, it works. But the only thing that doesn't work is this part:
(ChunkY == 0 && j > World.ChunkSize / 2))
Also keep in mind that I am writing the world from the end to the beginning, the reason why is because I read it out afterwards and it's backwards if I don't also write it backwards.
If you do not understand my problem: Basically, I am creating a flatgrass, but if the chunkY coordinate is 0 it should fill the grass all the way to the middle instead of the whole chunk. And it's basically only doing it for the whole chunk thing.