9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-30 12:29:18 +00:00
Files
LeavesMC/patches/server/0016-Stick-can-change-ArmorStand-arm-status.patch
2023-12-10 21:15:29 +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 1e86e86b0a100a5d14aee10b60e70c32d2733660..18e9ee9e0c986b1174ff9529b198a839df12825f 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;
}