Villager that buys my mod element

Started by dansamy on

Topic category: Help with Minecraft modding (Java Edition)

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

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 )

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

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.

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