Sponge: Sandstone is not generated naturally

Created on 16 Apr 2019  路  4Comments  路  Source: SpongePowered/Sponge

I am currently running

  • SpongeForge version: 1.12.2-2768
  • SpongeVanilla version: 1.12.2-7.1.5
  • Java version: 8
  • Operating System: Linux (dockered debian 8 and fedora 28)

  • Plugins/Mods: none


Issue Description

On desert biomes (I didn't check beaches) sandstone is not generated naturally. I've tried Sponge versions mentioned above and vanilla Minecraft 1.12.2. On vanilla Minecraft sandstone is generated correctly.
Seed I've checked: -4474001698482465191
Location I've been at: -775 65 -1373

Refer: https://minecraft.gamepedia.com/Sandstone section "Natural generation"

accepted pr pending world gen bug 1.12

All 4 comments

It looks like MixinBiome.buildPopulators() will need to be updated to add an extra GroundCoverLayer when the block is sand or red sand. However, I don't know how to set that up properly to match the vanilla behavior - in vanilla, the depth of sandstone also depends on the height of the ground, which GroundCoverLayer doesn't currently support. The actual code vanilla uses to determine the height (see Biome.generateBiomeTerrain()) is:

if (blocksRemaining == 0 && blockToPlace.getBlock() == Blocks.SAND && layerNum > 1) {
    blocksRemaining = rand.nextInt(4) + Math.max(0, currentY - 63); // currentY is the lowest position that regular sand will be placed
    blockToPlace = blockToPlace.getValue(BlockSand.VARIANT) == BlockSand.EnumType.RED_SAND ? RED_SANDSTONE : SANDSTONE;
}

Isn't it possible to actually provide the Y coordinate to the blockState function inside GroundCoverLayer? It seems doable in org.spongepowered.common.world.gen.SpongeChunkGenerator with slight modification to blockState function signature. I could try to do that myself and provide a PR to fix this issue but I'm not absolutely certain that this is a good approach (I'm not sure if there's a way to avoid api compatibility break).

I have a fix ready, pending review of the related SpongeAPI changes. See https://github.com/SpongePowered/SpongeCommon/pull/2270 and https://github.com/SpongePowered/SpongeAPI/pull/2009.

This right here is the reason why we are tossing our gen API in 8 and layering directly on Vanilla...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Xemiru picture Xemiru  路  3Comments

XakepSDK picture XakepSDK  路  5Comments

Eufranio picture Eufranio  路  4Comments

nikosgram picture nikosgram  路  3Comments

XakepSDK picture XakepSDK  路  5Comments