Skip to content

Commit

Permalink
Added generate lakes toggle
Browse files Browse the repository at this point in the history
I did this for CumbledHam
this adds Moresteck#39
  • Loading branch information
SprainedSpark89 committed Nov 5, 2024
1 parent 5896447 commit b1489eb
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ private void write() {
generateConfigOption("version.worldgen.generate_tallgrass", true);
generateConfigOption("version.worldgen.ores.world.custom_seed", false);
generateConfigOption("version.worldgen.ores.world.seed", 0L);
generateConfigOption("version.worldgen.generate_lakes", true);

generateConfigOption("version.mechanics.tile_grass_drop_seeds", false);
generateConfigOption("version.mechanics.flammable_fences_stairs", true);
Expand Down
33 changes: 18 additions & 15 deletions src/main/java/net/minecraft/server/ChunkProviderGenerate.java
Original file line number Diff line number Diff line change
Expand Up @@ -341,21 +341,24 @@ public void getChunkAt(IChunkProvider ichunkprovider, int i, int j) {
int l1;
int i2;

if (this.j.nextInt(4) == 0) {
k1 = k + this.j.nextInt(16) + 8;
l1 = this.j.nextInt(128);
i2 = l + this.j.nextInt(16) + 8;
(new WorldGenLakes(Block.STATIONARY_WATER.id)).a(this.p, this.j, k1, l1, i2);
}

if (this.j.nextInt(8) == 0) {
k1 = k + this.j.nextInt(16) + 8;
l1 = this.j.nextInt(this.j.nextInt(120) + 8);
i2 = l + this.j.nextInt(16) + 8;
if (l1 < 64 || this.j.nextInt(10) == 0) {
(new WorldGenLakes(Block.STATIONARY_LAVA.id)).a(this.p, this.j, k1, l1, i2);
}
}
// uberbukkit
if (PoseidonConfig.getInstance().getBoolean("version.worldgen.generate_lakes", true)) {
if (this.j.nextInt(4) == 0) {
k1 = k + this.j.nextInt(16) + 8;
l1 = this.j.nextInt(128);
i2 = l + this.j.nextInt(16) + 8;
(new WorldGenLakes(Block.STATIONARY_WATER.id)).a(this.p, this.j, k1, l1, i2);
}

if (this.j.nextInt(8) == 0) {
k1 = k + this.j.nextInt(16) + 8;
l1 = this.j.nextInt(this.j.nextInt(120) + 8);
i2 = l + this.j.nextInt(16) + 8;
if (l1 < 64 || this.j.nextInt(10) == 0) {
(new WorldGenLakes(Block.STATIONARY_LAVA.id)).a(this.p, this.j, k1, l1, i2);
}
}
}

int j2;

Expand Down

0 comments on commit b1489eb

Please sign in to comment.