Jump to content

[1.14.4] Nether biomes


abdmoh123

Recommended Posts

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
Link to comment
Share on other sites

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);
    }
}
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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