mojira.dev
MC-298250

CustomName behavior in Minecarts/Boats is inconsistent with other entities

The behavior of custom names (that is, whether the CustomName nbt is shown or not above the entity) in Minecarts/Boats is quite weird compared to other entities.

Armor Stands also have a unique behavior for custom names which is intended as they are used for technical stuff. However, for Boats and Minecarts, this behavior doesn’t seem to be intended as it is a weird mix between Armor Stand’s and other mob’s behaviour as seen below.

Steps to reproduce the issue

Note: these steps are also recreated in the attached images. The conditions that affect the custom names 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 custom 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 CustomName behavior of each entity, you can also use this command to alternate the visibility of the custom name:

    /execute as @e[type=!minecraft:allay] run data modify entity @s CustomNameVisible set value <true/false>  

Actual result

For Boats and Minecarts, the CustomName 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 custom name still appears, similar to Armor Stands with CustomNameVisible set to true.

Expected result

Boats and Minecarts with custom names should either behave like mobs or like Armor Stands. Since custom names can only be used in Boats/Minecarts through commands, probably their behavior should be the same as Armor Stands, which can only show custom names using commands (that set CustomNameVisible to true).

Linked issues

Attachments

Comments 0

No comments.

JoeFly

(Unassigned)

Confirmed

Platform

Normal

Entities

1.21.5, 25w21a

Retrieved