Fabric API

Fabric API

106M Downloads

(Request) Behavior change to FluidStorageUtil#interactWithFluidStorage

Luligabi1 opened this issue ยท 5 comments

commented

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.

commented

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.

commented
Minecraft.1.19.2.-.Singleplayer.2022-09-16.19-30-43.mp4

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

commented

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

commented
Minecraft.1.19.2.-.Singleplayer.2022-09-16.19-45-01_Trim.mp4

No duplicates

commented

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