mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
only show armorstand name if it's custom, fixes #1514
This commit is contained in:
@@ -6,7 +6,7 @@ Subject: [PATCH] Apply display names from item forms of entities to entities
|
||||
|
||||
|
||||
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 5abbc0caf90cafc1a06dfff158c158b1538f827c..8b25bb80a913cd002cdaeadf076d811172f10488 100644
|
||||
index ebf1d6e3431e36811f14ed09d3b891a074fbdaf2..67eb7ddb77e781bf9d140133e0ad9f16c1ca0f0e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
@@ -613,6 +613,7 @@ public class ArmorStand extends LivingEntity {
|
||||
@@ -75,7 +75,7 @@ index 0b23e05f936cab7a9867828c2d69417cfde1d2ce..105e2b7d7cd7c64a9164e4114476e44f
|
||||
|
||||
public static enum Type implements StringRepresentable {
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ArmorStandItem.java b/src/main/java/net/minecraft/world/item/ArmorStandItem.java
|
||||
index 1634a7d5ff06583408cf2f02f2b5f90931b1e02a..dfe8473a880cbddfc3ac6a9c97f1a500624eeb38 100644
|
||||
index 1634a7d5ff06583408cf2f02f2b5f90931b1e02a..fd83261f64c6469aebde8ab13a6777b9b269cea2 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ArmorStandItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ArmorStandItem.java
|
||||
@@ -58,6 +58,14 @@ public class ArmorStandItem extends Item {
|
||||
@@ -86,7 +86,7 @@ index 1634a7d5ff06583408cf2f02f2b5f90931b1e02a..dfe8473a880cbddfc3ac6a9c97f1a500
|
||||
+ if (!world.purpurConfig.persistentDroppableEntityDisplayNames) {
|
||||
+ entityarmorstand.setCustomName(null);
|
||||
+ }
|
||||
+ if (world.purpurConfig.armorstandSetNameVisible) {
|
||||
+ if (world.purpurConfig.armorstandSetNameVisible && entityarmorstand.getCustomName() != null) {
|
||||
+ entityarmorstand.setCustomNameVisible(true);
|
||||
+ }
|
||||
+ // Purpur end
|
||||
@@ -126,14 +126,14 @@ index 530167ce8e5bb72a418f8ec61411e38a5892fd72..35dc7546793dba34bf6debad3f214f61
|
||||
|
||||
if (((HangingEntity) object).survives()) {
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index 8ba5fc8813ef1cb34f7df801f6d7b2ed42b1c052..1f5cfaf07e0fd86a530b57fd0198ade2b1d0d999 100644
|
||||
index 8ba5fc8813ef1cb34f7df801f6d7b2ed42b1c052..8a0eb8281364cd0b140381474a46d02a6c4ad3ba 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -97,8 +97,10 @@ public class PurpurWorldConfig {
|
||||
}
|
||||
|
||||
public float armorstandStepHeight = 0.0F;
|
||||
+ public boolean armorstandSetNameVisible = true;
|
||||
+ public boolean armorstandSetNameVisible = 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);
|
||||
|
||||
@@ -17,13 +17,13 @@ index 774c982f28b4f127fc3f036c19dfb47fb9ae3264..d49b60e7e643498b49c03593dc0da2f8
|
||||
// Paper end - Add PlayerNameEntityEvent
|
||||
mob.setPersistenceRequired();
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index 1f5cfaf07e0fd86a530b57fd0198ade2b1d0d999..548ad445ed73c5009c93cadb0ee8e39acdbd737c 100644
|
||||
index 8a0eb8281364cd0b140381474a46d02a6c4ad3ba..5b1c6815967d5006fbc466e3368398cc4d1f0c18 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -98,9 +98,11 @@ public class PurpurWorldConfig {
|
||||
|
||||
public float armorstandStepHeight = 0.0F;
|
||||
public boolean armorstandSetNameVisible = true;
|
||||
public boolean armorstandSetNameVisible = false;
|
||||
+ public boolean armorstandFixNametags = false;
|
||||
private void armorstandSettings() {
|
||||
armorstandStepHeight = (float) getDouble("gameplay-mechanics.armorstand.step-height", armorstandStepHeight);
|
||||
|
||||
@@ -66,12 +66,12 @@ index 67eb7ddb77e781bf9d140133e0ad9f16c1ca0f0e..d22ce9181e3b403328b8510bc73f8e6b
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index 91f204f313ee4b5a1f16416670e855d4e7177e51..c0f62102bb2147d08666013c5ca5360a5bcf8e8b 100644
|
||||
index 5694476f17d56f0db1c9fdfbafa1fc935cb84b3e..8c36c55ba6230bd254f1416e0a6446737fc1d911 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -99,10 +99,16 @@ public class PurpurWorldConfig {
|
||||
public float armorstandStepHeight = 0.0F;
|
||||
public boolean armorstandSetNameVisible = true;
|
||||
public boolean armorstandSetNameVisible = false;
|
||||
public boolean armorstandFixNametags = false;
|
||||
+ public boolean armorstandMovement = true;
|
||||
+ public boolean armorstandWaterMovement = true;
|
||||
|
||||
Reference in New Issue
Block a user