Skip to content

Fix the issue where an empty basin allows the same fluid in both input tanks#9974

Open
Apertyotis wants to merge 2 commits intoCreators-of-Create:mc1.21.1/devfrom
Apertyotis:fix/basin-same-fluid-multi-slot
Open

Fix the issue where an empty basin allows the same fluid in both input tanks#9974
Apertyotis wants to merge 2 commits intoCreators-of-Create:mc1.21.1/devfrom
Apertyotis:fix/basin-same-fluid-multi-slot

Conversation

@Apertyotis
Copy link
Copy Markdown
Contributor

@Apertyotis Apertyotis commented Feb 13, 2026

Issue

Under normal circumstances, the Basin’s internal fluid tank only allows one type of fluid to occupy a single slot. However, an empty Basin is an exception: if fluid is pumped in fast enough, the issue shown in the image can occur.

2026-02-13_15 01 31

Cause

The root cause lies in the condition at CombinedTankWrapper.java#L89

if (fittingHandlerFound && (enforceVariety || filledIntoCurrent != 0))
    break Outer;

This logic is somewhat counterintuitive. For an empty Basin, fittingHandlerFound is guaranteed to be false, which causes the value of enforceVariety to be ignored entirely, leading to the issue described above.

On the other hand, if filledIntoCurrent != 0, the program will treat the current handler as unable to continue filling and break the outer loop — even when enforceVariety is false. As a result, the remaining fluid can only be inserted during the next input. For certain indivisible FluidStack cases, this also introduces a subtle logical inconsistency.
I think I understand this logic now: operate on only one tank at a time to prevent overfilling and make right-click interaction more convenient for players.

Fix

CombinedTankWrapper organizes the fluid system into a well-structured tree hierarchy, and considering the intended semantics of the code, enforceVariety is meant to control whether sibling nodes under the same parent are allowed to contain the same fluid type.

if (filledIntoCurrent != 0 || (enforceVariety && fittingHandlerFound))
    break Outer;

@vercte vercte added pr type: fix PR fixes a bug pr flag: simple PR has minimal changes labels Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr flag: simple PR has minimal changes pr type: fix PR fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants