Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -438,11 +438,15 @@ private boolean intersectsAny(int xMin, int yMin, int zMin, int xMax, int yMax,
}

private void setSeed(ChunkRand rand, long worldSeed, int chunkX, int chunkZ) {
rand.setSeed((chunkX >> 4) ^ (chunkZ >> 4 << 4) ^ worldSeed);
rand.nextInt();
rand.nextInt(3);
rand.nextInt(8);
rand.nextInt(8);
if (version.isOlderOrEqualTo(MCVersion.v1_15)) {
rand.setSeed((chunkX >> 4) ^ (chunkZ >> 4 << 4) ^ worldSeed);
rand.nextInt();
rand.nextInt(3);
rand.nextInt(8);
rand.nextInt(8);
} else {
rand.setCarverSeed(worldSeed, chunkX, chunkZ, version);
}
}

public static void main(String[] args) {
Expand Down Expand Up @@ -487,12 +491,12 @@ private interface Extender {
void extend(PieceInfo pieceInfo, ChunkRand rand);
}

private static class PieceInfo {
private final int type;
private final int depth;
private final int xMin, yMin, zMin;
private final int xMax, yMax, zMax;
private final int facing;
public static class PieceInfo {
public final int type;
public final int depth;
public final int xMin, yMin, zMin;
public final int xMax, yMax, zMax;
public final int facing;

public PieceInfo(int type, int depth, int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, int facing) {
this.type = type;
Expand Down