mojira.dev
MC-214602

Villagers don't show their trade offer if the player is holding the bought item in their offhand

Villagers will not hold an item they are selling to the player if said player is holding the item the villager wants in their offhand.

Steps to Reproduce:

  1. Summon a villager with a trade and profession (Profession is necessary due to MC-164353)

    /summon villager ~ ~ ~ {VillagerData:{level:5,profession:"minecraft:nitwit"},Offers:{Recipes:[{buy:{id:"minecraft:emerald",Count:1b},sell:{id:"minecraft:dirt",Count:1b}}]}}
  2. Set time to day

    /time set day
  3. Hold an emerald in the offhand
    → ❌ - The villager will not hold dirt

Expected Results:

✔ - The villager would hold the item they are selling

Screenshots/Videos:

[media]

Notes:

Related to:

MC-269311 MC-167040

Related issues

Attachments

Comments

migrated
[media]

[^977@C2)}VQS17OX)A_47P(L.png]

[media]

[^N@5JS4Z}%U`N{AT37KV@%DR.png]

Avoma

Can confirm in 21w06a.

Avoma

Can confirm in 21w07a.

Avoma

Video attached.

Avoma

Here are some steps to reproduce this issue:

Steps to Reproduce:

  • Spawn a villager and place any work station nearby. (Blast furnace, cauldron, etc..)

  • Hold the appropriate item in your main hand, that the villager is willing to trade for.

  • Switch the item into your offhand.
    → ❌  Notice how upon doing this, the villager no longer shows what it has to offer.

Avoma

Can confirm in 1.17.

Avoma

Can confirm in 1.18.1.

Avoma

Can confirm in 1.18.2 and 1.19 Pre-release 1.

[Mod] Jingy

Can confirm in 23w45a. I'd like to request ownership of this issue seeing as the original poster has not kept up with it in 1.5 years.

[Mod] Jingy

This relates to MC-194529, MC-150589, MC-196916, and MC-166669

[Mod] Jingy

(Unassigned)

Confirmed

Mob behaviour, Village system

Villager-trading, entity-model, villager

1.16.5, 21w05b, 21w06a, 21w07a, 1.17, ..., 1.20.4, 23w51b, 24w09a, 1.20.5, 24w34a

Retrieved