Topic category: Help with Minecraft modding (Java Edition)
Hello! Im making an item that you can get from a type of log, yet i dont know how to make it so villagers buy it for a good price.
im using this command to replace sometimes normal villagers with a special farmer type:
/summon villager ~ ~ ~ {VillagerData:{profession:farmer,level:5,type:plains},Offers:{Recipes:[{buy:{id:potato,Count:40},sell:{id:emerald,Count:1},rewardExp:3b,maxUses:9999999},{buy:{id:carrot,Count:32},sell:{id:emerald,Count:1},rewardExp:3b,maxUses:9999999},{buy:{id:oak_planks,Count:1},sell:{id:emerald,Count:4},rewardExp:5b,maxUses:9999999},{buy:{id:melon,Count:4},sell:{id:emerald,Count:1},rewardExp:10b,maxUses:9999999},{buy:{id:emerald,Count:3},sell:{id:cookie,Count:18},rewardExp:3b,maxUses:9999999}]}}
The problem is the bold part: i dont know how to put the id of my element in the command. The id is ¨dragons_blood_bottle¨ (and no, the mod isnt about dragons xd). I dont know if i should use just the id or put the name of the mod too like waydeeperdown:dragons_blood_bottle.
i hope you can help :)
waydeeperdown:dragons_blood_bottle instead of oak planks
( Modid:id )
yeah, i know i should use oak_planks, that was the example xd
anyways i tried that
do something like that, if it hasn't changed from version to version :
buy:{id:"waydeeperdown:dragond_blood_bottle",Count:1},sell{id:emerald,Count:4},maxUses:999999}
The "" are important in this case i believe.. Yet i'm not sure if it is indeed requiered since it's been a couple of days since i last edited a custom Villager.
You probably anyways found the anwser by ModProgrammMiked , but still wanted to "clarify" an example since I don't have lots to do rn.
Yeah! It works! A million thanks