From 4b1479607ad73d55d9096544c6a8a813fd554e69 Mon Sep 17 00:00:00 2001 From: Indrajeeth <79161058+IndrajeethY@users.noreply.github.com> Date: Fri, 31 Jul 2026 08:48:49 +0530 Subject: [PATCH] fix: send correct block state ID when cancelling interact event (#2405) The cancelled handler in handle_use_item_on sent block.id (BlockId) instead of the actual BlockStateId, causing clients to see wrong block states (e.g. stone appearing as snow) when plugins cancel PlayerInteractEvent on right-click. --- pumpkin/src/net/java/play.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pumpkin/src/net/java/play.rs b/pumpkin/src/net/java/play.rs index 738ae5eba..f390a29fe 100644 --- a/pumpkin/src/net/java/play.rs +++ b/pumpkin/src/net/java/play.rs @@ -2282,9 +2282,10 @@ impl JavaClient { server; event; 'cancelled: { + let state_id = world.get_block_state_id(&position); self.enqueue_packet(&CBlockUpdate::new( position, - VarInt(block.id.as_u16() as i32), + VarInt(i32::from(state_id.as_u16())), )) .await; return Ok(());