diff --git a/SQCSim-common/chunk.cpp b/SQCSim-common/chunk.cpp index 2e843da..fa361d6 100644 --- a/SQCSim-common/chunk.cpp +++ b/SQCSim-common/chunk.cpp @@ -10,7 +10,9 @@ Chunk::Chunk(unsigned int x, unsigned int y, int64_t seed) : m_posX(x), m_posY(y //if (input.fail()) { OpenSimplexNoise::Noise simplex = OpenSimplexNoise::Noise(seed); + int ratio = 0; + ratio = x * y % 7; m_blocks.Reset(BTYPE_AIR); #pragma region Montagnes et Grass des montagnes @@ -33,14 +35,14 @@ Chunk::Chunk(unsigned int x, unsigned int y, int64_t seed) : m_posX(x), m_posY(y if (iy < 20) { //std::cout << "" << ynoiz << std::endl; - SetBlock(ix, iy, iz, BTYPE_GRASS, nullptr); + SetBlock(ix, iy, iz, BTYPE_GREENGRASS, nullptr); } else if (iy == 20 || iy == 21) { double fractionalPart = ynoiz - static_cast(ynoiz); if (iy == 20) { if (fractionalPart < 0.3) { - SetBlock(ix, iy, iz, BTYPE_GRASS, nullptr); + SetBlock(ix, iy, iz, BTYPE_GREENGRASS, nullptr); } else { SetBlock(ix, iy, iz, BTYPE_METAL, nullptr); @@ -48,7 +50,7 @@ Chunk::Chunk(unsigned int x, unsigned int y, int64_t seed) : m_posX(x), m_posY(y } else if (iy == 21) { if (fractionalPart < 0.6) { - SetBlock(ix, iy, iz, BTYPE_GRASS, nullptr); + SetBlock(ix, iy, iz, BTYPE_GREENGRASS, nullptr); } else { SetBlock(ix, iy, iz, BTYPE_METAL, nullptr); @@ -136,7 +138,7 @@ Chunk::Chunk(unsigned int x, unsigned int y, int64_t seed) : m_posX(x), m_posY(y height /= (CHUNK_SIZE_Y / 1.9); height += 15.; - if (GetBlock(ix, (int)height, iz) == BTYPE_GRASS || (GetBlock(ix, (int)height, iz) == BTYPE_METAL)) { + if (GetBlock(ix, (int)height, iz) == BTYPE_GREENGRASS || (GetBlock(ix, (int)height, iz) == BTYPE_METAL)) { valeurRnd = simplex.eval(xnoiz, ynoiz); int distanceThreshold = 20; @@ -220,7 +222,7 @@ Chunk::Chunk(unsigned int x, unsigned int y, int64_t seed) : m_posX(x), m_posY(y void Chunk::PlaceTree(int x, int y, int z, int height) { for (int iy = 0; iy < height + 1; ++iy) { - SetBlock(x, y + iy, z, BTYPE_LAST, nullptr); + SetBlock(x, y + iy, z, BTYPE_GRASS, nullptr); } int foliageHeight = height / 2;