Earth2Java [FORGE]

Earth2Java [FORGE]

21.3k Downloads

[Feature request] Add support for modded biomes

calloatti opened this issue ยท 3 comments

commented

Target Version
Mod Loader: Fabric
Minecraft Version: 1.16.1

Tried using the mod with https://www.curseforge.com/minecraft/mc-mods/ecotones

No earth2java mobs spawn due to the config enumerating the biome names. ecotones has like 137 biomes.

Comments about some options on how to implement it in the Fabric Discord: https://discord.com/channels/507304429255393322/608088354042544139/739256784505798708

"support biome types, for instance"

commented

Best option i could come up with that wouldnt probably cause false positives (and thus require a blacklist...which is a necessity anyway) is to scan the spawn entries for each biome, if a related animal exists, add your animal to the spawn list.

        Registry.BIOME.forEach(biome -> {
            if (biome.getEntitySpawnList(SpawnGroup.CREATURE).stream().anyMatch(entry->entry.type.equals(EntityType.COW))) {
                biome.getEntitySpawnList(SpawnGroup.CREATURE).add(new Biome.SpawnEntry(COWBLOOM,100,2,4));
            }
        });

something like this (probably not functional code, was ripped from another project)
dont forget the registry added callback too :)

commented

A support for biome category is under development and will be released on the next days. Will work the same way as the forge counterpart.

commented

The idea around that system was to have the user free to have any creature in the biome the user want.
Having a cow, for example, spawn where the vanilla cow is, is a good idea but what about Wooly Cow? Is a creature that live only on cold biomes. Or the Cluckshroom, that live in mushroom fields only.
As for the default config I'm trying to keep the base biome found in MCE(Plains, Desert and so on) and expand the options keeping cold to cold, hot to hot, and so on.
Enhancing the current way with the addition of Biome Categories is a good solution to have the user free to choose where to place the creature and have the compatibility with other mods.
The configuration will change to use categories by default.