4

I want to summon custom Villagers for my minecraft adventure map that I am making. I figured out that to hide their career from their trading interface that you have to give them a custom name, but I only want the custom name to show in the trading interface and not when you hover over them. (Previous Question)

However when I do:

/summon Villager ~ ~ ~ {CustomName:Bob,CustomNameVisible:0}

Their Custom Name still shows. I don't know if this is a result of the way the CustomName tag works for mobs, or not. If anyone could explain this that would help a lot.

1
  • What Minecraft version are you using?
    – SirBenet
    Oct 26, 2015 at 12:06

2 Answers 2

4

An entity will not display its CustomName if there is another entity on top of it. For example, you can summon the villager with an invisible ArmmorStand on top of it:

In version 1.9 or higher:

/summon Villager ~ ~ ~ {CustomName:Bob,Passengers:[{id:ArmorStand,Invisible:1b,Marker:1b}]}

In versions 1.8 or lower:

/summon ArmorStand ~ ~ ~ {Invisible:1b,Marker:1b,Riding:{id:Villager,CustomName:Bob}}
2
  • 1
    I suggest making the armor stand into a Marker as well, to get rid of the hitbox.
    – MrLemon
    Oct 26, 2015 at 15:58
  • @MrLemon Good point; added to answer.
    – SirBenet
    Oct 26, 2015 at 16:02
1

1.13+ Update

Above answer still applies, however command syntax and format were changed in 1.13+.

1.13 command:

/summon minecraft:villager ~ ~ ~ {CustomName:'{"text":"Bob"}',Passengers:[{id:"minecraft:armor_stand",Invisible:1b,Marker:1b}]}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .