Traveler's Backpack [Fabric]

Traveler's Backpack [Fabric]

11M Downloads

Allow emptying tanks into partially filled containers

jtuc opened this issue ยท 2 comments

commented

Is your feature request related to a problem? Please describe.
If I'm collecting fluids, I would like to be able to hose them into my backpack and then transfer my backpack tanks to larger secondary containers. However, it seems like the current logic only attempts to transfer fluid from the container to the tank, and exits early if the container would overfill the tank - com.tiviacz.travelersbackpack.inventory.InventoryActions line 118:

if(tank.getFluidAmount() + amount > tank.getCapacity()) return false;

Describe the solution you'd like
When putting a fluid container into the bucket slot, if the backpack tanks cannot contain the liquid, fallthrough and attempt to transfer fluids back the other way.
Alternatively, partially transfer fluid from containers to the backpack, and only transfer fluid the other way if the tank is full.

Describe alternatives you've considered
Placing containers into the world and hosing the liquid in works, but is less convenient.

Additional context
In this screenshot, I would expect one of the following to happen:

  • The one bucket of water from my backpack tank to be added to the 6 buckets in the Basic Portable Tank.
  • 5 buckets of fluid to move from the Basic Portable Tank to the Backpack Tank

2023-11-11_15 30 13