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

Any clues on how to get a biome to generate in the nether.

Also, how can I tweak the rarity of the biome.

Thanks

  • Author

My biome class looks like this

 

public class SoulSandValley extends Biome {
    public SoulSandValley() {
        super((new Biome.Builder())
                .surfaceBuilder(SurfaceBuilder.DEFAULT, new SurfaceBuilderConfig(ModBlocks.SOULSOIL.getDefaultState(), Blocks.NETHERRACK.getDefaultState(), Blocks.NETHERRACK.getDefaultState()))
                .category(Category.NETHER)
                .precipitation(RainType.NONE)
                .downfall(0.0F)
                .depth(0.1F)
                .scale(0.2F)
                .temperature(2.0F)
                .waterColor(0x2debeb)
                .waterFogColor(0x2debeb)
                .parent(null)
        );
        DefaultBiomeFeatures.addMushrooms(this);
        DefaultBiomeFeatures.addFossils(this);
        this.addCarver(Carving.AIR, createCarver(WorldCarver.HELL_CAVE, new ProbabilityConfig(0.2F)));
        this.addStructure(Feature.NETHER_BRIDGE, IFeatureConfig.NO_FEATURE_CONFIG);
        this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createDecoratedFeature(Feature.SPRING_FEATURE, new LiquidsConfig(Fluids.LAVA.getDefaultState()), Placement.COUNT_VERY_BIASED_RANGE, new CountRangeConfig(20, 8, 16, 256)));
        this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(Feature.NETHER_BRIDGE, IFeatureConfig.NO_FEATURE_CONFIG, Placement.NOPE, IPlacementConfig.NO_PLACEMENT_CONFIG));
        this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(Feature.NETHER_SPRING, new HellLavaConfig(false), Placement.COUNT_RANGE, new CountRangeConfig(8, 4, 8, 128)));
        this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(Feature.BUSH, new BushConfig(Blocks.BROWN_MUSHROOM.getDefaultState()), Placement.CHANCE_RANGE, new ChanceRangeConfig(0.5F, 0, 0, 128)));
        this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(Feature.BUSH, new BushConfig(Blocks.RED_MUSHROOM.getDefaultState()), Placement.CHANCE_RANGE, new ChanceRangeConfig(0.5F, 0, 0, 128)));
        this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(Feature.ORE, new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NETHERRACK, Blocks.NETHER_QUARTZ_ORE.getDefaultState(), 14), Placement.COUNT_RANGE, new CountRangeConfig(16, 10, 20, 128)));
        this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(Feature.ORE, new OreFeatureConfig(OreFeatureConfig.FillerBlockType.create("BASALT", "basalt", new BlockMatcher(ModBlocks.BASALT)), Blocks.MAGMA_BLOCK.getDefaultState(), 33), Placement.MAGMA, new FrequencyConfig(4)));
        this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(Feature.NETHER_SPRING, new HellLavaConfig(true), Placement.COUNT_RANGE, new CountRangeConfig(16, 10, 20, 128)));
        this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Biome.createDecoratedFeature(Feature.FOSSIL, IFeatureConfig.NO_FEATURE_CONFIG, Placement.CHANCE_PASSTHROUGH, new ChanceConfig(1000)));
        //mob spawning
        this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.GHAST, 70, 4, 4));
        this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.SKELETON, 100, 4, 4));

        this.setRegistryName("soul_sand_valley");
    }

    @OnlyIn(Dist.CLIENT)
    public int getSkyColorByTemp(float currentTemperature) {
        return 0x2debeb;
    }


}

 

The biome shows up in the game in the buffet world type, but not in the default world type

Edited by abdmoh123
Changed code display

  • Author

The way I registered the biome is this way (in main class)

@SubscribeEvent
public static void onBiomesRegistry(final RegistryEvent.Register<Biome> event) {
    event.getRegistry().registerAll(
            ModBiomes.soul_sand_valley = new SoulSandValley(),
            ModBiomes.warped_forest = new WarpedForest()
    );

    ModBiomes.registerBiomes();
}

 

This is the ModBiomes class

package com.abdmoh.enderium.init;

import net.minecraft.world.biome.Biome;
import net.minecraftforge.common.BiomeDictionary;
import net.minecraftforge.common.BiomeDictionary.Type;
import net.minecraftforge.common.BiomeManager;

public class ModBiomes {
    public static Biome soul_sand_valley;
    public static Biome warped_forest;

    public static void registerBiome(Biome biome, Type... types) {
        BiomeDictionary.addTypes(biome, types);
        BiomeManager.addSpawnBiome(biome);
    }

    public static void registerBiomes() {
        registerBiome(soul_sand_valley, Type.NETHER, Type.SPOOKY);
        registerBiome(warped_forest, Type.NETHER, Type.FOREST);
    }
}
  • Author

I got the biomes to spawn in the overworld using the code below

public static void registerBiome(Biome biome, BiomeType biomeType, Type... types) {
    BiomeDictionary.addTypes(biome, types);
    BiomeManager.addBiome(biomeType, new BiomeEntry(biome, 10));
    BiomeManager.addSpawnBiome(biome);
}

(I forgot to use BiomeManager.addBiome())

 

However I want the biomes to spawn in the nether.

I can't find any tutorials on this, and I prefer to not create a custom world type

Any ideas on how to do this?

  • Author

I have a question:

To make biomes in the nether, do I have to create a custom world type/new nether dimension?

 

Thanks

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.