Villager that buys my mod element

Started by dansamy on

Topic category: Help with modding (Java Edition)

Last seen on 23:11, 16. Jul 2023
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Villager that buys my mod element

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 :)

Last seen on 15:05, 6. Oct 2023
Joined Jan 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
waydeeperdown:dragons_blood…
Sun, 09/13/2020 - 18:48

waydeeperdown:dragons_blood_bottle instead of oak planks

( Modid:id )

Last seen on 23:11, 16. Jul 2023
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
yeah, i know i should use…
Tue, 09/15/2020 - 21:41

yeah, i know i should use oak_planks, that was the example xd

anyways i tried that

Last seen on 01:56, 16. Jan 2024
Joined Mar 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
do something like that, if…
Fri, 09/18/2020 - 02:00

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.

Last seen on 23:11, 16. Jul 2023
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yeah! It works! A million…
Sun, 10/04/2020 - 22:44

Yeah! It works! A million thanks