Skip to content

[WIP/Draft] MC 26.2 port — rendering overhaul makes this non-trivial#321

Open
dubsector wants to merge 9 commits into
FoundationGames:1.21.4from
dubsector:26.2
Open

[WIP/Draft] MC 26.2 port — rendering overhaul makes this non-trivial#321
dubsector wants to merge 9 commits into
FoundationGames:1.21.4from
dubsector:26.2

Conversation

@dubsector

Copy link
Copy Markdown

⏱️ Hours Wasted Counter

Change this number if you also banged your head against this:

🕐 8


What this PR is

This is a documentation draft, not a working port. It captures everything discovered during ~8 hours of attempting to port EBE to Minecraft Java Edition 26.2 (internal: 1.21.11) on 2026-06-27.

Short answer: EBE cannot be ported 1:1 to MC 26.2 because the rendering system EBE was built on top of has been fundamentally replaced.


What was done

  • ✅ Forked + created 26.2 branch
  • ✅ Gradle 9.5.1, Fabric Loom 1.17, Java 25 build toolchain working
  • ✅ GitHub Actions CI configured (JDK 25, triggers on 26.2 branch)
  • ✅ All Fabric API / Sodium / ModMenu versions updated for 26.2
  • ✅ Access widener migrated to official namespace (MC 26.x ships without obfuscation — no client_mappings in launcher manifest)
  • ✅ Full source migration from Yarn 1.21.4 → Mojang 26.x naming (~50 files, ~750 line changes)
  • ❌ Does not compile — blocked on architectural mismatches described below

The wall we hit: MC 26.x overhauled the rendering pipeline

1. BakedModelBlockStateModel

The BakedModel interface that EBE uses to render block entities as static geometry has been replaced by BlockStateModel in net.minecraft.client.renderer.block.dispatch. This is a different interface with a different rendering contract. All of EBE's model loading, baking, and rendering logic targets BakedModel.

2. Block entity rendering is now two-phase (Entity Render State)

The old injection point in BlockEntityRenderDispatcher.render(BlockEntityRenderer, BlockEntity, float, MatrixStack, VertexConsumerProvider) no longer exists in the same form. MC 26.x uses a two-phase approach:

  1. State extraction (game thread): BlockEntityBlockEntityRenderState
  2. Rendering (render thread): BlockEntityRenderState → pixels

EBE needs to intercept one of these phases instead of the old single render() call. Which phase and how is not obvious.

3. FabricBakedModelManager.getModel(Identifier)FabricModelManager.getModel(ExtraModelKey<T>)

The Fabric API model loading changed from identifier-based lookup to typed key-based lookup. EBE's entire ModelIdentifiers class (100+ constants) and model registration/retrieval system needs to be rethought around ExtraModelKey<T>.

4. BlockRenderLayerMap removed from Fabric API

EBE calls BlockRenderLayerMap.INSTANCE.putBlock(block, RenderLayer.getCutoutMipped()) for chests, shulker boxes, and hanging signs. This API is gone in Fabric 26.2 with no direct replacement visible in the source tree.

5. ResourceLocationIdentifier (again)

Mojang renamed ResourceLocation back to Identifier in MC 26.x (now in net.minecraft.resources.Identifier instead of net.minecraft.util.Identifier). They also removed obfuscation entirely. This was a "fun" discovery.

6. Vertex/render consumer pipeline changed

VertexConsumerProvider / MultiBufferSource is no longer the entry point for chunk geometry submission. The new pipeline uses SubmitNodeCollector and related classes. EBE's chunk injection points in WorldRendererMixin and Sodium's RenderSectionManagerMixin both target methods that no longer exist.


Is EBE still relevant in 26.x?

Genuinely unclear. Mojang's BlockEntityRenderState system was specifically designed to address the same problem EBE solved — separating state extraction from rendering to allow caching and parallelism. The new pipeline may already provide most of the performance benefit.

The one remaining gap might be ambient occlusion and lighting quality for block entities (static BlockStateModel geometry gets full chunk AO; block entity render states may not). If that gap exists in 26.x vanilla, a slimmed-down EBE focused only on AO/lighting quality rather than full static baking could still be worthwhile.


Build artifacts

The 26.2 branch in dubsector/EnhancedBlockEntities has the build scaffolding working. It fails at compile time on the rendering API mismatches above, not on build system issues.

CI: https://github.com/dubsector/EnhancedBlockEntities/actions

dubsector and others added 9 commits June 27, 2026 01:56
- Bump to Fabric Loader 0.19.3, Loom 1.17-SNAPSHOT, Gradle 8.14
- Update Yarn mappings to 1.21.11+build.6
- Update Fabric API to 0.153.0+26.2
- Update Sodium compat to mc26.2-0.9.1-beta.2-fabric
- Update ModMenu to 20.0.0-beta.4
- Set Java target to 25 (required by MC 26.2)
- Retarget CI Actions to JDK 25 and 26.2 branch triggers

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Gradle 8.14 tops out at Java 24 (class file major version 68);
Gradle 9.6.1 adds support for Java 25 which MC 26.2 requires.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Gradle 9 removed project-level sourceCompatibility/targetCompatibility;
these must now live inside the java {} extension block.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
archivesBaseName was removed in Gradle 9; the replacement is
base.archivesName (or the base{} extension block).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fabric API itself uses Loom 1.16.2 for 26.2. Yarn's mappings
configuration was removed; Loom now defaults to Mojang official
mappings. Dropped the yarn mappings dependency line.

This will surface compile errors showing which MC class names need
updating from old Yarn (net.minecraft.util.Identifier etc.) to the
new Mojang-style names used in 26.x.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Complete rewrite of net.minecraft.* imports and class references:
- net.minecraft.util.Identifier → net.minecraft.resources.ResourceLocation
  (NOTE: Mojang renamed ResourceLocation to Identifier in 26.x,
   so some refs use Identifier, others may use ResourceLocation
   depending on what 26.x actually ships)
- net.minecraft.text.Text → net.minecraft.network.chat.Component
- MatrixStack → com.mojang.blaze3d.vertex.PoseStack
- VertexConsumerProvider → MultiBufferSource
- WorldRenderer → LevelRenderer (+getLightColor rename)
- BlockEntityRenderDispatcher/Renderer → client.renderer.blockentity.*
- block.entity.* → world.level.block.entity.*
- block.* → world.level.block.*
- client.MinecraftClient → client.Minecraft
- resource.* → server.packs.*
- client.texture.atlas.* → client.renderer.texture.atlas.*
- SimpleOption → OptionInstance
- ChunkBuilder.BuiltChunk → ChunkRenderDispatcher.RenderChunk
- Pair → com.mojang.datafixers.util.Pair

Mixin targets updated to use Mojang descriptor format.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Loom 1.17 removed the mod* dependency configurations; everything
now uses standard implementation/compileOnly (Loom handles
remapping automatically via the minecraft{} dependency).
MC 26.2 ships without obfuscation so official == Mojang class names.
Updated class paths from Yarn to Mojang-mapped equivalents.
…ose archival

Adds a prominent archival notice and table of the six rendering APIs
that were replaced in MC 26.x, with a link to PR FoundationGames#321 for context.
@dubsector dubsector marked this pull request as ready for review June 27, 2026 20:30
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