From bf359bb81ef5c7fc363595514ac6d1d6ff0969da Mon Sep 17 00:00:00 2001 From: FlorianMichael <60033407+FlorianMichael@users.noreply.github.com> Date: Sat, 23 Sep 2023 03:20:44 +0200 Subject: [PATCH] Improved Hologram detection method in ArmorStandReplacement --- .../entityreplacements/ArmorStandReplacement.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/common/src/main/java/com/viaversion/viarewind/protocol/protocol1_7_6_10to1_8/entityreplacements/ArmorStandReplacement.java b/common/src/main/java/com/viaversion/viarewind/protocol/protocol1_7_6_10to1_8/entityreplacements/ArmorStandReplacement.java index 15044844a..6aa5735d7 100644 --- a/common/src/main/java/com/viaversion/viarewind/protocol/protocol1_7_6_10to1_8/entityreplacements/ArmorStandReplacement.java +++ b/common/src/main/java/com/viaversion/viarewind/protocol/protocol1_7_6_10to1_8/entityreplacements/ArmorStandReplacement.java @@ -43,7 +43,6 @@ public class ArmorStandReplacement extends EntityReplacement1_7to1_8 { private double locX, locY, locZ; private State currentState = null; private boolean invisible = false; - private boolean nameTagVisible = false; private String name = null; private float yaw, pitch; private float headYaw; @@ -117,8 +116,6 @@ public void updateState() { if (name != null && name.isEmpty()) name = null; } else if (metadata.id() == 10 && metadata.metaType() == MetaType1_8.Byte) { armorStandFlags = ((Number) metadata.getValue()).byteValue(); - } else if (metadata.id() == 3 && metadata.metaType() == MetaType1_8.Byte) { - nameTagVisible = ((Number) metadata.getValue()).byteValue() != 0; } } invisible = (flags & 0x20) != 0; @@ -126,7 +123,7 @@ public void updateState() { marker = (armorStandFlags & 0x10) != 0; State prevState = currentState; - if (invisible && marker) { + if (invisible && (name != null || marker)) { currentState = State.HOLOGRAM; } else { currentState = State.ZOMBIE;