Skip to content

Fix Fabric→Forge fluid tank capacity not converting droplets to mB - #293

Closed
yu1745 wants to merge 2 commits into
Sinytra:1.20.1from
yu1745:1.20.1
Closed

Fix Fabric→Forge fluid tank capacity not converting droplets to mB#293
yu1745 wants to merge 2 commits into
Sinytra:1.20.1from
yu1745:1.20.1

Conversation

@yu1745

@yu1745 yu1745 commented Aug 10, 2026

Copy link
Copy Markdown

What

Fixes FluidStorageFluidHandler#getTankCapacity returning the raw Fabric Storage capacity (in droplets) without converting to Forge mB.

getFluidInTank/fill/drain all convert via ForgeCompatUtil.toForgeBucket, but getTankCapacity did not. As a result the Forge-side capacity appeared 81x too large (1 mB = 81 droplets), e.g. a 32-bucket tank showing up as 2592 buckets.

Change

return view != null ? ForgeCompatUtil.toForgeBucket((int) view.getCapacity()) : 0;

No behavior change for the existing fill/drain/getFluidInTank paths.

FluidStorageFluidHandler#getTankCapacity returned the raw Fabric Storage
capacity (in droplets) without converting to Forge mB, unlike
getFluidInTank/fill/drain which all convert via ForgeCompatUtil.toForgeBucket.
As a result the Forge-side capacity appeared 81x too large (1 mB = 81 droplets),
e.g. a 32-bucket tank showing as 2592 buckets.

Return ForgeCompatUtil.toForgeBucket((int) view.getCapacity()) instead.
@superwibr

superwibr commented Aug 11, 2026

Copy link
Copy Markdown

+1 on this, it causes some issues especially with the display of fluid containers, some fluid block recipes, and rarely with the measure of fullness between mods' fluid systems, been looking for the reason for a while!

@Su5eD Su5eD added the 1.20.1 Targets Minecraft 1.20.1 label Aug 13, 2026
Su5eD added a commit that referenced this pull request Aug 13, 2026
Supercedes #293

Co-authored-by: yu1745 <43715680+yu1745@users.noreply.github.com>
@Su5eD

Su5eD commented Aug 13, 2026

Copy link
Copy Markdown
Member

Merged manually because the PR contains an unrelated file "build.sh"

@Su5eD Su5eD closed this Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.20.1 Targets Minecraft 1.20.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants