diff options
author | Michal Havlíček <80639037+havel06@users.noreply.github.com> | 2023-04-08 00:11:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-08 00:11:10 +0200 |
commit | 669392d44a0f74e83b2702fa64d4f8bfb2ec643c (patch) | |
tree | 2c80eca6e9504c6475b00e5fd72b18d308d06e0f /src/World.cpp | |
parent | refactor: removed m_MojangAPI from RankManager (#5483) (diff) | |
download | cuberite-669392d44a0f74e83b2702fa64d4f8bfb2ec643c.tar cuberite-669392d44a0f74e83b2702fa64d4f8bfb2ec643c.tar.gz cuberite-669392d44a0f74e83b2702fa64d4f8bfb2ec643c.tar.bz2 cuberite-669392d44a0f74e83b2702fa64d4f8bfb2ec643c.tar.lz cuberite-669392d44a0f74e83b2702fa64d4f8bfb2ec643c.tar.xz cuberite-669392d44a0f74e83b2702fa64d4f8bfb2ec643c.tar.zst cuberite-669392d44a0f74e83b2702fa64d4f8bfb2ec643c.zip |
Diffstat (limited to 'src/World.cpp')
-rw-r--r-- | src/World.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/World.cpp b/src/World.cpp index 133458a8c..67ae6623b 100644 --- a/src/World.cpp +++ b/src/World.cpp @@ -3229,3 +3229,13 @@ void cWorld::cChunkGeneratorCallbacks::CallHookChunkGenerated (cChunkDesc & a_Ch *m_World, a_ChunkDesc.GetChunkX(), a_ChunkDesc.GetChunkZ(), &a_ChunkDesc ); } + + + + + +bool cWorld::IsSlimeChunk(int a_ChunkX, int a_ChunkZ) const +{ + cNoise Noise(GetSeed()); + return (Noise.IntNoise2DInt(a_ChunkX, a_ChunkZ) / 8) % 10 == 0; // 10% chance +} |