9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2026-01-04 15:41:31 +00:00
Files
LeavesMC/patches/server/0016-Stick-can-change-ArmorStand-arm-status.patch
2023-09-28 18:12:42 +08:00

24 lines
1.3 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: violetc <58360096+s-yh-china@users.noreply.github.com>
Date: Sat, 25 Jun 2022 19:54:23 +0800
Subject: [PATCH] Stick can change ArmorStand arm status
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
index 9b19cca3b8231b8fbda674f080922673503b1260..e3a32c8b764b4dec59c70283efc6611f469abe21 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
@@ -386,6 +386,12 @@ public class ArmorStand extends LivingEntity {
return InteractionResult.SUCCESS;
}
} else {
+ // Leaves start - stick can change ArmorStand arm status
+ if (top.leavesmc.leaves.LeavesConfig.stickChangeArmorStandArmStatus && itemstack.is(Items.STICK) && player.isShiftKeyDown()) {
+ setShowArms(!isShowArms());
+ }
+ // Leaves end - stick can change ArmorStand arm status
+
if (this.isDisabled(enumitemslot)) {
return InteractionResult.FAIL;
}