Skip to content

Fix Fabric crash when rendering fluids without tint source - #250

Merged
rubensworks merged 2 commits into
master-26-ltsfrom
fix-fluid-tint-npe
Oct 1, 2026
Merged

rubensworks merged 2 commits into
master-26-ltsfrom
fix-fluid-tint-npe

Conversation

@rubensworks

Copy link
Copy Markdown
Member

FluidModel#tintSource() is null for untinted fluids such as lava. RenderHelpersFabric#getFluidVertexBufferColor dereferenced it without a check, which crashes the client, for example when a Flopper containing lava is rendered (CyclopsMC/Flopper#47):

NullPointerException: Cannot invoke "BlockTintSource.color(BlockState)" because the return value of "FluidModel.tintSource()" is null
  at org.cyclops.cyclopscore.helper.RenderHelpersFabric.getFluidVertexBufferColor(RenderHelpersFabric.java:54)

Untinted fluids now fall back to white (no tint).

Targets master-26-lts so the fix upmerges into master-26.2 and master-26, which have the same code.

Note: not compiled locally, as dependency resolution was rate limited (HTTP 429 from Maven Central) in the build environment. Relying on CI for compilation.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TVes4otYKR6fj4dbo5sZhD


Generated by Claude Code

FluidModel#tintSource is null for untinted fluids such as lava,
which caused an NPE in RenderHelpersFabric#getFluidVertexBufferColor,
e.g. when rendering lava in a Flopper.

Related to CyclopsMC/Flopper#47

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TVes4otYKR6fj4dbo5sZhD
@coveralls

coveralls commented Oct 1, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 31.409% (-0.006%) from 31.415% — fix-fluid-tint-npe into master-26-lts

@rubensworks
rubensworks merged commit 1c153a3 into master-26-lts Oct 1, 2026
2 checks passed
@rubensworks
rubensworks deleted the fix-fluid-tint-npe branch October 1, 2026 14:54
@sonarqubecloud

sonarqubecloud Bot commented Oct 1, 2026

Copy link
Copy Markdown

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.

3 participants