Skip to content

Support FRAPI on NeoForge#3818

Open
Su5eD wants to merge 1 commit into
CaffeineMC:26.1.2/stablefrom
Su5eD:26.1.2/neo-frapi
Open

Support FRAPI on NeoForge#3818
Su5eD wants to merge 1 commit into
CaffeineMC:26.1.2/stablefrom
Su5eD:26.1.2/neo-frapi

Conversation

@Su5eD

@Su5eD Su5eD commented Jul 12, 2026

Copy link
Copy Markdown

The issue

Sodium currently declares it contains a FRAPI renderer implementation on NeoForge, but does not actually include it. See #3766 for details.

The proposal

This PR adds support for FRAPI rendering on NeoForge by bundling the FRAPI module currectly included on Fabric. Services and mixins provided by this module are loaded conditionally only when FRAPI is present, ensuring that existing behavior remains unchanged.

Changes

  • Bundle FRAPI module code in Sodium "mod" jar on NeoForge
  • Add conditional providers for PlatformModelEmitter and FRAPIRegistrar (renamed from FRAPIProvider) services
    • This allows us to only load these services when FRAPI is available

Testing

I tested the integration in a 26.1.2 NeoForge 26.1.2.77 instance with the following mods installed:

I used a Chisel to create a chiseled block, which is rendered using the FRAPIEmitter. The results appear to be the same as when only Sodium is installed.

2026-07-12_19 48 09

Alternatives

I tried running Sodium alongside FFAPI without the contains_renderer metadata attribute and everything appeared to work fine - I was able to load into the world and all blocks had the expected appearance. Therefore, as a temporary measure until this PR is merged, I'd suggest at least removing the contains_renderer attribute to prevent the game from crashing.

Closes #3766

@jellysquid3 jellysquid3 added T-enhancement Type: Enhancement A-portability Area: Platform portability B-LTS Branch: Only relevant for LTS, unapplicable on current labels Jul 12, 2026
@jellysquid3 jellysquid3 added this to the Sodium 0.9.2 milestone Jul 12, 2026
@douira

douira commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Does this mean that it will route usage of FRAPI through our FRAPI implementation on NeoForge? Or is it somehow using a different FRAPI implementation and piping into our meshing system on another path?

@douira

douira commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Closes #3766
(seems like this doesn't work with comments, fine)

@jellysquid3 jellysquid3 requested a review from IMS212 July 12, 2026 22:31
@Su5eD

Su5eD commented Jul 12, 2026

Copy link
Copy Markdown
Author

Does this mean that it will route usage of FRAPI through our FRAPI implementation on NeoForge? Or is it somehow using a different FRAPI implementation and piping into our meshing system on another path?

The former is the case here, yes. The Forgified Fabric API provides the original FRAPI to mods on NeoForge, so from Sodium's perspective, nothing changes. On FFAPI's end, the FRAPI implementation uses additional context and extension methods added by NeoForge to integrate with its rendering APIs.

@douira douira left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm in favor of this PR, it looks ok to me, I'm just wondering about the double mod presence check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-portability Area: Platform portability B-LTS Branch: Only relevant for LTS, unapplicable on current T-enhancement Type: Enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NeoForge version declares Fabric renderer but never registers it

4 participants