Check if custom name is visible and if custom name is not empty. Fix …

* Check if custom name is visible and if custom name is not empty. Fix #327

* Fix typo
This commit is contained in:
Mats 2016-04-06 14:50:09 +02:00 committed by Myles
parent 7ea2156f37
commit 9f39662df6

View File

@ -146,7 +146,9 @@ public class EntityTracker extends StoredObject {
if (metadata.getId() == 0 && getMetaByIndex(metadataList, 10) != null) { if (metadata.getId() == 0 && getMetaByIndex(metadataList, 10) != null) {
Metadata meta = getMetaByIndex(metadataList, 10); //Only happens if the armorstand is small Metadata meta = getMetaByIndex(metadataList, 10); //Only happens if the armorstand is small
byte data = (byte) metadata.getValue(); byte data = (byte) metadata.getValue();
if ((data & 0x20) == 0x20 && ((byte) meta.getValue() & 0x01) == 0x01) { // Check invisible | Check small | Check if custom name is empty | Check if custom name visible is true
if ((data & 0x20) == 0x20 && ((byte) meta.getValue() & 0x01) == 0x01
&& ((String) getMetaByIndex(metadataList, 2).getValue()).length() != 0 && (boolean) getMetaByIndex(metadataList, 3).getValue()) {
if (!knownHolograms.contains(entityID)) { if (!knownHolograms.contains(entityID)) {
knownHolograms.add(entityID); knownHolograms.add(entityID);
try { try {