mojira.dev
MC-12363

Lava / water / powder snow bucket desync when using it while rapidly turning

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

  1. Give yourself a lava bucket

  2. 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

MC-22377 Lava buckets in inventory randomly become empty Resolved MC-60815 Placing lava in water fast causes lava to stay lava Resolved MC-84326 Buckets emptying with torches in shield slot Resolved MC-127147 1x1 bubble created by bucket underwater doesn't disappear Resolved MC-127233 Spamming buckets creates phantom air Resolved

Attachments

Comments 85

I hope somebody will response! ๐Ÿ˜ƒ ๐Ÿ™‚

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.

Alright! ๐Ÿ™‚
Thank you for your reply!

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.

75 more comments

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.ย 

[media]

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).

Not fixed, Reproduced in 1.17

[media]

Are you experiencingย MC-219875?

HackProtectorX

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.

Kuczora Tibor

Avoma

Panda4994

Confirmed

Important

Block states, Networking

bucket, desync, empty, lava, water

Minecraft 1.5, Minecraft 1.6.1, Minecraft 1.6.2, Minecraft 1.7.4, Minecraft 14w27b, ..., 21w05b, 21w06a, 21w07a, 21w08b, 21w10a

Minecraft 14w30c, 21w11a

Retrieved