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

Hello! Sorry for my Eng.

I created a new biome, and now I need to replace default Minecraft stone with my custom block (AmbientBlocks.Blocks.stone.getDefaultState()). How I can do this?

My biome code:

public class TerraForestBiome extends Biome {
    public TerraForestBiome(Builder biomeBuilder) {
        super((new Biome.Builder()
                .surfaceBuilder(new ConfiguredSurfaceBuilder<SurfaceBuilderConfig>(SurfaceBuilder.DEFAULT, new SurfaceBuilderConfig(
                        AmbientBlocks.Blocks.grass.getDefaultState(),
                        AmbientBlocks.Blocks.dirt.getDefaultState(),
                        AmbientBlocks.Blocks.stone.getDefaultState())))
                .precipitation(RainType.RAIN)
                .category(Category.PLAINS)
                .downfall(0.25F)
                .depth(0.1F)
                .scale(0.3F)
                .temperature(0.8F)
                .waterColor(4159204)
                .waterFogColor(329011)
                .parent(null)));
    }
}

 

Edited by SSKirillSS

  • Author

So... Any info about this?

I still can't replace vanilla stone  in custom biome. Maybe surfaceBuilder override be helpful, but I don't fully understand how to use it.

29 minutes ago, SSKirillSS said:

Maybe surfaceBuilder override

I don't think SurfaceBuilder is what you want to look at, as that only builds the surface.

Probably check out ChunkGenerators, I see in net.minecraft.world.gen.GenerationSettings there is a defaultBlock field that seems to default to stone.

 

*edit: looking a little bit more, it almost seems as if the default block is determined by the dimension as opposed to the biome.

Edited by Ugdhar

  • Author
2 hours ago, Ugdhar said:

default block is determined by the dimension as opposed to the biome

So I can’t change this block without creating my own dimension?

18 minutes ago, SSKirillSS said:

So I can’t change this block without creating my own dimension?

It looks like the easiest way to do this would be to add a feature to your biome(s) that replace all of the Stone blocks with whatever block you want. However if you feel adventurous feel free to look into GenerationSettings::defaultBlock and changing that between the block that you want to use and the vanilla Stone block.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

  • Author
12 minutes ago, Animefan8888 said:

and changing that between the block that you want to use and the vanilla Stone block

How I can do this? Will I need make own GenerationSettings extends default, and override that's variable?

2 minutes ago, SSKirillSS said:

How I can do this? Will I need make own GenerationSettings extends default, and override that's variable?

I'm not sure. If I had more time I could look into it. Why not look into it yourself

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

  • Author
24 minutes ago, Animefan8888 said:

Show what you've tried.

Everything was limited to the search for methods of changing the stone through the biome, but they could not be found. The only sure way to change the value of that variable with a stone (GenerationSettings#defaultBlock), but I don't know how to change a variable without processing almost the entire generation logic. It's like creating a separate world...

I have not yet considered the option of replacing the stone with my block at the generation stage, since I hope that there is a more correct way.

Edited by SSKirillSS

  • Author
8 hours ago, diesieben07 said:

that is decided by the world type

So... I can't change defaultBlock without creating own world?

  • 1 month later...

You need to do it in a new dimension.

You can add it directly to your GenerationSetting.

 

public class ModGenSettings extends GenerationSettings{

    public ModGenSettings () {
        this.setDefaultBlock( YOUR_BLOCK.get().getDefaultState().getBlockState() );
    }

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.