The bug
A desync can happen when rapidly turning and trying to use a lava, water, or powder snow bucket. The bucket might appear full but you placed lava / water / powder snow; or the bucket might appear empty but you did not place lava / water / powder snow.
How to reproduce
Give yourself a lava bucket
Spin around (move mouse) standing on a flat plain and repeatedly try to put down and pick up the lava in the bucket
โ โ About 1 in 10 times, the client and server desync (e.g. I see the lava on the ground, and also in my bucket, until I use the bucket again or move it in my inventory; or I see no lava on the ground and my inventory displays the bucket as empty, but I actually still have lava and can place it).
Code analysis
Based on 1.12.2 decompiled using MCP 9.40
Using a bucket calls server-side net.minecraft.item.ItemBucket.onItemRightClick(World, EntityPlayer, EnumHand)
which calculates the position itself and therefore can cause a desync. Ideally the position for picking up liquids and placing them should be calculated client-side only and then the server should only validate it and use that position.
Examples
[media][media]
[media]
Linked issues
is duplicated by 116
relates to 5
Attachments
Comments 85
This is an old bug and does not actually relate to doors.
Occasionally lava source blocks do not fill buckets correctly (serverside) and minecraft restates the faulty bucket (clientside) in your inventory as empty when you happen to update its item. If the item is in your hand it restates immediately after you use it (right click) even if you actually use something else like a door. Because you cannot stack full buckets, they also appear full in your inventory when (pseudo)filled. In this case your bucket will be restated when you try to move it in inventory.
Guide to reproduce:
1. Take 10-20 empty buckets to the lava source.
2. Quickly use them to drain as much source blocks as you can reach.
3. Try to move your lava buckets within your inventory or use them in any way. There is a chance some of them would reappear empty. Repeat if necessary.
Is this still a concern in the latest Minecraft version 14w30c? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.
Probably fixed. Spent 4 stacks of buckets in survival to drain a small lake - no bucket was considered empty by the game.
I can confirm this happening on 1.16.5. In vanilla survival on a vanilla server.
Scenarios that can happen (from experience) that can be related to this:
1.ย
2. Your water bucket looks full with water, but when you try to place it, your water disappears.
This issue has been fixed in the 1.17 snapshots, and should be released alongside Caves and Cliffs: Part 1 on June 8th (in a little less than two days).
Are you experiencingย MC-219875?
This bug is not possible to fix โ it is a knowledge problem between the server and client. There will always be a chance of desynchronization due to simple physics, and packet loss is a reality. Attempts at fixing it have only caused more issues for plugin developers, who then have to deal with filtering duplicate packets.
I hope somebody will response! ๐ ๐