Repository navigation
Fix NeoForge crashing when Fabric mods try calling isInFluid - #300
Merged
Merged
Conversation
Su5eD
approved these changes
Oct 10, 2026
Su5eD
pushed a commit
that referenced
this pull request
Oct 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Issue
Fabric mods will call methods like
isInFluidorisEyeInFluidthat operate off aTagKey<Fluid> fluid. In NeoForge, those methods were made completely nonfunctional and will throw, as they expect modders to have created aFluidType. FFAPI creates fluid types on behalf of Fabric fluids, and a similar method inCommonHookswas already patched for Fabric fluids.The Proposal
This PR mixins the NeoForge patch to
EntityFluidInteraction#getFluidTypeByTagto find the first fluid in a tag, and get its fluid type. I believe this should reflect the same intent Fabric modders are expecting when they call this method, and is certainly better than an outright crash.Possible Side Effects
It's possible that when called on a tag that contains multiple fluids, this may result in only matching a single fluid type. Additional mixins could also be used on
isEyeInFluidandisInFluidto have them check against every fluid type to see if any match.Alternatives
NeoForge could not not patch the game to intentionally crash it when mods use vanilla methods. Just a thought.
Additional Notes
Fixes #299. I've been testing this with a patched version of Enderscape, but that needs further fixes in Connector to boot to the point where this crash can be seen.