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.

[Solved][1.16.5] Biomes make game crash

Featured Replies

Posted

Hello,

When I try to load a world or open the world gen settings menu, the game crashes.

I realized this error happens only when I register my Biomes but I don't understand why.

 

My Biomes are registered like this:

public static final DeferredRegister<Biome> BIOMES = DeferredRegister.create(ForgeRegistries.BIOMES, BinaryMod.MOD_ID);
public static final RegistryObject<Biome> MY_BIOME = BIOMES.register("my_biome", Biomes::makeMyBiome);

Biomes#makeMyBiome method:

    private static final Lazy<ConfiguredSurfaceBuilder<SurfaceBuilderConfig>> BINARY_SURFACE_BUILDER = () -> GenerationInit.BINARY_SURFACE_BUILDER.get().func_242929_a(new SurfaceBuilderConfig(BlockInit.BINARY_BLOCK.get().getDefaultState(), BlockInit.ON_BINARY_BLOCK.get().getDefaultState(), null));

    public static Biome makeBinaryBiome()
    {
        MobSpawnInfo.Builder spawns = new MobSpawnInfo.Builder();
        BinDimBiomeFeatures.addBinDimSpawns(spawns);

        BiomeGenerationSettings.Builder gen = new BiomeGenerationSettings.Builder();
        gen.withSurfaceBuilder(BINARY_SURFACE_BUILDER::get);

        BinDimBiomeFeatures.addOres(gen);
        BinDimBiomeFeatures.addBugVirus(gen);
        BinDimBiomeFeatures.addStructures(gen);

        int color = 0x00ff00;

        return new Biome.Builder()
            .precipitation(Biome.RainType.NONE).category(Biome.Category.NONE).depth(0.1F).downfall(0F).scale(0.02F).temperature(1.5F)
            .setEffects(new BiomeAmbience.Builder().setWaterColor(color).setWaterFogColor(color).setFogColor(color).withSkyColor(color).build())
            .withMobSpawnSettings(spawns.copy())
            .withGenerationSettings(gen.build()).build();
    }

BinDimBiomeFeatures basically adds features to the BiomeGenerationSettings.Builder

 

Here's my whole project: https://github.com/BinaryQuantumSoul/BinaryMod/tree/1.16.5/src/main/java/com/quantumsoul/binarymod/world/biomes (1.16.5 Branch)

 

Has anyone an idea about why it crashes ?

Thanks in advance.

Edited by QuantumSoul

  • Author

Solved, the problem was that I gave a null BlockState to my SurfaceBuilderConfig. I also had to register features, placements(decorators) and ruletests

 

Edited by QuantumSoul

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.