Jump to content

[1.18.2] place Top-Blocks

Recommended Posts

I am currently in the process of porting a mod to 1.18.2 an it contains a partially buried structure.

The Structure is supposed to contain some Top-Blocks(in plains grass, in the desert sand, on mushroom island mycelium).

In 1.16 I got the Top-Block of the Biome, but it looks like that isn't possible anymore.

protected void handleDataMarker(String function, BlockPos pos, ServerLevelAccessor worldIn, Random rand, BoundingBox boundingBox) {
	case "top_block":
		worldIn.setBlock(pos, genWorld.getBiome(pos).value().getGenerationSettings().getSurfaceBuilderConfig().getTopMaterial(), Block.UPDATE_CLIENTS);


Link to comment
Share on other sites

It's not something I know a lot about.

This link tries to explain the change in 1.18: https://github.com/TheForsakenFurby/Surface-Rules-Guide-Minecraft-JE-1.18/blob/main/Guide.md


Here's the vanilla overworld config (for the latest 1.20 snapshot at time of writing):



From what I understand, they are only available when the chunk generator uses the NoiseGenerationSettings and only to carvers.

So you shouldn't really rely on them being available. e.g. if somebody changes their overworld to "flat" you won't have any data.


The way mojang do this kind of thing is to have different structures based on the biome. e.g. see the different villages.



If you still want to try to figue out how to get hold of the data, I would start with


but notice that method is deprecated in 1.18.2 and doesn't exist in 1.19.4 (the CarvingContext and SurfaceSystem methods still exist but are also deprecated).


If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.