Mojira Archive
MC-114760

Client may display incorrect villager career name

The bug

Client-side an incorrect villager career name might be displayed when the CustomNameVisible tag of a villager is set to true but no CustomName is set.

In the attached screenshot 2017-11-22_12.45.22.png you see a "Shepherd" (GUI title and trades) with the name "Fletcher".

How to reproduce

Use the following command and compare the shown name with the trades and the name in the GUI

/summon villager ~ ~ ~ {CustomNameVisible:1b,Profession:0,Career:3,CareerLevel:1}

Note: This might require multiple tries since the client could randomly pick the correct Career.

Code analysis

Based on 1.11.2 decompiled using MCP 9.35 rc1

The Career value of a villager is not send to the client, therefor it randomizes it. Additionally the client should very likely not call the method net.minecraft.entity.passive.EntityVillager.populateBuyingList().