mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
Config to show Armor Stand arms on spawn
This commit is contained in:
@@ -1,38 +0,0 @@
|
||||
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/net/minecraft/world/entity/decoration/ArmorStand.java b/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
index e1c7a644dc922ca726cebf71ec2f0b159d6db289..572bb7e1f6ae75f6dfe53b0e100b3654e42bf4c2 100644
|
||||
--- a/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
+++ b/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 f83e25e7586aa5b84a6a87cdd32ca7ee005e01c6..0c3438c1914d6ec828c270fecfc7cf101fcfd211 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;
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
+++ b/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
@@ -93,10 +_,12 @@
|
||||
@@ -93,10 +_,13 @@
|
||||
private boolean noTickPoseDirty = false;
|
||||
private boolean noTickEquipmentDirty = false;
|
||||
// Paper end - Allow ArmorStands not to tick
|
||||
@@ -10,6 +10,7 @@
|
||||
super(entityType, level);
|
||||
if (level != null) this.canTick = level.paperConfig().entities.armorStands.tick; // Paper - Allow ArmorStands not to tick
|
||||
+ if (level != null) this.canMovementTick = level.purpurConfig.armorstandMovement; // Purpur - Movement options for armor stands
|
||||
+ this.setShowArms(level != null && level.purpurConfig.armorstandPlaceWithArms); // Purpur - Config to show Armor Stand arms on spawn
|
||||
}
|
||||
|
||||
public ArmorStand(Level level, double x, double y, double z) {
|
||||
|
||||
@@ -95,6 +95,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);
|
||||
@@ -102,6 +103,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;
|
||||
|
||||
Reference in New Issue
Block a user