mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Mapgen: Use getBlockSeed2() for blockseeds (much better uniformity)
This commit is contained in:
parent
ca89e63b27
commit
0974337804
10 changed files with 24 additions and 16 deletions
|
@ -101,6 +101,21 @@ Mapgen::~Mapgen()
|
|||
}
|
||||
|
||||
|
||||
u32 Mapgen::getBlockSeed(v3s16 p, int seed)
|
||||
{
|
||||
return (u32)seed +
|
||||
p.Z * 38134234 +
|
||||
p.Y * 42123 +
|
||||
p.X * 23;
|
||||
}
|
||||
|
||||
|
||||
u32 Mapgen::getBlockSeed2(v3s16 p, int seed)
|
||||
{
|
||||
return noise3d(p.X, p.Y, p.Z, seed);
|
||||
}
|
||||
|
||||
|
||||
// Returns Y one under area minimum if not found
|
||||
s16 Mapgen::findGroundLevelFull(v2s16 p2d)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue