Lakes can generate through bedrock
CorruptionEX opened this issue ยท 0 comments
Description:
Lakes can generate through the bedrock on the top of the dimension, giving the player access outside.
I haven't been able to confirm them breaking through the bottom bedrock, but it may also be possible if they spawn too low? I even tried setting lake chance to 1 so they would spawn very frequently, and they didn't seem to break through the bottom, only the top.
In addition to lakes, these 2x2 squares of stone peaking out of the top and bottom bedrock are actually stalactites/stalagmites spawning. They have similar code, and the same problem.
If I could give my explanation on why I think its happening, it probobly because of this code in ChunkProviderDeepDank.java near line 482:
if(Beneath.lakeChance > 0)
for(Block block : Beneath.fluid_blocks)
if(rand.nextInt(Beneath.lakeChance) == 0){
int i1 = rand.nextInt(16) + 8;
int j1 = rand.nextInt(256);
int k1 = rand.nextInt(16) + 8;
new WorldGenLakes(block).generate(world, rand, blockpos.add(i1, j1, k1));
The line int j1 = rand.nextInt(256);
could be changed to int j1 = rand.nextInt(236) + 10;
to allow the selected Y coordinate be be between Y=10-246, just like the block decorator options.
Either that, or add a config option to change spawning heights...
Sidenote: I was curious to see if dungeons also could break bedrock, and found that even at their highest frequency, they never did. However it looks like in the code they can choose Y coordinates all the way to 256, just like lakes. I did test this a few times, but I never saw it happen. The oregen and blockdecorator don't have the issue either, even if you set their bounds to 0/256, because they only replace blocks that you specify.
Bonus sidenote: While 1 is the setting for most frequent lakes, 100 is the most frequent setting for dungeons. May be confusing to people trying to configure the mod, as setting them both to 1 causes lakes to spawn everywhere, but practically never a dungeon in sight.
Affected versions
- Minecraft: release 1.12.2
- Forge: 14.23.5.2807
- The Beneath: 1.5.0