Skip to content

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

Open
yu1745 wants to merge 1 commit into
Sinytra:1.20.1from
yu1745:1.20.1
Open

Fix Fabric→Forge fluid tank capacity not converting droplets to mB#293
yu1745 wants to merge 1 commit 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.
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.

1 participant