Breaking tripwire with shears does not consume durability
Summary
Breaking tripwire with shears correctly disarms it, but the shears do not lose durability in Survival or Adventure mode.
Current behavior
TripwireBlock::broken detects the held shears and sets disarmed = true, preventing the hooks from pulsing. It then stops at an explicit TODO:
// TODO: Deduct 1 durability from held shears (skip in Creative mode).No held stack damage or inventory update is performed.
Vanilla behavior
Using shears to destroy and disarm tripwire costs one point of shears durability outside Creative mode. The special shears break path prevents the attached tripwire hooks from activating.
Reference: https://minecraft.wiki/w/String
Reproduction
- In Survival, connect tripwire between two hooks.
- Note the held shears' durability.
- Break one tripwire segment with the shears.
Pumpkin disarms the tripwire but leaves the shears unchanged. Vanilla consumes one durability.
Suggested fix
Damage the held shears by one in the disarm path using the normal item-damage helper, skip the cost for Creative players, and send the resulting held-slot/break update. Add Survival, Creative, and one-durability-remaining coverage while preserving the no-hook-pulse behavior.
Verified against current master at 1ac447f2918b7dec7d19a5836fa3673d4fe3c9f5; the connected issue list and targeted search found no existing tripwire/shears durability issue.
Source: Pumpkin-MC/Pumpkin