Files
Lophine/lophine-server/minecraft-patches/features/0107-Leaves-Redstone-Shears-Wrench.patch
T
Helvetica Volubi c8b50d84a9 2 patches from EarthMe - Camellia
Co-authored-by: MrHua269 <mrhua269@gmail.com>
2026-07-18 02:00:06 +08:00

26 lines
1.2 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Helvetica Volubi <suisuroru@blue-millennium.fun>
Date: Wed, 23 Jul 2025 20:28:40 +0800
Subject: [PATCH] Leaves: Redstone Shears Wrench
Co-authored by: violetc <58360096+s-yh-china@users.noreply.github.com>
As a part of : Leaves (https://github.com/LeavesMC/Leaves/blob/79d9ef74c2684eb49060f07e1ab31c827326c9a5/leaves-server/minecraft-patches/features/0009-Redstone-Shears-Wrench.patch)
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
diff --git a/net/minecraft/world/item/ShearsItem.java b/net/minecraft/world/item/ShearsItem.java
index 9750a2a7f6d13f93119d0c6fba0bf11064d46e55..1913b30f1bfe013261b340fdf9917db90c98c695 100644
--- a/net/minecraft/world/item/ShearsItem.java
+++ b/net/minecraft/world/item/ShearsItem.java
@@ -80,7 +80,10 @@ public class ShearsItem extends Item {
return InteractionResult.SUCCESS;
} else {
- return super.useOn(context);
+ // Leaves start - shears wrench
+ InteractionResult result = org.leavesmc.leaves.util.ShearsWrenchUtil.tryApplyRotate(context, state);
+ return result == null ? super.useOn(context) : result;
+ // Leaves end - shears wrench
}
}
}