Files
Purpur/patches/server/0145-Config-to-show-Armor-Stand-arms-on-spawn.patch
2024-12-03 21:01:29 -08:00

39 lines
2.5 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Encode42 <me@encode42.dev>
Date: Tue, 23 Mar 2021 22:42:20 -0400
Subject: [PATCH] Config to show Armor Stand arms on spawn
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 c954cb3255145e18e8ab1e5a1b0267b879bbd1f3..037586c0fdb42a02660aba89dd741a647c67e52b 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
@@ -128,6 +128,7 @@ public class ArmorStand extends LivingEntity {
this.rightArmPose = ArmorStand.DEFAULT_RIGHT_ARM_POSE;
this.leftLegPose = ArmorStand.DEFAULT_LEFT_LEG_POSE;
this.rightLegPose = ArmorStand.DEFAULT_RIGHT_LEG_POSE;
+ this.setShowArms(world != null && world.purpurConfig.armorstandPlaceWithArms); // Purpur
}
public ArmorStand(Level world, double x, double y, double z) {
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index c9cc7f51b2f86b4caf25d642159be418ddd20d61..908953ee49fa46c1cf11a815b6c48fd0e78d251b 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -103,6 +103,7 @@ public class PurpurWorldConfig {
public boolean armorstandMovement = true;
public boolean armorstandWaterMovement = true;
public boolean armorstandWaterFence = true;
+ public boolean armorstandPlaceWithArms = false;
private void armorstandSettings() {
armorstandStepHeight = (float) getDouble("gameplay-mechanics.armorstand.step-height", armorstandStepHeight);
armorstandSetNameVisible = getBoolean("gameplay-mechanics.armorstand.set-name-visible-when-placing-with-custom-name", armorstandSetNameVisible);
@@ -110,6 +111,7 @@ public class PurpurWorldConfig {
armorstandMovement = getBoolean("gameplay-mechanics.armorstand.can-movement-tick", armorstandMovement);
armorstandWaterMovement = getBoolean("gameplay-mechanics.armorstand.can-move-in-water", armorstandWaterMovement);
armorstandWaterFence = getBoolean("gameplay-mechanics.armorstand.can-move-in-water-over-fence", armorstandWaterFence);
+ armorstandPlaceWithArms = getBoolean("gameplay-mechanics.armorstand.place-with-arms-visible", armorstandPlaceWithArms);
}
public boolean arrowMovementResetsDespawnCounter = true;