How do I connect my potion-command to my villager's trading-system? [duplicate]
//ads -- adsterra.com -- native banner
?>
So I've got this command:
/summon Villager ~1 ~ ~ {
Profession: 2,
CustomName: "Aldorf the wizzard",
CustomNameVisible: 1,
Career: 1,
CareerLevel: 42,
PersistenceRequired: 1,
Silent: 1,
Invulnerable: 1,
Attributes: [
{
Name: "generic.maxHealth",
Base: 99999
}
],
Offers: {
Recipes: [
{
buy: {
id: "record_13",
Count: 1
},
buyB: {
id: "skull",
Count: 1,
Damage: 1
},
maxUses: 9999999,
sell: {
id: "stone",
Count: null
}
}
]
}
}
And you can see it says "stone" (null).
Now I want to change it so that I can trade from the disc and the skull (that are already there) into this custom potion:
/give @p potion 1 16385 {CustomPotionEffects:[{Id:3,Amplifier:0,Duration:60},{Id:7,Amplifier:0,Duration:60},{Id:9,Amplifier:0,Duration:120},{Id:10,Amplifier:0,Duration:60},{Id:14,Amplifier:0,Duration:20},{Id:15,Amplifier:0,Duration:140},{Id:16,Amplifier:0,Duration:600},{Id:17,Amplifier:500,Duration:600},{Id:18,Amplifier:9,Duration:600},{Id:19,Amplifier:100,Duration:600},{Id:20,Amplifier:100,Duration:200},{Id:23,Amplifier:500,Duration:600}],display:{Name:"Poison",Lore:["Poisons anyone it is used to.","The only way to survive is to drink milk in seconds."]}}
How do I connect them? I almost got it but there are these weird "]}}" signs at the end so I couldn't do it.
Best Answer
Add all of the potion's custom tags to the sell item, inside the tag tag:
/summon Villager ~1 ~ ~ { Profession: 2, CustomName: "Aldorf the wizzard", CustomNameVisible: 1, Career: 1, CareerLevel: 42, PersistenceRequired: 1, Silent: 1, Invulnerable: 1, Attributes: [ { Name: "generic.maxHealth", Base: 99999 } ], Offers: { Recipes: [ { buy: { id: "record_13", Count: 1 }, buyB: { id: "skull", Count: 1, Damage: 1 }, maxUses: 9999999, sell: { id: "potion", Count: 1, tag: { CustomPotionEffects:[{Id:3,Amplifier:0,Duration:60},{Id:7,Amplifier:0,Duration:60},{Id:9,Amplifier:0,Duration:120},{Id:10,Amplifier:0,Duration:60},{Id:14,Amplifier:0,Duration:20},{Id:15,Amplifier:0,Duration:140},{Id:16,Amplifier:0,Duration:600},{Id:17,Amplifier:500,Duration:600},{Id:18,Amplifier:9,Duration:600},{Id:19,Amplifier:100,Duration:600},{Id:20,Amplifier:100,Duration:200},{Id:23,Amplifier:500,Duration:600}],display:{Name:"Poison",Lore:["Poisons anyone it is used to.","The only way to survive is to drink milk in seconds."]} } } } ] } }
Pictures about "How do I connect my potion-command to my villager's trading-system? [duplicate]"
![How do I connect my potion-command to my villager's trading-system? [duplicate] - Man Kissing His Woman While Holding a Red Heart Shaped Balloon How do I connect my potion-command to my villager's trading-system? [duplicate] - Man Kissing His Woman While Holding a Red Heart Shaped Balloon](/assets/images/how_do_i_connect_my_potioncommand_to_my_villager39s_tradingsystem_duplicate_1.jpeg)
![How do I connect my potion-command to my villager's trading-system? [duplicate] - Couple Celebrating Valentine's Day How do I connect my potion-command to my villager's trading-system? [duplicate] - Couple Celebrating Valentine's Day](/assets/images/how_do_i_connect_my_potioncommand_to_my_villager39s_tradingsystem_duplicate_2.jpeg)
![How do I connect my potion-command to my villager's trading-system? [duplicate] - Couple Looking at Each Other While Holding a Red Heart Shaped Balloon How do I connect my potion-command to my villager's trading-system? [duplicate] - Couple Looking at Each Other While Holding a Red Heart Shaped Balloon](/assets/images/how_do_i_connect_my_potioncommand_to_my_villager39s_tradingsystem_duplicate_3.jpeg)
How do you summon a villager with custom trades?
First, you need to program the command block to summon a villager with the /summon command. This /summon command will be run each time the command block is activated. So, stand in front of the command block with your pointer (the plus sign) on the command block and click on the right mouse button.Can villagers run out of trades forever?
No, the specific trade that has an X on it is not able to be done again. The villager will have other trades, but that specific trade is unavailable forever.How To Make Custom Villager Trades in Minecraft 1.14
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: RODNAE Productions, RODNAE Productions, RODNAE Productions, RODNAE Productions
