mojira.dev
MC-169755

Villager loses custom trades when it loses its profession

I tried to summon a custom villager.

Expected: Snowy farmer,  that buys 14 wheat for 1 diamond.

Actual: Snowy farmer for a split of second, then a villager that has no trades.

  

 

Run

/summon minecraft:villager ~ ~ ~ {Offers:{Recipes:[{buy:{id:"minecraft:wheat",Count:14b},sell:{id:"minecraft:diamond",Count:1b}}]},VillagerData:{profession:farmer,type:snow}}

and you will get just a snowy villager that was a farmer for a split of a second

Related issues

Attachments

Comments

migrated
[media][media][media]
marcono1234

Does MC-148932 describe your issue?
Also please always provide commands in text form. Typing them from screenshots is really cumbersome.

migrated

I don't think so. The bug when you summon a custom villager and it loses its custom trades and profession clearly is not a feature suggestion.

Should be related to MC-148932

migrated

Fixed command:

/summon villager ~ ~1 ~ {VillagerData:{profession:farmer,level:5,type:snow},Offers:{Recipes:[{buy:{id:wheat,Count:14},sell:{id:diamond,Count:1},maxUses:9999999}]}}

This is the same given command but summons the villager that actually does not lose the profession. What the command is missing is the level in the VillagerData, if not adding the level in the tag, villagers are default to novices.

marcono1234

Then please provide the used commands in text form. I currently do not understand what you mean by the following:

Actual: Snowy farmer for a split of second, then a villager that has no trades.

Because a villager losing its trades would possible indeed not be MC-148932. However if it actually gets its default trades then it is a duplicate of MC-148932.

migrated

It loses all trades

marcono1234

Can confirm this for 1.15.2-pre2, but very likely intended. I assume from a vanilla gameplay perspective it makes sense that a villager loses its trades when it loses its profession.
To work around it losing its profession, see MC-148932.

migrated

(Unassigned)

Unconfirmed

(Unassigned)

1.15.1, 1.15.2 Pre-Release 1, 1.15.2 Pre-release 2

Retrieved