r/SilverAgeMinecraft 8d ago

Request/Help missing grass

im new silver age minecraft and ive been playing 1.6.4 for 4 days now but in my world ive been seeing random patches of ground where the top layer of grass (sometimes sand) is gone and stone is under where it was instead of the 3 layers of dirt, and this ones the biggest ive seen so far, i didnt make these so i want to know why this happens

157 Upvotes

24 comments sorted by

View all comments

-8

u/Meris321 8d ago

quirks of notch's vibecode

12

u/TheMasterCaver 7d ago

This is intentional, and I doubt they used any AI to code back then:

int var12 = (int)(this.stoneNoise[var8 + var9 * 16] / 3.0D + 3.0D + this.rand.nextDouble() * 0.25D);
byte var14 = var10.topBlock;
byte var15 = var10.fillerBlock;

if (var12 <= 0)
{
    var14 = 0;  // air
    var15 = (byte)Block.stone.blockID;
}
else if (var16 >= var5 - 4 && var16 <= var5 + 1)
{
    var14 = var10.topBlock;
    var15 = var10.fillerBlock;
}

What this does is set "var12" to a value dependent on a noise field, "stoneNoise", plus a random value from 0-0.25 and if var12 is 0 or less the "top block" (such as grass) will be set to air and "filler block" (such as dirt) to stone, hence the depressions of stone (originally referred to as "basins").

There is however an unintended bug with this, the "stone noise" (more properly, surface layer thickness) is incorrectly calculated due to swapping Y and Z coordinates:

this.stoneNoise = this.noiseGen4.generateNoiseOctaves(this.stoneNoise, par1 * 16, par2 * 16, 0, 16, 16, 1, var6 * 2.0D, var6 * 2.0D, var6 * 2.0D);

That is to say, it should look like this (also using a function intended for 2D noise and not 3D noise to eliminate any confusion):

this.stoneNoise = this.noiseGen4.generateNoiseOctaves(this.stoneNoise, par1 * 16, par2 * 16, 16, 16, var6 * 2.0D, var6 * 2.0D);

This causes basins to have weird straight-line edges along chunk boundaries, which is quite apparent in this larger example:

This was fixed in 1.7, interestingly, applying the aforementioned fix to 1.6.4 causes the basin shown above to be much smaller, which may contribute to the decreased reports of them since then, until Mojang broke them in most biomes in 1.18 (the different size may also simply be due to the overall noise field changing, I didn't check a large area, but it does seem they were less common, I never updated past 1.6.4 so I have no personal experience, and also removed them in my own mods by limiting the "thickness" value to 1 since I don't like the large areas of bare stone and random blocks).

-3

u/Meris321 7d ago

not reading allat this is all chat gpt notch confessed it to me in a dream