From bf9b1bb0a8642166bf79b5e6d28f81cdeebf9bbf Mon Sep 17 00:00:00 2001 From: ACGaming <4818419+ACGaming@users.noreply.github.com> Date: Sat, 28 Dec 2024 11:01:39 +0100 Subject: [PATCH] Fix spectral name tag cascading --- .../java/mod/emt/harkenscythe/event/HSEventLivingDeath.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/mod/emt/harkenscythe/event/HSEventLivingDeath.java b/src/main/java/mod/emt/harkenscythe/event/HSEventLivingDeath.java index 6182471..22113dc 100644 --- a/src/main/java/mod/emt/harkenscythe/event/HSEventLivingDeath.java +++ b/src/main/java/mod/emt/harkenscythe/event/HSEventLivingDeath.java @@ -75,7 +75,10 @@ public static void spawnSpectralEntity(World world, @Nullable EntityLivingBase e if (entity != null && isWhitelistedMob(entity)) { entity.getEntityData().setBoolean("IsSpectral", true); - entity.setCustomNameTag("Spectral " + entity.getName()); + if (!entity.getName().startsWith("Spectral")) + { + entity.setCustomNameTag(entity.hasCustomName() ? "Spectral " + entity.getCustomNameTag() : "Spectral " + entity.getName()); + } entity.setHealth(entity.getMaxHealth()); entity.deathTime = 0; entity.isDead = false;