mojira.dev
MC-175018

Summoned villager with trades not giving discount after being cured from zombie

Summoned some Villagers with the same trades they normally offer. Turned into Zombie Villager, then cured, but their trades stayed the same. Tested with a Master level Mason with 10 trades and an Apprentice Librarian with 4 trades. Tested in Multiplayer server and Single player

Summoned with Command Blocks in Creative mode. Turned into Zombie Villagers and cured in Survival mode

Update after testing for 1.16rc1

  • Villager seems to be getting experience from trading with the player very slowly. Villager level doesn't seem to match xp needed to advance the level. After trading for 120 xp worth, Apprentice level bar moved forward about 30% of the total, when it should only require 60 xp to level up to Journeyman

  • Command in Command Block used to summon villager:

    summon villager ~ ~1 ~ {VillagerData:{profession:librarian,level:2,type:plains},Offers:{Recipes:[{buy:{id:paper,Count:24},sell:{id:emerald,Count:1},maxUses:16},{buy:{id:emerald,Count:5},buyB:{id:book,Count:1},sell:{id:enchanted_book,Count:1,tag:{StoredEnchantments:[{id:silk_touch,lvl:1}]}},maxUses:12},{buy:{id:emerald,Count:1},sell:{id:lantern,Count:1},maxUses:12},{buy:{id:emerald,Count:16},buyB:{id:book,Count:1},sell:{id:enchanted_book,Count:1,tag:{StoredEnchantments:[{id:feather_falling,lvl:4}]}},maxUses:12}]}}

Linked issues

Comments 5

Please check if this is still an issue for you in 1.16 Release Candidate 1 or later.

Problem still present in 1.16-RC1.

Summoned villager with Command Block and using:

summon villager ~ ~ ~1 {VillagerData:{profession:librarian,level:2,type:plains},Offers:{Recipes:[{buy:{id:paper,Count:24},sell:{id:emerald,Count:1},maxUses:16},{buy:{id:emerald,Count:5},buyB:{id:book,Count:1},sell:{id:enchanted_book,Count:1,tag:{StoredEnchantments:[{id:silk_touch,lvl:1}]}},maxUses:12},{buy:{id:emerald,Count:1},sell:{id:lantern,Count:1},maxUses:12},{buy:{id:emerald,Count:16},buyB:{id:book,Count:1},sell:{id:enchanted_book,Count:1,tag:{StoredEnchantments:[{id:feather_falling,lvl:4}]}},maxUses:12}]}}

Then, summoned Zombie using spawn egg to infect the villager. Cure it afterwards, got the achievment but no discounts offered

Villager seems to be getting experience from trading with the player very slowly. Villager level doesn't seem to match xp needed to advance the level

Done in survival, hard difficulty

The reason your villager is not discounting is because you did not specify the priceMultiplier (used to determine adjusted prices) for any of the trades, so they all defaulted to 0. As for the villager levelling up too slowly, you did not specify the xp tag for any of the trades either, so they all defaulted to 1.

Thanks Jacob for the suggestions. I included the priceMultiplier and xp tags. Villager xp worked correctly, but no discounts were offered for the 4 trades included in the start. Trades from succesive levels offered the discounts after trading and curing from zombie in every case, but not the initial 4 trades

This is the line I used to summon the villager

summon villager ~ ~ ~1 {VillagerData:{level:2,profession:librarian,type:plains},Xp:10,Offers:{Recipes:[{buy:{id:paper,Count:24},sell:{id:emerald,Count:1},maxUses:16,xp:2,priceMultiplier:0.05,rewardExp:1},{buy:{id:emerald,Count:5},buyB:{id:book,Count:1},sell:{id:enchanted_book,Count:1,tag:{StoredEnchantments:[{id:silk_touch,lvl:1}]}},maxUses:12,xp:1,priceMultiplier:0.2,rewardExp:1},{buy:{id:emerald,Count:1},sell:{id:lantern,Count:1},maxUses:12,xp:5,priceMultiplier:0.05,rewardExp:1},{buy:{id:emerald,Count:16},buyB:{id:book,Count:1},sell:{id:enchanted_book,Count:1,tag:{StoredEnchantments:[{id:feather_falling,lvl:4}]}},maxUses:12,xp:5,priceMultiplier:0.2,rewardExp:1}]}}

I also tried by adding the "demand" tag in the trades, with values 0 and 1, but I saw no difference in the prices in either case

Tested in 1.16.1

 

 

priceMultiplier is a float, so you need to write priceMultiplier:0.2f.

Javier Salcedo

(Unassigned)

Unconfirmed

(Unassigned)

1.15.2, 1.16 Release Candidate 1, 1.16

Retrieved