Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dumping water handled incorrectly #4090

Open
9caihezi opened this issue Dec 8, 2017 · 3 comments
Open

Dumping water handled incorrectly #4090

9caihezi opened this issue Dec 8, 2017 · 3 comments

Comments

@9caihezi
Copy link
Contributor

9caihezi commented Dec 8, 2017

Client version: 1.12.2
Server OS: Windows/Linux/macOS/BSD/...
Commit id: 0dd172b

Expected behavior

Dump water as shown in the following picture, the water should be dumped in the hole.
mc_issue_1

Actual behavior

Water placed on the snow block in front. It seems like the server assumes the snow block shadows the hole.

Steps to reproduce the behavior

Dumping a water bucket with a non-empty but not full-sized block in between (stone_slab, snow_layer, grass).

Bonus bug: sometimes when I trying to retrieve the water, it fails without letting the client know. The client will see the water retrieved back to the bucket, but the water aside doesn't disappear, until the player does something that refreshes the block and/or inventory.

PS: sometimes the server deliberately acts differently from what the client suggests (block placement at least), the server should send the actual updated block and the block that's supposed to be updated and player's inventory.
E.g., the client sends a block (x,y,z) to the upper face, and the server thought the block should be placed at (x+1,y+1,z) instead of (x,y+1,z), the server should send update to both blocks.

@peterbell10 peterbell10 changed the title Dumpling water handled incorrectly Dumping water handled incorrectly Dec 8, 2017
@earboxer
Copy link
Contributor

earboxer commented Apr 2, 2018

src/Items/ItemBucket.h

PlaceFluid() uses GetPlacementCoordsFromTrace(),

ScoopUpFluid() uses GetBlockFromTrace().

(The former gives EntryFace, which is used for some hooks, minor change would be required). However, switching this isn't a drop in fix.

You can right click through the snow to pick up water (which the client won't show as picked up until relog).

@Pokechu22
Copy link
Contributor

(which the client won't show as picked up until relog).

Perhaps it would also make sense to send a block change packet to the player whenever they pick up/place water, even if it'd normally be redundant. Vanilla doesn't, but vanilla also has the issue of appearing to pick up water when it actually hasn't been.

@tigerw
Copy link
Member

tigerw commented Apr 11, 2021

Related to #2923, we treat all blocks' bounding boxes as full cubes, so the trace doesn't work correctly. That is, Full bounding box (pic from #4776 (comment))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants