Mobs with CustomNameVisible set to true show their default name
The bug
When you set CustomNameVisible to 1b for a mob it displays its default name. This is not the case for other entities.
How to reproduce
- Use the following command
/summon Cow ~ ~ ~ {NoAI:1b,Health:0.1f,CustomNameVisible:1b}The cow has the name "Cow"
- Use the following command
/summon MinecartRideable ~ ~ ~ {CustomNameVisible:1b}The name is not displayed
The reason
The following is based on a decompiled version of Minecraft 1.10 using MCP 9.30.
The method net.minecraft.client.renderer.entity.RenderLiving.canRenderName(T) should test if the value of the tag CustomNameVisible is true and if the entity has a custom name.
protected boolean canRenderName(T entity) { // Replaced this // return super.canRenderName(entity) && (entity.getAlwaysRenderNameTagForRender() || entity.hasCustomName() && entity == this.renderManager.pointedEntity); return super.canRenderName(entity) && entity.getAlwaysRenderNameTagForRender() && entity.hasCustomName() && entity == this.renderManager.pointedEntity; }
Linked Issues
Created Issue:
Mobs with CustomNameVisible set to true show their default name
Opposite of:
The bug
When you set CustomNameVisible to 1b for a mob it displays its default name. This is not the case for other entities.
How to reproduce
- Use the following command
/summon Cow ~ ~ ~ {NoAI:1b,Health:0.1f,CustomNameVisible:1b}The cow has the name "Cow"
- Use the following command
/summon MinecartRideable ~ ~ ~ {CustomNameVisible:1b}The name is not displayed
Opposite of:
The bug
When you set CustomNameVisible to 1b for a mob it displays its default name. This is not the case for other entities.
How to reproduce
- Use the following command
/summon Cow ~ ~ ~ {NoAI:1b,Health:0.1f,CustomNameVisible:1b}The cow has the name "Cow"
- Use the following command
/summon MinecartRideable ~ ~ ~ {CustomNameVisible:1b}The name is not displayed
relates to
Please link to this comment in the description
The following is based on a decompiled version of Minecraft 1.10 using MCP 9.30.
The method net.minecraft.client.renderer.entity.RenderLiving.canRenderName(T) should test if the value of the tag CustomNameVisible is true and if the entity has a custom name.
protected boolean canRenderName(T entity) { // Replaced this // return super.canRenderName(entity) && (entity.getAlwaysRenderNameTagForRender() || entity.hasCustomName() && entity == this.renderManager.pointedEntity); return super.canRenderName(entity) && entity.getAlwaysRenderNameTagForRender() && entity.hasCustomName() && entity == this.renderManager.pointedEntity; }
The bug
When you set CustomNameVisible to 1b for a mob it displays its default name. This is not the case for other entities.
How to reproduce
- Use the following command
/summon Cow ~ ~ ~ {NoAI:1b,Health:0.1f,CustomNameVisible:1b}The cow has the name "Cow"
- Use the following command
/summon MinecartRideable ~ ~ ~ {CustomNameVisible:1b}The name is not displayed
The reason
The following is based on a decompiled version of Minecraft 1.10 using MCP 9.30.
The method net.minecraft.client.renderer.entity.RenderLiving.canRenderName(T) should test if the value of the tag CustomNameVisible is true and if the entity has a custom name.
protected boolean canRenderName(T entity) { // Replaced this // return super.canRenderName(entity) && (entity.getAlwaysRenderNameTagForRender() || entity.hasCustomName() && entity == this.renderManager.pointedEntity); return super.canRenderName(entity) && entity.getAlwaysRenderNameTagForRender() && entity.hasCustomName() && entity == this.renderManager.pointedEntity; }
If this is resolved as WAI someone please remember to have
MC-95905reopened.Confirmed for 1.9
Still in 1.9.1-pre1
Still in 1.9.1-pre3
I assume that the behaviour described in
MC-95905is rather a bug. Setting CustomNameVisible to 1b means that the person who did this wants a name to be shown.The following is based on decompiled version of Minecraft 1.9 using MCP 9.24 beta. All method and class names are the names used in the decompiled version.
The reason why this is different for mobs than for entities is very likely because players have their CustomNameVisible set to false however the method net.minecraft.entity.player.EntityPlayer.getAlwaysRenderNameTagForRender() returns always true for them.
The affected method for entities would be net.minecraft.client.renderer.entity.Render.canRenderName(T).
Still in 16w15b
Mobs behave differently by design.
Reopening.
[Mojang] Grum (Erik Broes), when I asked for feedback when a report was closed I did not mean generic statements like this. Of course you can call it design, but it is inconsistent and matches the definition of a bug perfectly. The tag is called CustomNameVisible and "Cow" is definitely not a custom name.
Could you please not close reports like this. It is always annoying to comment and / or write on /r/Mojira just to get reports reopened and I am sure the mods, everyone watching the reports and you as well does not enjoy that very much because it is a waste of time.
THE HELL.
Of course by the command we can say that the "customnamevisible" tag is only a tag to show whether the custom name is visible or not.
IF YOU ACTUALLY WANT TO CHANGE THE CUSTOM NAME, HERE IS A SAMPLE COMMAND:
/summon Cow ~ ~ ~ {CustomName:"Name"}JUST UNDERSTAND THE TAG.
Of course Grum would shut the report.
Also for
MC-95905,There is a huge difference between "Default" name and "Custom" name. Probably there is no default name for the minecart.
Once again, the "CustomNameVisible" is just to say if the custom name should be visible or not.
I wonder how the helpers can't figure something as easy as this.
No Offence but the helpers didn't even consider understanding the tag.
What in the world are you talking about?
[Mojang] Grum (Erik Broes) said it's intended, so be it.
That's what I said.
It's intended.
What are you implying here, is what I meant.
user-f4f74 this report is about the fact that CustomNameVisible:1b shows the default name of mobs, which is not a custom name and because of this confusing because the tag suggests that it only shows custom names but not the default ones.
Well of course if no one set the custom name, probably the custom name would be the default. I mean that the developers probably set the names as the custom. First of all, there is no tag such as "Default name"(Heh Heh), AND, if you say the names that are displayed by default using the customname tag are default, I would rather say that it should be visible when the mobs are just spawned.
Also it is better if those names(such as "Cow" on a cow) are visible, as you will know that the command is working. It would be better then there was nothing, just like it is on the minecart.
Although I understand what the reporter meant, why should the developers trouble themselves over something as puny as this? Aren't I right?
This is not the place for discussions, but like I said it is inconsistent and against what you would expect.