mojira.dev
MC-298250

Nametag visibility of Minecarts/Boats is inconsistent with other entities

The nametag/nameplate visibility of Boats and Minecarts is quite weird compared to other entities, preventing them to be spawned with an invisible nametag. As seen below, the conditions that affect the visibility of their nametag are a weird mix between Armor Stand’s (which have unique conditions due to their technical uses) and other mob’s.

Steps to reproduce the issue

Note: these steps are also recreated in the attached images (except for whether they’re in a team with nametagVisibility set). The conditions are listed on the left of each image.

  1. Summon 2 Oak Boats using the Oak Boat item or with commands.

  2. Use this command to give the Boats the name “Foo”:

    /execute as @e[type=minecraft:oak_boat] run data modify entity @s CustomName set value "Foo"
  3. Summon a mob, for instance, an Allay.

  4. Use this command to make the Allay ride one of the Boats:

    /ride @n[type=minecraft:allay] mount @n[type=minecraft:oak_boat]
  5. Repeat the steps above twice, but, instead of a Boat, use an Armor Stand and another mob, for example, a Pig.

  6. When checking the nametag visibility of each entity, you can also use this command to alternate one of the conditions:

    /execute as @e[type=!minecraft:allay] run data modify entity @s CustomNameVisible set value <true/false>
  7. Another condition that changes the nametag visibility is whether the entity is in a team that has nametagVisibility set to a value. You can also test this by adding the Boats to a team with this setting, set to “never“ for example, using the commands (in this order):

    /team add hidden_name
    /team modify hidden_name nametagVisibility never
    /team join hidden_name @e[type=minecraft:oak_boat]

Actual result

For Boats and Minecarts, the nametag only shows up if the player is looking at them or if CustomNameVisible is set to true, similar to the Pig. However, when they have a passenger or the player has pressed F1 to hide the HUD, the nametag still appears, similar to Armor Stands with CustomNameVisible set to true. Boats and Minecarts also completely ignore the nametag visibility setting of the team they’re on.

Expected result

Boats and Minecarts with custom names would either have nametags behave like mobs or like Armor Stands. This would make it possible to spawn a Boat or a Minecart with a custom name that has its nametag invisible.

Linked issues

Attachments

Comments 1

JoeFly

(Unassigned)

Confirmed

Platform HC

Normal

Entities

1.21.5, 25w21a, 26.1

Retrieved