Darkhax-Minecraft / BotanyPots

Adds some flower pots that can be used to grow various crops.
GNU Lesser General Public License v2.1
102 stars 78 forks source link

[QUESTION] How to create datapack that adds own recipie? #376

Closed DziwnyPanPL closed 8 months ago

DziwnyPanPL commented 8 months ago

Question

I would like to create that for example: Gunpowder grows on gravel, any example how to do it?

Darkhax commented 8 months ago

This is explained in the wiki. Here's an example for 1.20.4. If you need examples for older versions you can find all of the files for builtin crops here on github, just change the branch to the version you're working with.

{
  "type": "botanypots:crop",
  "seed": {
    "item": "minecraft:gunpowder"
  },
  "categories": [
    "gravel"
  ],
  "growthTicks": 1200,
  "display": {
    "type": "botanypots:aging",
    "block": "minecraft:tnt"
  },
  "drops": [
    {
      "chance": 1.00,
      "output": {
        "item": "minecraft:gunpowder"
      },
      "minRolls": 1,
      "maxRolls": 2
    },
    {
      "chance": 0.15,
      "output": {
        "item": "minecraft:gunpowder"
      },
      "minRolls": 1,
      "maxRolls": 2
    }
  ]
}