Fix: Nametags not showing up (#4427)

This commit is contained in:
chris 2024-02-08 17:30:01 +01:00 committed by GitHub
parent 63fd97ab32
commit 19c6648bc2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -120,6 +120,9 @@ public class PlayerEntity extends LivingEntity implements GeyserPlayerEntity {
super.initializeMetadata();
// For the OptionalPack, set all bits as invisible by default as this matches Java Edition behavior
dirtyMetadata.put(EntityDataTypes.MARK_VARIANT, 0xff);
// Since 1.20.60, the nametag does not show properly if this is not set :/
// The nametag does disappear properly when the player is invisible though.
dirtyMetadata.put(EntityDataTypes.NAMETAG_ALWAYS_SHOW, (byte) 1);
}
@Override