9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-28 11:29:12 +00:00
Files
LeavesMC/patches/server/0017-Stick-can-change-ArmorStand-arm-status.patch
violetc f40d340092 1.20.6 (#216)
---------

Co-authored-by: MC_XiaoHei <xiaohei.xor7studio@foxmail.com>
Co-authored-by: Bluemangoo <chenfy2006@qq.com>
2024-05-20 23:03:56 +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 a02ca704e98ef42f32c3c50b111ee3537f60bf7b..32fd9c3d79bb9e9e75b03750696425089e503dcb 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
@@ -393,6 +393,12 @@ public class ArmorStand extends LivingEntity {
return InteractionResult.SUCCESS;
}
} else {
+ // Leaves start - stick can change ArmorStand arm status
+ if (org.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;
}