Fluids#342
Draft
IchHabeHunger54 wants to merge 7 commits into
Draft
Conversation
Deploying with Cloudflare Pages
|
ChampionAsh5357
requested changes
Apr 30, 2026
ChampionAsh5357
requested changes
May 4, 2026
Comment on lines
+68
to
+86
| // The source fluid. This is usually named without specifying "source" in the name. | ||
| public static final DeferredHolder<Fluid, BaseFlowingFluid.Source> MOLTEN_IRON = FLUIDS.register( | ||
| // The registry name. | ||
| "molten_iron", | ||
| // The source fluid supplier. Qualify the properties with the class name here. | ||
| () -> new BaseFlowingFluid.Source(ModFluids.MOLTEN_IRON_PROPERTIES)); | ||
|
|
||
| // The flowing fluid. The name is commonly prefixed with "flowing_". | ||
| public static final DeferredHolder<Fluid, BaseFlowingFluid.Flowing> FLOWING_MOLTEN_IRON = FLUIDS.register( | ||
| // The registry name. | ||
| "flowing_molten_iron", | ||
| // The flowing fluid supplier. Again, qualify the properties with the class name. | ||
| () -> new BaseFlowingFluid.Flowing(ModFluids.MOLTEN_IRON_PROPERTIES)); | ||
|
|
||
| // The fluid properties. We will use this later to connect additional stuff | ||
| // to the fluid, for example the bucket. | ||
| public static final BaseFlowingFluid.Properties MOLTEN_IRON_PROPERTIES = | ||
| // Parameters are the fluid type, the source fluid and the flowing fluid. | ||
| new BaseFlowingFluid.Properties(MOLTEN_IRON_TYPE, MOLTEN_IRON, FLOWING_MOLTEN_IRON); |
Contributor
There was a problem hiding this comment.
I wonder if we should also show a vanilla example since it's not guaranteed they'll use BaseFlowingSource or split flowing from source.
Comment on lines
+177
to
+180
| Optional.of(new Material(Identifier.withDefaultNamespace("item/bucket"))), | ||
| Optional.of(new Material(Identifier.withDefaultNamespace("item/bucket"))), | ||
| Optional.of(new Material(Identifier.fromNamespaceAndPath("neoforge", "item/mask/bucket_fluid"))), | ||
| Optional.empty() |
Contributor
There was a problem hiding this comment.
I feel like this could use more comments.
Comment on lines
+186
to
+187
| // If true, the "cover" texture is a mask. We generally want this for buckets. | ||
| true, |
Contributor
There was a problem hiding this comment.
What is a mask? (I know what it is, but explain).
| @SubscribeEvent | ||
| private static void registerCauldronInteractions(RegisterCauldronInteractionEvent.Interaction event) { | ||
| // Empty our cauldron when it is right-clicked with an empty bucket. | ||
| MoltenIronCauldronBlock.CAULDRON_INTERACTIONS.put(Items.BUCKET, |
Contributor
There was a problem hiding this comment.
Shouldn't we be using register instead of directly calling the interaction map to add?
|
|
||
| Cauldron interactions are not limited to buckets. Vanilla adds a couple of other cauldron recipes, mostly for "cleaning" colored items. These work through generally the same mechanism. For more information, see the `CauldronInteractions` class. This is also where you can find the vanilla cauldron interaction dispatchers. | ||
|
|
||
| [block]: ../blocks/index.md |
Contributor
There was a problem hiding this comment.
What happened to the FluidInteractionRegistry?
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.
Closes #109 .
Adds fluid documentation. Pretty big one, and also based off my one (recent) time of implementing a fluid myself, so I'm not 100% sure I caught and correctly understood everything.
Edit: Since the article is getting bigger than anticipated, I decided to create an entire new fluids category.
Opening as draft as the second half is still missing.
Preview URL: https://pr-342.neoforged-docs-previews.pages.dev