fabric icon indicating copy to clipboard operation
fabric copied to clipboard

(Request) Behavior change to FluidStorageUtil#interactWithFluidStorage

Open Luligabi1 opened this issue 1 year ago • 5 comments

The javadocs say In creative mode, the player's inventory will not be modified and yes, that is true, but it works a bit too well. I believe the inventory shouldn't be modified when filling, but should when emptying a storage.

If you want to fill a tank on creative, you want it to be quick and easy, so it makes sense to not remove the fluid from your bucket. But when emptying your tank, it might confuse the player as to why they are not getting the fluid on their bucket, despite the tank's content decreasing. And even if the player don't become confused by this, they might want to quickly obtain the tank's fluid on a bucket, similar to how a middle click works on creative.

Luligabi1 avatar Sep 12 '22 00:09 Luligabi1

Maybe we could add a filled copy of the item if it's not present in the inventory yet, otherwise void the copy. I believe that's how bucket interactions work in creative but I'd have to check.

Technici4n avatar Sep 16 '22 16:09 Technici4n

https://user-images.githubusercontent.com/6596629/190686548-5d0b2b33-5163-47b3-9ae4-f8b2f28d00da.mp4

This is how it works in vanilla when interacting with the only fluid container, cauldrons

Juuxel avatar Sep 16 '22 16:09 Juuxel

What if you try to empty multiple cauldrons in a row?

Technici4n avatar Sep 16 '22 16:09 Technici4n

https://user-images.githubusercontent.com/6596629/190688951-3ec098c0-3642-425d-b1c2-257d64076619.mp4

No duplicates

Juuxel avatar Sep 16 '22 16:09 Juuxel

Ok I see. Sounds reasonable, probably directly inside the ContainerItemContext.

Technici4n avatar Sep 16 '22 17:09 Technici4n