Skip to content

Fluids#342

Draft
IchHabeHunger54 wants to merge 7 commits into
neoforged:mainfrom
IchHabeHunger54:feature/fluids
Draft

Fluids#342
IchHabeHunger54 wants to merge 7 commits into
neoforged:mainfrom
IchHabeHunger54:feature/fluids

Conversation

@IchHabeHunger54
Copy link
Copy Markdown
Member

@IchHabeHunger54 IchHabeHunger54 commented Apr 30, 2026

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

@IchHabeHunger54 IchHabeHunger54 added the addition Adding or rewriting information. label Apr 30, 2026
@neoforged-pages-deployments neoforged-pages-deployments Bot deployed to neoforged-docs-previews (Preview) April 30, 2026 12:43 Active
@neoforged-pages-deployments
Copy link
Copy Markdown

neoforged-pages-deployments Bot commented Apr 30, 2026

Deploying with Cloudflare Pages

Name Result
Last commit: c35f0325c987fca594179d0cc2e8dcf0e7994c59
Status: ✅ Deploy successful!
Preview URL: https://de29edd6.neoforged-docs-previews.pages.dev
PR Preview URL: https://pr-342.neoforged-docs-previews.pages.dev

@neoforged-pages-deployments neoforged-pages-deployments Bot deployed to neoforged-docs-previews (Preview) April 30, 2026 13:21 Active
Comment thread docs/blocks/fluids.md Outdated
Comment thread docs/blocks/fluids.md Outdated
Comment thread docs/blocks/fluids.md Outdated
Comment thread docs/blocks/fluids.md Outdated
Comment thread docs/blocks/fluids.md Outdated
Comment thread docs/blocks/fluids.md Outdated
Comment thread docs/blocks/fluids.md Outdated
Comment thread docs/blocks/fluids.md Outdated
@neoforged-pages-deployments neoforged-pages-deployments Bot deployed to neoforged-docs-previews (Preview) May 4, 2026 16:08 Active
@neoforged-pages-deployments neoforged-pages-deployments Bot deployed to neoforged-docs-previews (Preview) May 4, 2026 16:30 Active
Comment thread docs/fluids/index.md
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);
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 wonder if we should also show a vanilla example since it's not guaranteed they'll use BaseFlowingSource or split flowing from source.

Comment thread docs/fluids/index.md Outdated
Comment thread docs/fluids/index.md
Comment thread docs/fluids/index.md
Comment thread docs/fluids/index.md
Comment thread docs/fluids/inworld.md
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()
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 feel like this could use more comments.

Comment thread docs/fluids/inworld.md
Comment on lines +186 to +187
// If true, the "cover" texture is a mask. We generally want this for buckets.
true,
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.

What is a mask? (I know what it is, but explain).

Comment thread docs/fluids/inworld.md Outdated
Comment thread docs/fluids/inworld.md
@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,
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.

Shouldn't we be using register instead of directly calling the interaction map to add?

Comment thread docs/fluids/inworld.md

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
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.

What happened to the FluidInteractionRegistry?

@neoforged-pages-deployments neoforged-pages-deployments Bot deployed to neoforged-docs-previews (Preview) May 4, 2026 19:43 Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

addition Adding or rewriting information.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add docs for fluids

2 participants