Arqade Asked on April 21, 2021
I’m trying to make it so that when a villager runs out of stock of a specific trade, it removes that trade from the villager.
I’m stuck at the part where I remove the trade.
So far I can only wipe the villager’s trades or add a new trade, but not remove a specific trade.
I’ve tried using
/data modify with the path : Offers.Recipes[{buy:{id:”minecraft:stone”},sell:{id:”minecraft stone”}}]
I’ve also tried it with the Count tag, but it does not work either.
Instead of using /data modify
, use /data remove
.
/data remove @e[type=villager,name="TheVillagerToActUpon",limit=1] Offers.Recipes[{buy:{id:"minecraft:stone"},sell:{id:"minecraft:stone"},Uses:5}]
Replace the 5
in Uses:5
to say how many times the trade can be used. Put the command in a repeating command block.
Correct answer by ExpertCoder14 on April 21, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP