mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-11 08:19:45 +00:00
Fixed generation changes in recent builds compared to 3.x
this was caused by improper RNG sanitization and a recent cleanup refactor.
This commit is contained in:
parent
cf20f0e23a
commit
ab75e89d95
@ -77,6 +77,11 @@ class Simplex extends Noise{
|
||||
$this->perm[$pos] = $old;
|
||||
$this->perm[$i + 256] = $this->perm[$i];
|
||||
}
|
||||
|
||||
//this dummy call is necessary to produce the same RNG state as before latest refactors to this file
|
||||
//previously this value would be used for offsetW
|
||||
//TODO: this really needs to reset the RNG seed to avoid future RNG contamination
|
||||
$random->nextSignedInt();
|
||||
}
|
||||
|
||||
public function getNoise3D($x, $y, $z){
|
||||
|
Loading…
x
Reference in New Issue
Block a user