Changelog¶
All notable changes to LeafTreeGen are documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased¶
1.0.0 - Unreleased¶
Added¶
- Unified single-jar multi-loader distribution & shared common-API integration (
LeafTreeGen-1.0.0.jar): - A single jar runs on Paper, Folia, Fabric (
26.1.x), and NeoForge (26.1.x), built on:server-api(ServerAccessor,WorldEventHook,TaggedItemSpec,BlockPos3i,BookMenuSpec),:commands-api,:effects-api,:yaml-api(RtpYamlConfig),:predict-api(UnitCurve,PolarCurve,PerlinNoise,DistributionSampler,BudgetPacer,EwmaEstimator), and:anvil-api(io.github.dailystruggle.anvil.Nbt) alongside the shared platform carriers (:bukkit:bukkit-common,:fabric:fabric-common-unobf,:neoforge:neoforge-common,:neoforge:neoforge-v26_1_R1). - Added
datapack.generatetoggle inconfig.yml(TreeGenConfig#needsDatapack) to allow disabling worldgen datapack emission independently ofgeneration-mode. - Added weighted
secondary_leaveslists (TreeSpecies.WeightedLeaf&secondaryLeafList), canopystart_anglecone-cutoff and verticalsquishshaping, branch-layer leaf offsets withleaf_start_up, andNOISEvalue-noise curve shaping inProceduralGenerator. - Added programmatic storefront banners, 24-cell clean-boot benchmark matrix (
Paper 26.2,Folia 26.2,NeoForge 26.1.2,Fabric 26.1.2across.mca/.lcaandNONE/DATAPACK/PROCEDURAL), and architecture/verification infographics (docs/assets/leaftreegen-*.{png,svg}). - Staged tree growth (
GrowthManager&GrowthPlanner): Planted saplings and replaced vanilla saplings can grow incrementally from the base upward across horizontal-reach tiers (growth.default-time,growth.min-stages,growth.max-stages, and per-speciesgrowthoverrides): - Pre-flight footprint checks cancel growth cleanly when the trunk or canopy is obstructed by non-replaceable blocks.
- Mid-growth obstruction checks stop remaining stages if blocks are placed into the upper footprint while a tree is growing.
- Breaking a placed log of an in-progress tree cancels remaining growth stages (
TreeFarmStore). - Active growth jobs persist to chunk data and resume automatically when chunks reload.
- Spawn-by-chunk slicing, storage-agnostic saved-chunk RMW & stateless halo generation (
SegmentedTreeModel,TreeModel,ProceduralGenerator,TreeGenEventController,RegionFileResolver): sliceForChunk,placeChunkSlice,partitionByChunk,touchedChunks, andintersectsChunkclip any tree model to a single[0..15, 0..15]chunk slice while preserving wood-first, leaf-distance-ascending placement order.ProceduralGenerator.sampleChunkHaloandgenerateChunkHalolet world generators evaluate and stamp partial tree slices per chunk in any generation order without touching neighbouring chunks.TreeGenEventController#onChunkLoadevaluates procedural trees originating in(chunkX, chunkZ)immediately on first load (no40-tick unload race), completes both incoming and outgoing overhangs against pre-existing adjacent chunks across chunk and.lca/.mcaregion boundaries (completeAdjacentPreexistingChunkTrees), and routes overhanging canopy slices viaplaceOrDeferChunkBlocks: writing directly to live chunks when loaded, retroactively patching already-saved chunks on disk through:anvil-api's storage-agnosticRegionFileResolver.patchChunkBlocks(RegionFileReader#patchChunkBlocksacross.lcaand.mca), or deferring ungenerated neighbor chunks inpendingChunkSlicesuntilonChunkLoad(S-005).- Expanded
/leaftreeCommandsAPIcommand tree, variant pinning & interactive chat chips (LeafTreeGenCommand,LeafTreeGenCommandTest): /leaftree generate species=<id> [world=<name>] [x=<~|n>] [y=<~|n>] [z=<~|n>]supports explicit world and relative (~/~n) or absolute coordinates in addition to cursor ray-trace targeting./leaftree give species=<id> [player=<name>] [amount=<1..64>] [variant=<key>]supports explicit variant pinning and dynamic tab completion across baked.nbtstructure templates, procedural tiers, group-species child definitions (availableVariantsFor), and online players across Paper, Folia, Fabric, and NeoForge./leaftree debugprints active generation mode, loaded worlds, and per-species biome/worldgen/replacement status./leaftree stats [reset=<true|false>]reports and resets lock-freeTreeBlockBatchertick-budget and chunk-load window telemetry (recordChunkLoad,totalChunksLoaded,totalNewChunksGenerated,chunkLoadWindowNanos,totalCompletionWindowNanos,BudgetPacer+EwmaEstimator).- Added clickable
BookMenuSpecaction chips ([List],[Stats],[Debug],[Reload],[Give Sapling],[Generate Here],[Reset Stats]) across/leaftree,/leaftree list,/leaftree debug, and/leaftree stats. - Added
LeafTreeGenCommandTestverifying pureCommandsAPIdispatch, tab completion, strict parameter validation, and clickable chip execution (88tests across10verification suites). - Fabric sapling growth mixin (
TreeGrowerMixin,leaf_treegen.mixins.json): - Added
TreeGrowerMixininterceptingTreeGrower#growTreeon Fabric so natural random-tick and bonemeal sapling growth firesFabricModServerAccessor#onTreeGrowand triggers custom tree replacement.
Changed¶
- Platform-neutral runtime architecture (
LeafTreeGenRuntime&TreeGenEventController): Moved all event handling (onPlayerInteractBlock,onSaplingGrow,onBlockBreak,onLeavesDecay,onChunkLoad), custom sapling item tagging (SaplingItem/TaggedItemSpec), adaptive multi-tick block batching (TreeBlockBatcher), and command registration intotreegen-common, reducingtreegen-paper,treegen-fabric, andtreegen-neoforgeto loader entry points only. - Shared curve, noise, and sampling math (
predict-api): Routed procedural trunk/canopy shaping, 3D Perlin noise, 6-connected line/branch tracing, spheroid/ellipsoid envelopes, weighted variant pools, and structure-grid sampling throughUnitCurve,PolarCurve,PerlinNoise, andDistributionSampler. - Automatic datapack cleanup when disabled (
DatapackGenerator#removeIfPresent,LeafTreeGenRuntime): Switchinggeneration-modetoNONEorPROCEDURAL(or settingdatapack.generate: false) now automatically removes any previously generateddatapacks/<pack-name>/directory during bootstrap (bootstrapDatapacks), startup (generateDatapacks), and/leaftree reload. - Optional custom biome tags & Minecraft
26.xpack format range (DatapackGeneratorformatv4): Marked non-vanilla custom biome entries (such asleaf:*) as optional ("required": false) in#has_structurebiome tags so generated datapacks load cleanly on vanilla servers without external biome datapacks, and updatedpack.mcmeta(pack_format: 71,supported_formats: [61, 81],min_format: 61,max_format: 999). - Automatic
sapling-iteminference & group-species variant resolution (TreeRegistry):TreeRegistry#inferSaplingItemnow infers the matching vanilla sapling item from procedural trunk/leaf/profile definitions whensapling-itemis omitted in species JSON, andTreeRegistry#variantsForresolves baked.nbtvariants across weighted child species for group placements. - Wood-first placement ordering for Nether/fungi stems (
SegmentedTreeModel,GrowthPlanner): Includedhyphaealongside_log,_wood, and_stemblocks in wood-first placement and cut-tree detection so crimson/warped hyphae structures place trunks before leaves and cancel staged growth cleanly when broken. - Group-species sapling drop resolution (
SaplingDropResolver):resolveByBiome,leafBlocksOf,estimateCanopyRadius, andestimateHeightnow traverse weighted child species inside group placements (such asmeadow->oak-small-mid+meadow-azalea) so breaking primary, secondary, or underside leaves in group biomes drops the matching custom sapling. - Vanilla-feature tree placement now rejects placements over water via a
surface_water_depth_filter(max water depth0), in addition to the solid-ground check, so trees do not spawn on oceans, rivers, or swamps unlessallow_wateris enabled for the species.
Fixed¶
- Fixed structure-placed
feature_pool_elementplaced_featuregeneration inDatapackGenerator#writeFeaturePoolby omittingminecraft:biome(BiomeFilter) from jigsaw-referenced placed features (preventing vanilla"Tried to biome check an unregistered feature"errors during structure post-processing) and expanded vanilla tree suppression targets (writeSuppression). - Fixed
DatapackGenerator.bakeAndCollectElementsso species with namedtreeDefinitionsno longer duplicate fallbackvariantsentries into the same jigsawtemplate_pool. - Fixed
TreeGenEventController#onChunkLoadandonSaplingGrowto support explicit.nbtvariant placement when a species has no inline procedural generator and to sample center/exact biome checks inside the delayed chunk task after confirming the chunk remains loaded. - Fixed vanilla saplings failing to grow from bonemeal or natural random ticks when
replace-vanilla: truewas enabled: suppression now only intercepts saplings whose wood family and biome match an active species withreplace_vanillaenabled, skipsfeature-trees-only species, and restores the sapling block if custom placement cannot proceed. - Fixed custom sapling planting failing with
"No tree templates available."forfeature-treesspecies (forest,birch-forest,taiga,jungle,old-growth-pine-taiga) and whengeneration-mode: PROCEDURALis configured by falling back toProceduralGeneratorand resolving group child variants inTreeRegistry.variantsForandSaplingDropResolver. - Fixed multiface
trunk_surfacedecorators (minecraft:glow_lichen,minecraft:vine,sculk_vein,resin_clump) emitting and rotating valid[<face>=true]block states instead of invalid[facing=...]properties. - Fixed synchronous chunk-loading hazards (
S-005) and Folia region-thread ownership checks when reading or writing chunk persistent data across chunk boundaries, and resolvedBiome,Material, andTreeTypekeys viaorg.bukkit.Keyedto preventIncompatibleClassChangeErroron Paper and Folia1.21.4+. - Fixed
/leaftree reloadto checkneedsDatapack()(coveringsuppressionOnlyconfigurations) and trigger datapack regeneration across Paper, Folia, Fabric, and NeoForge. - Fixed
treegen-pluginshaded jar packaging (build.gradle) to bundle:effects-apiplatform carriers and:neoforge:neoforge-commonwhile excluding unusedMETA-INF/services/io.github.dailystruggle.rtp.**providers. - Trees no longer spawn on top of other trees: the generated ground-check predicate now rejects placements supported by
#minecraft:logsor#minecraft:leavesblocks soWORLD_SURFACE_WGcannot stack a tree onto an existing trunk or canopy. - The
.leaf-treegen.sha256datapack fingerprint now includesDATAPACK_FORMAT_VERSION, forcing a one-time datapack regeneration when upgrading across generator-format changes even ifconfig.ymland species files are unchanged.
0.1.0 - 2026-06-12¶
Initial release.
Added¶
- Procedural tree engine that generates trees in Java from per-species parameters (height, trunk shape, lean angle, canopy layers), with no pre-baked NBT files required.
- Biome-matched species, including savanna acacias, dark-forest canopies, glacier pines, cherry groves, spiral-crown forests, and rainbow groves, each assigned to the biomes they fit.
- Jigsaw worldgen integration: a vanilla worldgen datapack is generated on first load so Minecraft's structure system handles placement.
- Plantable saplings via
/leaftree give, delivered as NBT-tagged items that grow into a random variant of the species when planted in a valid biome. - Commands:
/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.- Admin commands gated behind the
leaftreegen.adminpermission node. - Server-friendly placement: multi-block tree placement is timeboxed against a per-tick budget rather than run inline, so large trees do not stall the main thread.
- Configuration via JSON species files in the
species/folder, with biome assignments and placement tuning (spacing, separation, salt) inconfig.yml, overridable per-species. - Generation modes:
DATAPACK,PROCEDURAL,BOTH, andNONE. - Platform support for Paper (and compatible Folia builds), Fabric, and NeoForge.