mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-03 16:35:50 +00:00
xor world seed into PaddedGridDistributor seed
This commit is contained in:
parent
36d417d3db
commit
ea7e78c498
@ -27,7 +27,7 @@ public class PaddedGridDistributor implements Distributor {
|
|||||||
int cellX = FastMath.floorDiv(x, cellWidth);
|
int cellX = FastMath.floorDiv(x, cellWidth);
|
||||||
int cellZ = FastMath.floorDiv(z, cellWidth);
|
int cellZ = FastMath.floorDiv(z, cellWidth);
|
||||||
|
|
||||||
Random random = new Random(MathUtil.squash(cellX, cellZ) + salt);
|
Random random = new Random((MathUtil.squash(cellX, cellZ) ^ seed) + salt);
|
||||||
|
|
||||||
int pointX = random.nextInt(width) + cellX * cellWidth;
|
int pointX = random.nextInt(width) + cellX * cellWidth;
|
||||||
int pointZ = random.nextInt(width) + cellZ * cellWidth;
|
int pointZ = random.nextInt(width) + cellZ * cellWidth;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user