Skip to content

Implement interface injection on NeoForge#211

Closed
MaxNeedsSnacks wants to merge 1 commit intoPaperMC:mc/1.21from
MaxNeedsSnacks:mc/1.21
Closed

Implement interface injection on NeoForge#211
MaxNeedsSnacks wants to merge 1 commit intoPaperMC:mc/1.21from
MaxNeedsSnacks:mc/1.21

Conversation

@MaxNeedsSnacks
Copy link
Copy Markdown

@MaxNeedsSnacks MaxNeedsSnacks commented Jul 25, 2025

This was relatively easy to implement as ModDevGradle already supports interface injection, though with a slightly different format to Fabric's.

I also had to add an ItemHoverEventSource interface since custom classes with generic arguments (and on top of that an inner class as generic argument) don't work properly yet (see neoforged/JavaSourceTransformer#53).
Because of that, the mixin and fabric.mod.json were changed to that interface, as well.

This change should be able to be backported to older versions as well, but I don't think there exists a branch for the legacy 1.21 NeoForge codebase...? Either way, not a big deal since it's just explicit vs. implicit casts

@MaxNeedsSnacks MaxNeedsSnacks closed this by deleting the head repository Apr 22, 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.

1 participant