Proper Variant Spawns with Terrafirmacraft
BadAtCoding17 opened this issue ยท 2 comments
As part of my modpack, I'm replacing plenty of TFC mobs with mobs from this mod, because I think the models and animations are much nicer. Using a datapack I've managed to get the mods mostly integrated but I cannot figure out how to get mobs from this mod to spawn as the right species.
TFC doesn't use biomes to determine weather and temperature, so when a mob from this mod spawns, it often seems out of place or seems to be the wrong variant. Examples being things such as an Indian rhino spawning in all "tfc:mountains" biomes. when the same biome could be snowy or hot depending on its Z coordinates. Though that is intended behavior, it's wonky alongside TFC's climate system.
My question is, then, is it possible to make species/variants spawn according to TFC climate rather than biomes using a datapack?
Sorry for the long post, at my wits' end here
I am interested in this, since I do really like TFC
How does the current TFC define climate? What parameters would need to be added to make the proper variants spawn?
TFC climate is determined by two factors, average temperature and rainfall. Average temp differs from current temp and changes primarily with Z value, with small fluctuations on the X axis for randomness. Rainfall changes gradually in any direction, and also determines the soil blocks in a region.
Biomes in TFC now only determine the shape of the landscape, and the presence of boulders, bodies of water, volcanoes etc.
Flora and fauna spawns are all determined by this climate system. Each animal in TFC has a json file with something like
{ "climate": {
"min_temperature": -5,
"max_temperature": 25,
"min_rainfall": 10,
"max_rainfall": 500
}}
This determines within what climate the animal can spawn in. Perhaps something similar could be included within "spawnBiomes": [ ] in the json files for your mod's mobs.
I'm pretty new to pack making, but hopefully this could be of some help
Edit:
I realized I forgot the "forested" parameter which also impacts spawns. It's included with temp and rainfaill, and comes in 4 values. From least to most: "sparse", "edge", "normal", "old_growth". So exampleanimal.json could include
{ "climate": {
"min_temperature": -5,
"max_temperature": 25,
"min_rainfall": 10,
"max_rainfall": 500,
"min_forest": "edge",
"max_forest": "normal"
}}