Villager that buys my mod element

Started by dansamy on

Topic category: Help with Minecraft modding (Java Edition)

Active 1 month ago
Joined Sep 2016
Points:
947

User statistics:

  • Modifications: 3
  • Forum topics: 9
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 334
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 :)

Active 1 month ago
Joined Jan 2019
Points:
891

User statistics:

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

waydeeperdown:dragons_blood_bottle instead of oak planks

( Modid:id )

Active 1 month ago
Joined Sep 2016
Points:
947

User statistics:

  • Modifications: 3
  • Forum topics: 9
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 334
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

Active 1 month ago
Joined Mar 2019
Points:
862

User statistics:

  • Modifications: 0
  • Forum topics: 30
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 92
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.

Active 1 month ago
Joined Sep 2016
Points:
947

User statistics:

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

Yeah! It works! A million thanks