Files
Purpur/patches/server/0163-Config-to-show-Armor-Stand-arms-on-spawn.patch
2021-12-02 19:15:58 -05:00

39 lines
2.4 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 e9e24435057cff9c0af758ca2aa822c3b1c3593d..8634431cabae82b71f409f02c84dda2d8eca8504 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
@@ -113,6 +113,7 @@ public class ArmorStand extends LivingEntity {
this.leftLegPose = ArmorStand.DEFAULT_LEFT_LEG_POSE;
this.rightLegPose = ArmorStand.DEFAULT_RIGHT_LEG_POSE;
this.maxUpStep = 0.0F;
+ 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 064bb5a0fcff3692609ad84b09227276aa0e140a..f3a29c15d993b8dd4936b9f9678be9740110f72f 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -106,6 +106,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);
@@ -113,6 +114,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 int daytimeTicks = 12000;