mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-17 14:21:08 +00:00
xor world seed into PaddedGridDistributor seed
This commit is contained in:
+1
-1
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user