From e0d705d2eaffac60f64547c9001d040f33066f34 Mon Sep 17 00:00:00 2001 From: DaPigGuy Date: Sun, 24 Nov 2024 23:05:19 -0800 Subject: [PATCH] session/handler_player_action.go: Release item on StopItemUseOn action --- server/session/handler_player_action.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/session/handler_player_action.go b/server/session/handler_player_action.go index 5ba7d3abd..b2f4052fb 100644 --- a/server/session/handler_player_action.go +++ b/server/session/handler_player_action.go @@ -58,8 +58,10 @@ func handlePlayerAction(action int32, face int32, pos protocol.BlockPos, entityR return nil } c.ContinueBreaking(cube.Face(face)) - case protocol.PlayerActionStartItemUseOn, protocol.PlayerActionStopItemUseOn: + case protocol.PlayerActionStartItemUseOn: // TODO: Properly utilize these actions. + case protocol.PlayerActionStopItemUseOn: + c.ReleaseItem() case protocol.PlayerActionStartBuildingBlock: // Don't do anything for this action. case protocol.PlayerActionCreativePlayerDestroyBlock: