mojira.dev
MC-260889

Players can use water buckets and lava buckets on blocks that are out of reach

The Bug:

Players can use water buckets and lava buckets on blocks that are out of reach.

Steps to Reproduce:

  1. Dig a hole that's three blocks deep.

  2. Obtain any block and a water bucket and switch to survival mode.

  3. Attempt to place the block at the very bottom of the hole and notice how you're unable to.

  4. Attempt to place the water bucket at the very bottom of the hole and notice how you're able to.

  5. Take note as to whether or not players can use water buckets and lava buckets on blocks that are out of reach.

Observed Behavior:

The reach distance of water/lava buckets is larger than the entity reach distance.

Expected Behavior:

The reach distance between blocks and water/lava buckets would be the same.

Code Analysis:

Code analysis by @unknown can be found below.

The BucketItem#use method (Yarn mappings) calls the Item.raycast method, which raycasts a distance of 5 blocks, rather than the correct entity reach distance.

Linked issues

Attachments

Comments 4

This does not apply only to leaves, this affects stairs too. I'm assuming this applies to every waterloggable block.

I didn't test every block, I just stumbled across it while making cobble farm.  I think you are right about it appling to all waterloggable blocks though.

I've updated this ticket to mention the core problem here.

Why would buckets use entity reach? You're placing the bucket on a block so why would it target entities/have 3 block reach?

MippyMagic

gegy

Confirmed

Platform

Normal

Items, Player

lava_bucket, water_bucket

1.15.2, 20w06a, 20w11a, 20w18a, 20w45a, ..., 1.19.3, 1.19.4 Release Candidate 2, 1.19.4, 1.20.1, 1.20.2

24w03a

Retrieved