mojira.dev
MC-312828

Trading with villagers and wandering traders gives experience orbs when the `mob_drops` game rule is set to false

The Bug:

Trading with villagers and wandering traders gives experience orbs when the mob_drops game rule is set to false.

Breeding animals does not give experience orbs when the mob_drops game rule is set to false, as the rule controls drops from mobs, including experience orbs. Trading with villagers and wandering traders still gives experience orbs when the mob_drops game rule is set to false, therefore introducing an inconsistency.

Steps to Reproduce:

  1. Set the mob_drops game rule to false by using the command provided below.

    /gamerule minecraft:mob_drops false
  2. Summon a wandering trader by using the command provided below.

    /summon minecraft:wandering_trader ~ ~ ~2 {NoAI:1b,Offers:{Recipes:[{buy:{id:"minecraft:emerald",count:1},sell:{id:"minecraft:dirt",count:1},maxUses:99}]}}
  3. Obtain some emeralds and trade with the wandering trader.

  4. Observe if experience orbs are spawned.

Observed Behavior:

Experience orbs are granted when the mob_drops game rule is set to false.

Expected Behavior:

Experience orbs would not be granted when the mob_drops game rule is set to false.

Linked issues

Attachments

Comments 1

Avoma

(Unassigned)

Unconfirmed

Entities, Trading

26.3, 26.4 Snapshot 5

Retrieved