Skip to content

Minecraft 26.2 port (Fabric-first) — offered for adoption#1209

Draft
Arilas wants to merge 6 commits into
DynamicTreesTeam:develop/26.1.2from
Arilas:port/26.2
Draft

Minecraft 26.2 port (Fabric-first) — offered for adoption#1209
Arilas wants to merge 6 commits into
DynamicTreesTeam:develop/26.1.2from
Arilas:port/26.2

Conversation

@Arilas

@Arilas Arilas commented Jul 24, 2026

Copy link
Copy Markdown

Minecraft 26.2 port (Fabric-first) — offered for adoption

This is a working port of develop/26.1.2 to Minecraft 26.2, focused on the Fabric side. Opening as a draft against the newest development branch so the diff is browsable — happy for the team to pull it into a develop/26.2 branch, cherry-pick pieces, or use it as a reference. No expectation of merging as-is.

What's included

  • Toolchain: Gradle 9.5.1, Loom 1.17.17, ModDevGradle 2.0.142, NeoForm 26.2-2, Fabric Loader 0.19.3, Fabric API 0.155.2+26.2, ForgeConfigAPIPort 26.2.1.
  • Common migration for 26.2 vanilla changes: TagAppender single-generic (+ TagUtils ResourceKey helper), Tuple→DFU Pair, advancement predicates package move, EntityTypes/BlockEntityTypes constants, Vec3.atCenterOf, Minecraft.levelExtractor, record accessors for RandomFeatureConfiguration/WeightedPlacedFeature, removal of the deleted MethodsReturnNonnullByDefault package-info annotations.
  • Fabric client model layer rewritten for the relocated/redesigned renderer API (net.fabricmc.fabric.api.client.renderer.v1, BlockStateModel era): branch/roots/surface-root/creaking-heart/potted-sapling models implement FabricBlockStateModel#emitQuads; codecs registered for all 7 custom blockstate model types (mirroring the NeoForge RegisterBlockStateModels block); generated assets now ship in the fabric jar with blockstates dual-keyed "type"/"fabric:type" so one datagen output parses on both loaders; tint sources, sprite sources, and Forge Config API Port v5 wiring updated.
  • Fabric runtime fixes found by running the result in a ~90-mod production instance (Sodium/Iris/EMF/ETF/Continuity): eager block/item registration and the missing entity-data-serializer override (also filed independently against develop/26.1.2 as Fabric: register blocks/items eagerly and implement registerEntityDataSerializer via FabricEntityDataRegistry #1208), the Family branch-list bounds guard (Fix IndexOutOfBoundsException in Family branch accessors for families without a stripped branch #1207), deferred dendro-brewing cache (item components aren't bound at mod-init time on 26.2), Jade 26.2/Continuity 3.0.1/Serene Seasons 26.1.2.0.4 compat versions.

Verification

  • :fabric:build green; dedicated server boots with zero errors, all 23 species load; verified in a full production client instance (trees render and grow alongside Sodium+Iris).
  • :common:compileJava green under NeoForm 26.2. The :neoforge subproject is not ported/tested — this was a Fabric-first effort.
  • Known cosmetic gap: the Jade tooltip item-icon row stays disabled (same TODO as the NeoForge twin — Jade 26.x removed IElement/ElementHelper).

Branch also lives at https://github.com/Arilas/DynamicTrees/tree/port/26.2. Companion 26.2 ports of DT-BOP and DT-Terralith exist and are being offered on those repos. Happy to split this into smaller PRs, rebase onto a new branch, or answer questions.

🤖 Generated with Claude Code

Arilas and others added 4 commits July 24, 2026 20:24
- Gradle 9.5.1, Loom 1.17.17, ModDev 2.0.142, NeoForm 26.2-2, NeoForge 26.2.0.32-beta
- Fabric Loader 0.19.3, Fabric API 0.155.2+26.2, ForgeConfigAPIPort 26.2.1
- TagAppender single-generic migration (new TagUtils helper for ResourceKey lookup)
- Tuple->Pair, advancements predicates package move, EntityTypes/BlockEntityTypes,
  Vec3.atCenterOf, Minecraft.levelExtractor, record accessors for feature configs
- Removed obsolete MethodsReturnNonnullByDefault package-info files
- Fabric: declare Jade/Continuity/SereneSeasons 26.2 compat deps via Modrinth maven

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…at fixes

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…gistry, ship generated data, defer brewing recipe cache

Server smoke test passes with zero errors (23 species load).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…sets in jar

- Register Fabric CustomUnbakedBlockStateModel codecs for all DT model types
  (branch, roots, creaking_heart, surface_root, potted_dynamic_sapling,
  aerial_roots_soil, roots_moss), mirroring NeoForge's RegisterBlockStateModels.
  New fabric model/blockstate/* classes port the NeoForge unbaked models; potted
  sapling reads the species from the block entity instead of model data.
- Ship common/src/generated/resources in the fabric jar (blockstates, models,
  loot, ...) like the neoforge jar already did; vanilla-format blockstates for
  leaves/saplings/rooty soils now resolve.
- Dual-key the generated custom blockstates: Fabric dispatches custom block
  state models on "fabric:type" while NeoForge uses "type", so the JSONs now
  carry both. (A datagen rerun will drop "fabric:type" until the builders emit
  it - rerun the script or update the builders when regenerating.)
- Extract FabricDynamicBlockStateModel (mirror of NeoForge's
  DynamicBlockStateModel) and use it for all dynamic DT models; the renderer
  path does not depend on Indigo.
- Keep the after-bake model swap as a guarded fallback for add-on tree packs
  that still ship pre-26.2 assets; it now skips models already loaded through
  DT codecs.
- Fix IndexOutOfBoundsException in Family.getStrippedBranch()/getBranchItem()
  for families without a stripped branch (add-on tree packs) - bounds-check and
  return Optional.empty().

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Arilas and others added 2 commits July 25, 2026 02:22
…imitive blocks resolve

On Fabric, DynamicTrees.commonSetup() (which runs the treepack 'setup'
stage: primitive_log / primitive_leaves / primitive_stripped_log block
lookups, etc.) ran inside this mod's own ModInitializer. Fabric may
initialize this mod before content mods like Biomes O' Plenty, so every
add-on treepack lookup failed on the first pass:
  Error whilst loading type "Family" with name "dtbop:willow":
  [primitive_log] Could not find block for registry name 'biomesoplenty:willow_log'.
Client model bake then ran against unresolved families - add-on branches
baked with missing sprites (magenta/black checkerboard) and leaf tint
cloning found no primitive leaves (gray foliage).

Move commonSetup to the client and (new) dedicated-server entrypoints,
which Fabric invokes after the whole main entrypoint phase - mirroring
NeoForge's FMLCommonSetupEvent timing. Nothing in commonSetup registers
into frozen vanilla registries, so this is safe post-freeze, and it runs
before the first resource load / model bake.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Left over from diagnosing add-on load order; it printed six INFO lines on
every server start.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.

1 participant