Skip to content

A Port to NeoForge 1.21.1#18

Merged
supermassimo merged 12 commits intoDynamicTreesTeam:1.21.1from
Nacolla:1.21.1
Apr 29, 2026
Merged

A Port to NeoForge 1.21.1#18
supermassimo merged 12 commits intoDynamicTreesTeam:1.21.1from
Nacolla:1.21.1

Conversation

@Nacolla
Copy link
Copy Markdown
Contributor

@Nacolla Nacolla commented Jan 30, 2026

As Quark is pretty close to finally get its 1.21.1 NeoForge official release, I decided to make a port for the Dynamic Trees mod for it as well. How can you know that Quark is about to release to NeoForge and 1.21.1? You can install the source code and build it and be able to play the game on the very mentioned version... So, I made this port, just to get things ready!

Copy link
Copy Markdown

@copygirl copygirl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to compile this PR for myself, since I really want it in a private 1.21.1 modpack, so I did. Had to make some changes to get it to use the proper maven repository where Quark is hosted.

Additional notes:

  • Tested with full modpack, including Distant Horizons, Terralith and Tectonic.
  • Missing tool tags on branches? Trees take ages to cut with axe.
  • Trees spawn plenty! Does this mean this fixes #16?
  • Azalea trees still die with Terralith. (#15)

Comment thread build.gradle Outdated
Comment on lines +17 to +20
// Local libs
flatDir {
dirs 'libs'
}

This comment was marked as outdated.

Comment thread build.gradle Outdated
Comment on lines +71 to +73
// Quark (Local)
implementation files("../Quark-master/build/libs/Quark-4.1-472-SNAPSHOT.jar")
implementation files("../Quark-master/localjars/Zeta-1.1-36L.jar")

This comment was marked as outdated.

Comment thread gradle.properties Outdated
neoforge_loader_version_range=[4,)
minecraft_version_range=[1.21.1]

quark_version=4.1-472-SNAPSHOT

This comment was marked as outdated.

@Nacolla
Copy link
Copy Markdown
Contributor Author

Nacolla commented Apr 21, 2026

Thank you very much for the reply! I had pretty much forgotten about this lil port I did!

The trees taking ages to be cut is a bug I couldn't really have much of a grasp at the time! But I'll take a deeper look at it!

If you find any more bugs, please, do tell me!

I also haven't tested it with Terralith on the pack, I'll be looking onto the code of both for the possible cause.

- Restore flowering_azalea_leaves blockstate, azalea_sapling/seed models,
  azalea_seed.png, loot tables for azalea/flowering_azalea leaves and voluntary
  drops, and DT tag files (branches_that_burn, fungus_branches, leaves,
  saplings, seeds).
- Add DTQuarkBlockTagsProvider data provider scaffolding.
- Consolidate world_gen overrides into trees/dtquark/world_gen/default.json:
  cave_rooted dtquark:azalea in minecraft:lush_caves plus Terralith biome
  entries (blooming_valley 50/50, cave/underground_jungle 1:3,
  snowy_cherry_grove 1:5, lush_valley 1:6). Removed zdtquark namespace
  (pack-order suffices for override).
- Remove trees/dynamictrees/species/azalea.json override (broke bonemeal and
  caused pink/black seed texture by detaching item renderer from stale species
  data).
- Add data/minecraft/worldgen/configured_feature/moss_vegetation.json datapack
  override that swaps minecraft:azalea and minecraft:flowering_azalea entries
  for dtquark:azalea_sapling (validated in DT 1.6.0 bytecode that
  SAPLING_REPLACERS only fires on EntityPlaceEvent/BlockGrowFeatureEvent, so
  JSON-only in-tree-pack substitution is impossible during worldgen feature
  placement).
- Add processResources duplicatesStrategy EXCLUDE to resolve main/generated
  overlap.
- Calibrate azalea log drops: family loot_volume_multiplier=2.0 + custom
  branch loot tables (azalea, stripped_azalea) so adult trees no longer drop
  only sticks.
- Match Quark's blossom rarity exactly across vanilla biomes (frosty 200,
  serene 100, warm 100, sunny 200, fiery 30) and per-variant in Terralith
  biomes.
- Make Ancient (ashen) trees 1.5x rarer everywhere (vanilla forests 480-600,
  Terralith 480-900) since Quark itself doesn't spawn them naturally.
- Lush caves: add LushCavesAzaleaFeature (NeoForge biome_modifier +
  placed/configured feature) to spawn adult dtquark:azalea on cave-floor moss
  without poking DT's BiomeDatabase populator (avoids Species.reset() side
  effect that broke bonemeal globally).
- Disable Quark's native blossom spawning via
  CompoundBiomeConfig.fromBiomeTags(false) so dtquark trees don't compete
  with Quark's own.
- Remove leftover debug System.out.println block that dumped all dtquark
  blocks at startup.
- Tag fixes: stripped_branches_that_burn (block + blocks paths) and break
  the branches/branches_that_burn cycle that was emptying tags and making
  axes mine all DT trees at hand-speed.
- Strip Quark's quark:glow_shrooms / quark:glow_shrooms_extras from
  glimmering_weald so only dtquark:glow_shroom appears there.
@Nacolla
Copy link
Copy Markdown
Contributor Author

Nacolla commented Apr 25, 2026

Alright! This should do the trick with all bugs you've mentioned! Thank you once more for the pointers! Hope you like it!

@copygirl
Copy link
Copy Markdown

copygirl commented Apr 25, 2026

Some thoughts when reading the commit message:

swaps minecraft:azalea and minecraft:flowering_azalea entries for dtquark:azalea_sapling

Does this replace the natural azalea bushes in lush cave biomes with saplings? If so I'm a little worried what that's going to do to those caves. (Too many leaves to traverse.)

Make Ancient (ashen) trees 1.5x rarer everywhere (vanilla forests 480-600, Terralith 480-900) since Quark itself doesn't spawn them naturally.

Did the mod previously spawn these trees? They're supposed to be rare sniffer loot only, if I recall. In my opinion, it should stay a reward for going through that process as Quark intended.

I may take a peek at the changes and test things later.
The 7348 additions and 2549 removals are certainly scary.
Oh and you deleted the license.

@Nacolla
Copy link
Copy Markdown
Contributor Author

Nacolla commented Apr 25, 2026

Thank you for the reminder! I'll be adding the license shortly! This actually started as a custom port for a friend's modpack, which may also explain why there's a few folders that dont exist in this port such as the build kotlin file, that also may explain the ashen trees spawning, as they were probably one of the things I did and should NOT have kept on the PR. 💀

As I was doing the fixes I read the code for Quark and that did get me confused... I'll compare it with the original source code just in case.

Regarding the azaleas spawning as saplings that was something I was wondering if I should or not do... They're currently an inner datapack, I could finesse it better to make it into a config related thing, for example having a server side toml for enabling and disabling said feature, being false by default.

@Nacolla
Copy link
Copy Markdown
Contributor Author

Nacolla commented Apr 25, 2026

Once again, thank you for the pointers! Answering the question for the HUGE amount of files, the reason for that is most of it, roughly 40~50%, is a result of the runData command within gradle, so those are auto generated json files.

Following your pointers, I:

  • Removed the ashen world spawn entirely.
  • Made the vanilla azalea replacement a toggleable feature that is false by default.
  • Recovered the LICENSE, which although would be good to update it to 2026, I didn't touch it.

- Drop natural worldgen entries for dtquark:ancient (vanilla #minecraft:is_forest, #c:is_dense, and 11 Terralith biomes); the Ashen species itself stays available via the existing Sniffer loot modifier and sapling growth.
- Restore the MIT LICENSE at the repository root.
- Fix mod metadata: gradle.properties mod_group_id (com.maxhyper.dtquark) and mod_authors (supermassimo, Max Hyper); neoforge.mods.toml authors aligned to the same.
- Replace the static data/minecraft/worldgen/configured_feature/moss_vegetation.json override with a runtime, server-side toggle. New DTQuarkConfig (SERVER) exposes worldgen.replaceVanillaAzaleaWithSapling, defaulting to false (vanilla bushes preserved). When enabled, MossVegetationOverride mutates the live ConfiguredFeature holder at server start to swap both vanilla azalea bushes for dtquark:azalea_sapling at the combined vanilla weight (11), keeping moss_patch_bonemeal density unchanged. Adult azalea generation in lush_caves via cave_rooted is independent of this option.
- Clean up stale generated code.
@Nacolla
Copy link
Copy Markdown
Contributor Author

Nacolla commented Apr 26, 2026

Matter of fact, there was residual content from the 1.20.1 json paths, as its names have changed from 1.20.1 to 1.21.1, that... Also explained part of the huge amount of lines, part of it was already cleaned, but I'll recheck whats left + the correct path for each, remove the obsolete folders from 1.20.1, test it and maybe send another commit with the cleaning.

@supermassimo
Copy link
Copy Markdown
Member

I see the work youve been putting here, once you consider it ready @ me and I'll release it on curseforge and modrinth after review

@supermassimo supermassimo changed the base branch from 1.20.1 to 1.21.1 April 26, 2026 17:46
@Nacolla
Copy link
Copy Markdown
Contributor Author

Nacolla commented Apr 26, 2026

I'll just be adjusting the repo better to actually match the structure from 1.20.1.

Restoring the kotlin file.

I was still learning how to use github at the time, so I ended up just commiting a repo with a different build structure, therefore I apologize for the mess...

There's all but a few autogen deprecated jsons, those of which removal has already been staged.

One note regarding the Azaleas by the way! It's seed is now declared separate from DynamicTrees, not overriding it, so its essentially a new item, that solves the issues with DTTerralith for example, as they're now complete different trees essentially using different seeds.

I also made sure they actually grow on the caves.

Also added the common tags from NeoForge so the trumpet trees can also spawn on modded biomes without issues + accomodating the chances of specific trees to spawn based on their name and climate(that may require adjustments, but I tried to follow the original logic).

Also added cancellers that stop the slightest of chances from Quark's original glow shroom trees to still spawn on the Glimmering Weald.

Added a toggeable override to the serverside config for the azaleas within lush caves, having saplings appear instead of bushes. False by default. It's a silly feature, but if anyone end up wanting that, they're able to now.

@supermassimo
Copy link
Copy Markdown
Member

I feel like it should be obvious but please don't use AI to do these, the models have no idea about the existing dynamic trees infrastructure and it steps over everything.

If you wanted azaleas to generate inside the caves you can do so through existing dynamic trees functionality (default.json worldgen)

@Nacolla
Copy link
Copy Markdown
Contributor Author

Nacolla commented Apr 28, 2026

I did it at the very beginning for the jsons, which, yes... I'm ashamed of, and is also why I've been trying to clean everything up and should have done that at the very beginning, in the first place, before sending a PR.

I did also attempt to go through the default.json at first, but its as you mentioned, many of the old jsons were probably conflicting with one another.

As it also was a feature that had nothing to do with the main project, I shouldn't have kept that, even as a toggleable thing. So yes, as useless as it may be to say this, pardon.

@supermassimo
Copy link
Copy Markdown
Member

No shame in trying something new! I'm glad you are interested enough to have gotten involved, and I hope you continue doing so :)

@supermassimo supermassimo merged commit 728ca5c into DynamicTreesTeam:1.21.1 Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants