Jump to content

Recommended Posts

Posted

So, I am tring to generate a new Biome. I walk in Minecraft a lot, but I never get to see it. Is there a way to increase frequency?

 

I have this:

 

EventSubscriber.java:

@EventBusSubscriber(modid = SiuddMod.ID, bus = EventBusSubscriber.Bus.MOD)
public class EventSubscriber
{
    @SubscribeEvent
    public static void registerBiomes(final RegistryEvent.Register<Biome> evt)
    {
        SiuddMod.LOGGER.debug("Entering Siudd Mod's register biome event");

        evt.getRegistry().registerAll(setName(new TherjonumEos(), "therjonum_eos"));
    }

    ...

    public static <T extends IForgeRegistryEntry<T>> T setName(final T entry, final String name)
    {
        entry.setRegistryName(new ResourceLocation(SiuddMod.ID, name));
        return entry;
    }
}

 

TherjonumEos.java:

public class TherjonumEos extends Biome
{
    public TherjonumEos()
    {
        super(properties());
        this.func_226711_a_(
            Feature.MINESHAFT
                .func_225566_b_(new MineshaftConfig(0.004D, MineshaftStructure.Type.NORMAL)));
        this.func_226711_a_(Feature.STRONGHOLD.func_225566_b_(IFeatureConfig.NO_FEATURE_CONFIG));
        DefaultBiomeFeatures.addCarvers(this);
        DefaultBiomeFeatures.addStructures(this);
        DefaultBiomeFeatures.addLakes(this);
        DefaultBiomeFeatures.addMonsterRooms(this);
        DefaultBiomeFeatures.func_222283_Y(this);
        DefaultBiomeFeatures.addStoneVariants(this);
        DefaultBiomeFeatures.addOres(this);
        DefaultBiomeFeatures.addSedimentDisks(this);
        DefaultBiomeFeatures.func_222299_R(this);
        this.addSpawn(
            EntityClassification.CREATURE,
            new Biome.SpawnListEntry(EntityType.SHEEP, 12, 4, 4));
        this.addSpawn(
            EntityClassification.CREATURE,
            new Biome.SpawnListEntry(EntityType.PIG, 10, 4, 4));
        this.addSpawn(
            EntityClassification.CREATURE,
            new Biome.SpawnListEntry(EntityType.CHICKEN, 10, 4, 4));
        this.addSpawn(
            EntityClassification.CREATURE,
            new Biome.SpawnListEntry(EntityType.COW, 8, 4, 4));
        this.addSpawn(
            EntityClassification.CREATURE,
            new Biome.SpawnListEntry(EntityType.HORSE, 5, 2, 6));
        this.addSpawn(
            EntityClassification.CREATURE,
            new Biome.SpawnListEntry(EntityType.DONKEY, 1, 1, 3));
        this.addSpawn(
            EntityClassification.AMBIENT,
            new Biome.SpawnListEntry(EntityType.BAT, 10, 8, 8));
        this.addSpawn(
            EntityClassification.MONSTER,
            new Biome.SpawnListEntry(EntityType.SPIDER, 100, 4, 4));
        this.addSpawn(
            EntityClassification.MONSTER,
            new Biome.SpawnListEntry(EntityType.ZOMBIE, 95, 4, 4));
        this.addSpawn(
            EntityClassification.MONSTER,
            new Biome.SpawnListEntry(EntityType.ZOMBIE_VILLAGER, 5, 1, 1));
        this.addSpawn(
            EntityClassification.MONSTER,
            new Biome.SpawnListEntry(EntityType.SKELETON, 100, 4, 4));
        this.addSpawn(
            EntityClassification.MONSTER,
            new Biome.SpawnListEntry(EntityType.CREEPER, 100, 4, 4));
        this.addSpawn(
            EntityClassification.MONSTER,
            new Biome.SpawnListEntry(EntityType.SLIME, 100, 4, 4));
        this.addSpawn(
            EntityClassification.MONSTER,
            new Biome.SpawnListEntry(EntityType.ENDERMAN, 10, 1, 4));
        this.addSpawn(
            EntityClassification.MONSTER,
            new Biome.SpawnListEntry(EntityType.WITCH, 5, 1, 1));
    }

    private static Biome.Builder properties()
    {
        SurfaceBuilderConfig surfaceBuilderConfig = new SurfaceBuilderConfig(
            Blocks.THERJON_RICH_GRASS.getDefaultState(),
            Blocks.THERJON_RICH_DIRT.getDefaultState(),
            Blocks.THERJON_RICH_DIRT.getDefaultState());
        ConfiguredSurfaceBuilder<SurfaceBuilderConfig> configuredSurfaceBuilder =
            new ConfiguredSurfaceBuilder<>(SurfaceBuilder.DEFAULT, surfaceBuilderConfig);
        return new Biome.Builder().category(Category.PLAINS)
            .surfaceBuilder(configuredSurfaceBuilder)
            .precipitation(RainType.RAIN)
            .waterColor(0x7D63C5)
            .waterFogColor(0x9E80EF)
            .depth(0.2f)
            .scale(0.01f)
            .temperature(0.5f)
            .downfall(0.1f)
            .parent(null);
    }
}

 

Posted (edited)

I believe there is a weight parameter when you add the biome to the BiomeManager, increasing that should theoretically make your biome appear more frequently.

 

*edit: what version is this for?

Edited by Ugdhar
Posted (edited)

Oh sorry, I forgot to say it's Minecraft 1.15.2

 

EDIT: hmmm it seems in this version there is no weight in Biome class.

Edited by brunoczim

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.