Mods / Climate Specific Trees

Tags:
Utility Other QoL Tweak
Authors:
captanredbeard, AgeofSeraphs
Side:
Both
Created:
Nov 24th 2025 at 4:05 AM
Last modified:
Nov 24th 2025 at 5:26 AM
Downloads:
421
Latest release (for Vintage Story 1.20.10, 1.20.11 - 1.20.12, 1.21.0, 1.21.1 and 1.21.2 - 1.21.5, outdated):
treerestrict_1.0.0.zip  1-click install

Climate Specific Trees alters and extends the growing times of saplings to promote growing trees in the biomes they generate in throughout the world. It's intended for hardcore playthroughs, for those that want to build wooden houses from the trees located in their home biome, and for multiplayer servers wanting to promote trade of different wood types between regions.

I got tired of players buying seeds for cold-weather trees or tropical biome trees, and then never buying wood again because they could mass-farm trees of a breed completely outside its home climate near their town. Currently the mod is set up to linearly multiply the current growing times based upon how far the annual climate in that region is compared to where that tree type generates in new chunks. In the future I plan to expand upon this premise and separate which subtypes of trees will grow in each climate based upon where the sapling is placed.

I'm looking for assistance in finishing this mod and getting it out of an alpha state. If you can help in adding a logarithmic function to growth and input on the default config, Ping me in discord or the comments.

Current issues.

The server config is a bit unbalanced still, for this reason the client setting enabling debug mod is on by default. Please tweak the values to a state you find reasonable and report back either in the comments or post an issue in the github here. https://github.com/Age-of-Seraphs/TreeRestrict/issues

 

I need to implement a logarithmic function here and add config to precicely control how quickly the added growth ramps up and levels out for trees outside of their native biomes.

 

Roadmap

I plan to add an additional feature to allow for growing the exact shrubs and trees native to a climate based on what tree time is closest to native to that region.

For example, there are several birch tree types, Silver Birch, Himilayian Birch, River Birch, and Dwarf Birch. I want to add the ability for the game to find the closest tree subtype native to the climate a birch sapling is placed in, and when the sapling grows it places that tree instead of a Silver Birch every single time.

Compatability support for other mod authors to easily add Climate Specific Trees functionality to their mods via JSON. (Currently only the floral zones suite has support.)

 

Config Options

Client Config:

debugmode : (turns debug info on or off)

 

Server Config:

current instructions for the server config here.

 

Thanks to sadboigravy for the snazzy mod logo.

Mod Version Mod IdentifierFor Game version Downloads Released Changelog Download 1-click mod install*
1.0.0 treerestrict
1.20.11 - 1.20.12 1.21.2 - 1.21.5
421 Nov 24th 2025 at 5:26 AM treerestrict_1.0.0.zip 1-click install

Inital Release.

- I need config suggestions, and help with writing a better function.


5 Comments (oldest first | newest first) (threaded | flat)

Bobber, Feb 16th at 11:21 AM

Maybe planted seeds can have a "will not grow" message, but you can recover the seed by breaking the soil block.

Saplings can instead have the reduced growth multiplier for climates that aren't too far off and a "will wither in x amount" timer for really bad climates

captanredbeard , Feb 15th at 5:27 PM

Maoman Thanks, I'll try and take the time to implement this shortly.

 

Bobber It's planned for the future, but I haven't gotten there yet. I need to decide on how to convey this information to players ingame, and whether something like transplanting small saplings in order to grow in more out of climate areas should be possible to do.

Bobber, Feb 10th at 12:25 PM

Nice mod. Would it be possible to outright kill saplings if the climate is too far off their native temperature?

Maoman, Feb 10th at 11:11 AM

>I need to implement a logarithmic function here and add config to precicely control how quickly the added growth ramps up and levels out for trees outside of their native biomes.
Try this:

public override void OnBlockPlaced(ItemStack byItemStack = null)
{
    stage = ((!(byItemStack?.Collectible is ItemTreeSeed)) ? EnumTreeGrowthStage.Sapling : EnumTreeGrowthStage.Seed);
    plantedFromSeed = stage == EnumTreeGrowthStage.Seed;

    // Generate a random base value between 0 and 1 (inclusive-exclusive)
    float raw = GameMath.Clamp(nextStageDaysRnd.nextFloat(1f, Api.World.Rand), 0.001f, 0.999f);

    // Logarithmic growth modifier:
    // As raw approaches 1, growth approaches max days.
    // As raw approaches 0, growth gets very short.
    float logBase = modConfig.LogGrowthRate;  // e.g., 2 for log2 scaling
    float maxDays = modConfig.MaxGrowthDays;  // e.g., 30 days

    // Map [0.001, 0.999] -> [0, 1] non-linearly using log
    float growthFactor = (float)(Math.Log(raw, logBase) / Math.Log(0.001f, logBase));
    float growthDays = maxDays * growthFactor;

    totalHoursTillGrowth = Api.World.Calendar.TotalHours + (growthDays * 24f * GrowthRateMod * GrowthRateModClimate);
}
YangWenLi, Nov 25th 2025 at 2:56 AM

Fantastic mod!