@@ -120,9 +120,6 @@ protected void initializeMetadata() {
120
120
super .initializeMetadata ();
121
121
// For the OptionalPack, set all bits as invisible by default as this matches Java Edition behavior
122
122
dirtyMetadata .put (EntityDataTypes .MARK_VARIANT , 0xff );
123
- // Since 1.20.60, the nametag does not show properly if this is not set :/
124
- // The nametag does disappear properly when the player is invisible though.
125
- dirtyMetadata .put (EntityDataTypes .NAMETAG_ALWAYS_SHOW , (byte ) 1 );
126
123
}
127
124
128
125
@ Override
@@ -154,6 +151,10 @@ public void spawnEntity() {
154
151
addPlayerPacket .setGameType (GameType .SURVIVAL ); //TODO
155
152
addPlayerPacket .setAbilityLayers (BASE_ABILITY_LAYER ); // Recommended to be added since 1.19.10, but only needed here for permissions viewing
156
153
addPlayerPacket .getMetadata ().putFlags (flags );
154
+
155
+ // Since 1.20.60, the nametag does not show properly if this is not set :/
156
+ // The nametag does disappear properly when the player is invisible though.
157
+ dirtyMetadata .put (EntityDataTypes .NAMETAG_ALWAYS_SHOW , (byte ) 1 );
157
158
dirtyMetadata .apply (addPlayerPacket .getMetadata ());
158
159
159
160
setFlagsDirty (false );
@@ -377,7 +378,6 @@ public void updateDisplayName(@Nullable Team team) {
377
378
378
379
if (needsUpdate ) {
379
380
dirtyMetadata .put (EntityDataTypes .NAME , this .nametag );
380
- dirtyMetadata .put (EntityDataTypes .NAMETAG_ALWAYS_SHOW , (byte ) 1 );
381
381
}
382
382
}
383
383
0 commit comments