Skip to content

Wrong fluid transferred when source IFluidHandler uses shifting tank indices #615

Description

@1mr-yuan

SFM can transfer a fluid that is not included in an INPUT/OUTPUT whitelist, and is explicitly excluded with EXCEPT, when the source IFluidHandler uses dynamic tank indices.

This was reproduced with a Tinkers' Construct smeltery on Minecraft 1.19.2 using SFM 4.19.0.

The issue appears to be caused by SFM caching multiple LimitedInputSlot objects before moving resources. Tinkers' Construct stores smeltery fluids in a dynamic List.When one fluid is completely drained, its list entry is removed and later tank indices shift.

A cached input slot may therefore still contain the original matching FluidStack, while its cached numeric tank index now points to a different fluid.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmod compatPlaying nice with other mods

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions