#Botany pot recipe for every seed

39 messages · Page 1 of 1 (latest)

regal mural
#

I added custom seeds with mystical customization and got some other mystical agriculture addons wich don't have recipes in the botany pots. I wanted to ask if it is possible to do something that makes a botany pot recipe for every mystical agriculture seed. If possible using the kubejs addon? Thanks in advance

drifting tundraBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

somber gorge
#

you could use mystical's api to get every crop to iterate over and then make botany recipies from there

regal mural
#

Im sorry but I am not verry good at java, I can do the basics but not something complicated like this

#

I was just thinking if I could somwhow get all items from mystical_agriculture that end with seed and make a recipe for the same item but with essence at the end

woeful apex
#

pretty sure MA works on nbt

#

not item ids

somber gorge
#

you could try something like Ingredient.of(/mystical.*seeds/).itemIds

regal mural
woeful apex
#

nvm i'm thinking of agricraft sorry

#

yeah, you could use regex

regal mural
#

Me, a js noob, having no idea how to do that

woeful apex
#

...enigma just explained it

regal mural
#

But how specificly can I use that?

somber gorge
#

that's a string list of every seed matching that regex, so it should include mystical customization (but iirc they actually fall under the mystical agriculture namespace)

regal mural
#
        Ingredient.of(/mystical.*seeds/).itemIds, // seed item
        ["farmland"], // categories that this crop can be planted on
        10, // growthTicks
        1, // growthModifier - this can be set to 1 in most cases
        { block: "minecraft:candle" }, // display block
        [
            {
                output:  Ingredient.of(/mystical.*essence/).itemIds, // item
                chance: 100, // weight of this entry compared to the others
                minRolls: 1, // the minimum times this loot will be chosen
                maxRolls: 2, // the maximum times this loot will be chosen
                // for example, when chosen this will give 1 to 2 candles
            }
        ]
    )```
Something like that?
somber gorge
#

so say....

let seeds = Ingredient.of(/mystical.*seeds/).itemIds
seeds.forEach(seed => {
  let essence = seed.replace('seeds', 'essence')
  // I now have seed and essence item ids
  // rest of the owl
})
#

seed is a single seed id, essence is it's matching essence

#

those would drop into your recipes in relevant places

regal mural
#

Ah ok thanks a lot, I will test it once I get home

regal mural
# somber gorge so say.... ```js let seeds = Ingredient.of(/mystical.*seeds/).itemIds seeds.forE...
seeds.forEach(seed => {
  let mystical_essence = seed.replace('seeds', 'essence')
 
})
event.recipes.botanypots.soil(
  "mysticalagradditions:insanium_farmland", // the item that this soil is attached to
  { block: "mysticalagradditions:insanium_farmland" }, // display block
  ["insanium_farmland"], // categories that this soil provides
  -1 // growth ticks that this soil will provide, set to -1 for no modifier
)
event.recipes.botanypots.crop(
  mystical_seeds, // seed item
  ["insanium_farmland"], // categories that this crop can be planted on
  10, // growthTicks
  1, // growthModifier - this can be set to 1 in most cases
  { block: mystical_seeds }, // display block
  [
      {
          output: mystical_essence, // item
          chance: 100, // weight of this entry compared to the others
          minRolls: 1, // the minimum times this loot will be chosen
          maxRolls: 2, // the maximum times this loot will be chosen
          // for example, when chosen this will give 1 to 2 candles
      }
  ]
)```
subtle forgeBOT
#

Paste version of server.log from @regal mural

formal palm
#

You have use mystical_seeds as the variable Name for the Ingredient but then try to Loop over seeds which isn't defined

vestal thicket
#

never used kjs botany pots before, however your script should look something like this:

let seeds = Ingredient.of(/mystical.*seeds/).itemIds

e.recipes.botanypots.soil(
    "mysticalagradditions:insanium_farmland", // the item that this soil is attached to
    { block: "mysticalagradditions:insanium_farmland" }, // display block
    ["insanium_farmland"], // categories that this soil provides
    -1 // growth ticks that this soil will provide, set to -1 for no modifier
)
seeds.forEach(seed => {
    let essence = seed.replace('seeds', 'essence')
    e.recipes.botanypots.crop(
        seed, // seed item
        ["insanium_farmland"], // categories that this crop can be planted on
        10, // growthTicks
        1, // growthModifier - this can be set to 1 in most cases
        { block: seed }, // display block
        [
            {
                output: essence, // item
                chance: 100, // weight of this entry compared to the others
                minRolls: 1, // the minimum times this loot will be chosen
                maxRolls: 2, // the maximum times this loot will be chosen
                // for example, when chosen this will give 1 to 2 candles
            }
        ]
    )
})
subtle forgeBOT
#

Paste version of server.log from @regal mural

regal mural
# vestal thicket <:hmmm:609911633078124558>

  event.recipes.botanypots.soil(
      "mysticalagradditions:insanium_farmland", // the item that this soil is attached to
      { block: "mysticalagradditions:insanium_farmland" }, // display block
      ["insanium_farmland"], // categories that this soil provides
      -1 // growth ticks that this soil will provide, set to -1 for no modifier
  )
  seeds.forEach(seed => {
      let essence = seed.replace('seeds', 'essence')
      event.recipes.botanypots.crop(
          seed, // seed item
          ["insanium_farmland"], // categories that this crop can be planted on
      [10], // growthTicks
          1, // growthModifier - this can be set to 1 in most cases
          { block: seed }, // display block
          [
              {
                  output: essence, // item
                  chance: 100, // weight of this entry compared to the others
                  minRolls: 1, // the minimum times this loot will be chosen
                  maxRolls: 2, // the maximum times this loot will be chosen
                  // for example, when chosen this will give 1 to 2 candles
              }
          ]
      )
  })```?
vestal thicket
#

yep

regal mural
#

Just wanted to write that it gives the same error, turns out I forgot to save

regal mural
subtle forgeBOT
#

Paste version of server.log from @regal mural

vestal thicket
regal mural
regal mural
vestal thicket
#

looks like a problem with kjs botany pots

regal mural
#

I will make a new support post then, specifically asking for help with kubejs botanypots