26 lines
1.3 KiB
Diff
26 lines
1.3 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 5e25ddf78f72ada318ef28d29199de9b93fe667e..6f48162a25e20d2439935e8995cede9497626322 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, blockState);
|
|
+ return result == null ? super.useOn(context) : result;
|
|
+ // Leaves end - shears wrench
|
|
}
|
|
}
|
|
}
|