From 1ab273641e3291c7e203ea9c152ae80985adf783 Mon Sep 17 00:00:00 2001 From: Kacpherek Date: Tue, 27 Oct 2026 22:31:36 +0100 Subject: [PATCH] Disarm a tripwire with shears before breaking it TripWireBlock.playerWillDestroy sets DISARMED (flags 260) and fires the shear event when the main hand holds shears; the property was never set. --- crates/horizon-client/src/game.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/crates/horizon-client/src/game.rs b/crates/horizon-client/src/game.rs index 3c0bed9bf..bc1dec6e5 100644 --- a/crates/horizon-client/src/game.rs +++ b/crates/horizon-client/src/game.rs @@ -3988,6 +3988,16 @@ impl Game<'_> { // library: the block entity's side effects (containers spill), neighbour // and shape updates, and the destroy event (particles, sound). let creative = self.creative; + // TripWireBlock.playerWillDestroy: shears disarm the string first (flags + // 260), so taking it down does not trip the hook. + if &*facts.name == "minecraft:tripwire" + && self.held().is_some_and(|s| &*s.item == "minecraft:shears") + && let Some(disarmed) = self.with_props(state, &[("disarmed", "true")]) + { + let at = BlockPos::new(pos[0], pos[1], pos[2]); + self.with_level(|b, level, ticks| b.set_block(level, ticks, at, disarmed, 260)); + self.post_block_game_event("minecraft:shear", pos, self.sculk_actor(), None); + } // BeehiveBlock.playerWillDestroy: a creative break still drops the hive // with its bees and honey level. if creative