LeafTreeGen
通过原版世界生成系统生成的程序化、生物群系感知的自定义树木。
LeafTreeGen 添加了数十种自定义树种。这些树木在 JSON 中进行了数学定义,并在启动时烘焙为原版的 .nbt 结构模板,随后添加到拼图(jigsaw)模板池中,由游戏自身的 Worldgen 处理放置。无需运行时区块放置监听器。
本作是基于我最初为个人 Iris 世界编写的 Python 代码而开发的跨平台实用工具,使用了 .iob 文件。Iris 在其最新版本中也采用了我的程序化引擎。
我对它进行了重构,使其可以选择仅运行一次以生成数据包(基于 .nbt),或者保留其管理程序化生成和自定义树苗的功能。
截图
Cherry Grove Giant - 一棵高耸的樱花巨人锚定在其匹配的群系中,下方是一片较小的樱花树林。
Dark forest canopy - 从树冠上方俯瞰,密集重叠的高层树冠间散布着巨大的蘑菇。
Dark Forest Mushroom。
Custom savanna trees。
Christmas Tree - 所有树木均可通过带有 NBT 标签的树苗进行放置。
功能
- 匹配生物群系的物种 - 金合欢(草原)、深色森林树冠、冰川松、樱桃林、螺旋皇冠森林和彩虹林地,均映射到适合它们的群系
- 程序化引擎 - 使用 Java 根据每个物种的参数构建树木:高度、树干形状、倾斜角度和树冠层
- 拼图世界生成 - 插件在首次加载时写入一个原版世界生成的数据包,并利用 Minecraft 的结构系统来放置树木
- 可种植的树苗 -
/leaftree give 提供带有 NBT 标签的树苗,当种植在有效的生物群系中时,会长成随机的变体
- 重载命令 -
/leaftree reload 重新烘焙所有变体并重新生成数据包
- 对服务器友好的放置 - 大型树木在多个刻内分批次放置,受每刻预算限制,以保持主线程响应灵敏
- 多平台支持 - 一个 jar 包可在 Paper、Folia、Fabric 和 NeoForge 上运行,具备相同的功能(世界生成、树苗和
/leaftree 命令),适用于所有平台
物种亮点
| 类别 |
示例 |
| 温带 |
森林、白桦林、老白桦林、枫桦巨人、Ashwood |
| 热带 |
丛林、樱桃林、Jacaranda Grove |
| 寒冷 |
针叶林、老生长针叶林、Glacier Pine |
| 黑暗与奇异 |
Dark Forest Giants、Spiral-Crown Forest、Rainbow Grove、Glowcap |
完整生物群系树木映射
| 生物群系 |
物种 |
标志性形态 |
作用 |
forest |
forest |
圆润橡树,中到大 |
主要 |
flower_forest |
oak-small-mid |
零星分布的小到中圆润橡树 |
主要 |
plains |
oak-small-mid |
稀疏的小到中橡树 |
主要 |
meadow |
oak-small-mid |
稀疏的小到中橡树 |
主要 |
meadow |
meadow-azalea |
带有杜鹃花冠的小型橡树树干 |
点缀装饰 |
meadow |
rainbow-grove |
带有多种色调树冠的白桦树干 |
稀有地标 |
dark_forest |
glowcap |
发光的棕色蘑菇灌木 |
下层植被 |
dark_forest |
dark-forest-floor-lights |
微小的菌光体发光蘑菇 |
地面散落物 |
dark_forest |
dark-forest-mids |
小到中等大小的扭曲深色橡树 |
中层植被 |
dark_forest |
dark-forest-megas |
拥有巨大树冠的泰坦级深色橡树 |
树冠层 |
birch_forest |
birch-forest |
高大纤细的白色白桦树 |
主要 |
old_growth_birch_forest |
old-growth-birch-forest |
高耸的古生代白桦林 |
主要 |
old_growth_birch_forest |
maple-birch-giants |
巨大的枫桦混合地标 |
稀有地标 |
taiga |
taiga |
圆锥形云杉 |
主要 |
snowy_taiga |
evergreen |
覆雪的圆锥形云杉 |
主要 |
snowy_taiga |
christmas-tree |
装饰有饰品的节日风格云杉 |
极稀有地标 |
old_growth_pine_taiga |
old-growth-pine-taiga |
高大无枝干的松树 |
主要 |
old_growth_spruce_taiga |
old-growth-pine-taiga |
高大无枝干的松树 |
主要 |
snowy_plains |
glacierpine |
挂满霜雪、尖端带冰柱的云杉 |
主要 |
ice_spikes |
glacierpine |
挂满霜雪、尖端带冰柱的云杉 |
主要 |
grove |
glacierpine |
挂满霜雪、尖端带冰柱的云杉 |
主要 |
snowy_slopes |
glacierpine |
挂满霜雪、尖端带冰柱的云杉 |
稀疏 |
frozen_peaks |
glacierpine |
挂满霜雪、尖端带冰柱的云杉 |
稀疏 |
jagged_peaks |
glacierpine |
挂满霜雪、尖端带冰柱的云杉 |
稀疏 |
jungle |
jungle |
丛林树木,小到大 |
主要 |
sparse_jungle |
jungle |
丛林树木,小到大 |
主要 |
bamboo_jungle |
bamboo-jungle |
被竹子环绕的丛林树木 |
主要 |
savanna |
savanna |
平顶倾斜的金合欢 |
主要 |
savanna_plateau |
savanna |
平顶倾斜的金合欢 |
主要 |
windswept_savanna |
savanna |
平顶倾斜的金合欢 |
主要 |
cherry_grove |
cherry-grove |
分层粉色花冠 |
主要 |
cherry_grove |
jacaranda-grove |
巨大的垂泪樱桃木蓝花楹 |
稀有地标 |
windswept_hills |
ashwood |
苍白枯死的灰暗橡木,缠绕蛛网 |
主要 |
windswept_forest |
ashwood |
苍白枯死的灰暗橡木,缠绕蛛网 |
主要 |
windswept_gravelly_hills |
ashwood |
苍白枯死的灰暗橡木,缠绕蛛网 |
主要 |
swamp |
swamp |
藤蔓覆盖的垂泪橡树 + 红树林 |
主要 |
mangrove_swamp |
swamp |
藤蔓覆盖的垂泪橡树 + 红树林 |
主要 |
命令
| 命令 |
描述 |
/leaftree generate species=<id> |
在光标处放置一棵树(管理员测试) |
/leaftree give species=<id> [player] [amount] |
发放自定义树苗 |
/leaftree list [species=<id>] |
列出已注册的物种或变体 |
/leaftree reload |
应用配置更改并重新生成数据包 |
需要 leaftreegen.admin 权限节点。
配置
物种在 species/ 文件夹中以 JSON 文件定义。生物群系分配和放置调整(间距、分离度、盐值)位于 config.yml 中,并支持针对每个物种的覆盖设置。
generation-mode: DATAPACK # DATAPACK | PROCEDURAL | BOTH | NONE
placement:
glacierpine:
spacing: 6
separation: 3
biomes:
- minecraft:snowy_taiga
- minecraft:grove
{
"name": "glacierpine",
"procedural": {
"trunk-block": "minecraft:spruce_log",
"leaf-block": "minecraft:spruce_leaves",
"height-min": 10,
"height-max": 18,
"trunk-shape": "LINEAR",
"canopy": [
{ "yOffset": 0, "radius": 4 },
{ "yOffset": 3, "radius": 3 },
{ "yOffset": 6, "radius": 2 }
]
}
}
依赖要求
- Java 25+
- 以下之一:
- Paper 或 Folia 1.21+
- Fabric 26.1+ (Fabric Loader 0.18.4+, Fabric API)
- NeoForge 26.1+
LeafTreeGen
Procedural, biome-aware custom trees that generate through vanilla worldgen.
LeafTreeGen adds dozens of custom tree species. Trees are mathematically defined in JSON and baked into vanilla .nbt structure templates at startup, then added to jigsaw template pools so the game's own worldgen handles placement. No runtime block-placement listeners.
Made as a cross-platform utility based on the Python code I originally wrote for my personal Iris world using .iob files. Iris now adopts my procedural engine in its latest builds.
I've reworked it so you can optionally run it once for datapack (.nbt-based) generation, or keep it around for its ability to manage procedural generation and custom saplings.
Screenshots
Cherry Grove Giant - a towering cherry-blossom giant anchors its matching biome above a grove of smaller cherry trees.
Dark forest canopy - dense overlapping high canopies with scattered giant mushrooms, viewed from above the treeline.
Dark Forest Mushroom.
Custom savanna trees.
Christmas Tree - all trees are placeable via NBT-tagged saplings.
Features
- Biome-matched species - savanna acacias, dark-forest canopies, glacier pines, cherry groves, spiral-crown forests, and rainbow groves, mapped to the biomes they suit
- Procedural engine - trees are built in Java from per-species parameters: height, trunk shape, lean angle, and canopy layers
- Jigsaw worldgen - the plugin writes a vanilla worldgen datapack on first load and lets Minecraft's structure system place the trees
- Plantable saplings -
/leaftree give hands out NBT-tagged saplings that grow into a random variant when planted in a valid biome
- Reload command -
/leaftree reload rebakes all variants and regenerates the datapack
- Server-friendly placement - large trees are placed across multiple ticks under a per-tick budget to keep the main thread responsive
- Multi-platform - one jar runs on Paper, Folia, Fabric, and NeoForge with the same features (worldgen, saplings, and the
/leaftree command) everywhere
Species Highlights
| Category |
Examples |
| Temperate |
Forest, Birch Forest, Old-Growth Birch, Maple-Birch Giants, Ashwood |
| Tropical |
Jungle, Cherry Grove, Jacaranda Grove |
| Cold |
Taiga, Old-Growth Pine Taiga, Glacier Pine |
| Dark & Exotic |
Dark Forest Giants, Spiral-Crown Forest, Rainbow Grove, Glowcap |
Full biome tree map
| Biome |
Species |
Iconic shape |
Role |
forest |
forest |
Rounded oak, mid to large |
Primary |
flower_forest |
oak-small-mid |
Small-to-mid rounded oak, sporadic |
Primary |
plains |
oak-small-mid |
Sparse small-to-mid oak |
Primary |
meadow |
oak-small-mid |
Sparse small-to-mid oak |
Primary |
meadow |
meadow-azalea |
Small oak trunk with azalea crown |
Sprinkled accent |
meadow |
rainbow-grove |
Birch trunk with multi-hue canopy |
Rare landmark |
dark_forest |
glowcap |
Lit brown-mushroom shrub |
Understory |
dark_forest |
dark-forest-floor-lights |
Tiny shroomlight glow shrooms |
Floor litter |
dark_forest |
dark-forest-mids |
Small-to-medium twisted dark oak |
Midstory |
dark_forest |
dark-forest-megas |
Titan dark oak with massive canopy |
Canopy |
birch_forest |
birch-forest |
Tall slender white birch |
Primary |
old_growth_birch_forest |
old-growth-birch-forest |
Towering old-growth birch |
Primary |
old_growth_birch_forest |
maple-birch-giants |
Giant maple-and-birch landmark |
Rare landmark |
taiga |
taiga |
Conical spruce |
Primary |
snowy_taiga |
evergreen |
Snow-dusted conical spruce |
Primary |
snowy_taiga |
christmas-tree |
Festive decorated spruce with ornaments |
Very rare landmark |
old_growth_pine_taiga |
old-growth-pine-taiga |
Tall bare-trunked pine |
Primary |
old_growth_spruce_taiga |
old-growth-pine-taiga |
Tall bare-trunked pine |
Primary |
snowy_plains |
glacierpine |
Frost-laden spruce with icicle tips |
Primary |
ice_spikes |
glacierpine |
Frost-laden spruce with icicle tips |
Primary |
grove |
glacierpine |
Frost-laden spruce with icicle tips |
Primary |
snowy_slopes |
glacierpine |
Frost-laden spruce with icicle tips |
Sparse |
frozen_peaks |
glacierpine |
Frost-laden spruce with icicle tips |
Sparse |
jagged_peaks |
glacierpine |
Frost-laden spruce with icicle tips |
Sparse |
jungle |
jungle |
Jungle trees, small to giant |
Primary |
sparse_jungle |
jungle |
Jungle trees, small to giant |
Primary |
bamboo_jungle |
bamboo-jungle |
Jungle trees ringed by bamboo |
Primary |
savanna |
savanna |
Flat-topped leaning acacia |
Primary |
savanna_plateau |
savanna |
Flat-topped leaning acacia |
Primary |
windswept_savanna |
savanna |
Flat-topped leaning acacia |
Primary |
cherry_grove |
cherry-grove |
Layered pink blossom crown |
Primary |
cherry_grove |
jacaranda-grove |
Giant weeping cherry-wood jacaranda |
Rare landmark |
windswept_hills |
ashwood |
Gaunt gray dead pale-oak with cobwebs |
Primary |
windswept_forest |
ashwood |
Gaunt gray dead pale-oak with cobwebs |
Primary |
windswept_gravelly_hills |
ashwood |
Gaunt gray dead pale-oak with cobwebs |
Primary |
swamp |
swamp |
Vine-draped weeping oak + mangrove |
Primary |
mangrove_swamp |
swamp |
Vine-draped weeping oak + mangrove |
Primary |
Commands
| Command |
Description |
/leaftree generate species=<id> |
Place a tree at your cursor (admin test) |
/leaftree give species=<id> [player] [amount] |
Hand out custom saplings |
/leaftree list [species=<id>] |
List registered species or variants |
/leaftree reload |
Apply config changes and regenerate the datapack |
Requires the leaftreegen.admin permission node.
Configuration
Species are defined as JSON files in the species/ folder. Biome assignments and placement tuning (spacing, separation, salt) live in config.yml, with per-species overrides.
generation-mode: DATAPACK # DATAPACK | PROCEDURAL | BOTH | NONE
placement:
glacierpine:
spacing: 6
separation: 3
biomes:
- minecraft:snowy_taiga
- minecraft:grove
{
"name": "glacierpine",
"procedural": {
"trunk-block": "minecraft:spruce_log",
"leaf-block": "minecraft:spruce_leaves",
"height-min": 10,
"height-max": 18,
"trunk-shape": "LINEAR",
"canopy": [
{ "yOffset": 0, "radius": 4 },
{ "yOffset": 3, "radius": 3 },
{ "yOffset": 6, "radius": 2 }
]
}
}
Requirements
- Java 25+
- One of:
- Paper or Folia 1.21+
- Fabric 26.1+ (Fabric Loader 0.18.4+, Fabric API)
- NeoForge 26.1+
评论 0
登录后参与评分
还没有评论,来抢沙发吧