Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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.

@Override
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);
		break;
}

 

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):

https://github.com/misode/mcmeta/blob/9d422bf8fe4824657260721682e5527ef608ce67/data/minecraft/worldgen/noise_settings/overworld.json#LL386C2-L386C2

 

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.

https://github.com/misode/mcmeta/tree/data/data/minecraft/structures/village

 

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

NoisedBasedChunkGenerator.topMaterial()

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).

Boilerplate:

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.

  • Author

Yea, I checked it out and it doesn’t seem to be viable anymore. My current Plan is to check the area beforehand and save whatever Blocks there are in a variable.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.