9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-28 19:39:22 +00:00
Files
LeavesMC/patches/server/0014-Stick-can-change-ArmorStand-arm-status.patch
2023-06-10 23:39:10 +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 8a8b9e8983be1acad66ad875c901be5bbdeabb1f..89f3466212800b5fac8a57d70fbc5a3028fbb29d 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
@@ -385,6 +385,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;
}