It is possible to trade emeralds with the Villagers only on their adult individuals, but it turns out that the cubs are also quite capable of trading. How to reproduce:
Get the command block, install it and enter the command in it: /data merge entity @e[type=minecraft:villager,limit=1] {Age:-24000}
Build a timer on repeaters in the amount of eight pieces (or more) and set the maximum delay on them.
Put a button next to the first repeater.
Summon a Villager by following the command: /summon minecraft:villager
To get any profession, quickly put any work block where the Villager is by running the command: /setblock ~ ~ ~ minecraft:smithing_table
Give yourself more emeralds by following the command: /give @s minecraft:emerald 64
Click on the button, thereby starting the timer on the repeaters and quickly open the trading window with the Villager.
After the timer on the repeaters ends and the command block changes the height of the Villager, making him a cub, you will not automatically exit the window of trading with the Villager, but everything will continue and you will be able to trade with him further, and the cub of the Villager will make joyful sounds and show various items suitable for the profession of the Villager.
Attachments
Comments 13
Reproduced in 26.1-snapshot-6.
I reaged the villager after testing this issue and any trades made when the villager is in a baby state lock the villager trades.
Also, the command you gave the merge the data did not work for me.
I did
/execute as @e[type=minecraft:villager,limit=1,sort=nearest] run data merge entity @s {Age:-24000}
Well, then try to reproduce it again on the villager-gunsmith, and not on the librarian. And make sure that you did everything exactly as I did.
I think you misunderstood what I was saying.
I said I reproduced the issue and attached a video of me doing so, but the command you gave did not work and I had to modify it slightly.
The command you gave would not turn any type of villager in to a baby for me on 26.1-snapshot-6 so I gave a modified version in case a moderator had a similar issue so they could just use that instead.
I wasn’t saying the issue wasn’t reproducable and I specifically said “Reproduced in 26.1-snapshot-6.”
Did you do this in version 26.1 of Snapshot 9? And anyway, when you reproduced this bug in versions 26.1 of Snapshot 7-26.1 of Snapshot 10, did you get the same result or was it different from the previous version?
Sorry for the late response.
I only tested it in the versions I listed and got the same result as you.
I would assume that it has the same result in the versions in between that I didn’t test.
Reproduced in 26.1
Thank you for helping us improve Minecraft! We saved your files: