mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-10-25 21:40:08 +00:00
seed differently for every unique coordinate pair
This commit is contained in:
1 parent
1801c831ba
commit
ca52a3e740
1 file changed
+3
-4
+3
-4
@@ -43,6 +43,8 @@ public class FeatureGenerationStage implements GenerationStage, StringIdentifiab
|
|||||||
int tx = cx + x;
|
int tx = cx + x;
|
||||||
int tz = cz + z;
|
int tz = cz + z;
|
||||||
ColumnImpl<ProtoWorld> column = new ColumnImpl<>(tx, tz, world);
|
ColumnImpl<ProtoWorld> column = new ColumnImpl<>(tx, tz, world);
|
||||||
|
long coordinateSeed = (seed * 31 + tx) * 31 + tz;
|
||||||
|
|
||||||
world.getBiomeProvider()
|
world.getBiomeProvider()
|
||||||
.getBiome(tx, tz, seed)
|
.getBiome(tx, tz, seed)
|
||||||
.getContext()
|
.getContext()
|
||||||
@@ -58,10 +60,7 @@ public class FeatureGenerationStage implements GenerationStage, StringIdentifiab
|
|||||||
feature.getStructure(world, tx, y, tz)
|
feature.getStructure(world, tx, y, tz)
|
||||||
.generate(Vector3Int.of(tx, y, tz),
|
.generate(Vector3Int.of(tx, y, tz),
|
||||||
world,
|
world,
|
||||||
new Random(PopulationUtil.getCarverChunkSeed(
|
new Random(coordinateSeed * 31 + y),
|
||||||
world.centerChunkX(),
|
|
||||||
world.centerChunkZ(),
|
|
||||||
seed)),
|
|
||||||
Rotation.NONE)
|
Rotation.NONE)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user