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

No block update to client send after preventing item use with HOOK_PLAYER_USING_ITEM #3276

Closed
PureTryOut opened this issue Jul 25, 2016 · 4 comments

Comments

@PureTryOut
Copy link
Contributor

Client version: 1.9.4
Server OS: Linux
Commit id: b403ad4

I am trying to prevent players from using flint and tinder to set blocks on fire under certain conditions. Although whatever is supposed to happen (in this case setting a block on fire) is correctly blocked, the client still sees the fire. Relogging fixes this and the fire is gone.

Expected behavior

The client receiving a block update telling the block is not on fire

Actual behavior

The client receives no update and thinks the block is on fire

Steps to reproduce the behavior

Prevent fire from happening when a player uses flint and steel by using the HOOK_PLAYER_USING_ITEM hook. If you want to see if the fire is properly blocked or not, relog or use a second account.

@PureTryOut
Copy link
Contributor Author

It doesn't update on placing water or lava using a bucket either, so it's definitely in the hook.

@pwnorbitals
Copy link
Contributor

Is this still a problem on latest builds ?

@tigerw
Copy link
Member

tigerw commented Nov 12, 2020

The code in cClientHandle::HandleRightClick looks like it'll resend blocks if the UsingItem hook was cancelled. Pending testing I believe this has been fixed.

@tigerw
Copy link
Member

tigerw commented Nov 13, 2020

Hooked HOOK_PLAYER_USING_ITEM and returned true. Clientside fire/water extinguished.

@tigerw tigerw closed this as completed Nov 13, 2020
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

4 participants