#Botany pot recipe for every seed
39 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
you could use mystical's api to get every crop to iterate over and then make botany recipies from there
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
you could try something like Ingredient.of(/mystical.*seeds/).itemIds
Nope 'mysticalagriculture:certus_quartz_seeds'
Me, a js noob, having no idea how to do that
...enigma just explained it
But how specificly can I use that?
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)
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?
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
Ah ok thanks a lot, I will test it once I get home
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
}
]
)```
Paste version of server.log from @regal mural
You have use mystical_seeds as the variable Name for the Ingredient but then try to Loop over seeds which isn't defined
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
}
]
)
})
Paste version of server.log from @regal mural

wrap the 10 in an array
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
}
]
)
})```?
yep
Just wanted to write that it gives the same error, turns out I forgot to save
Now I saved but still the same error
Paste version of server.log from @regal mural

Any idea?
Is this a problem with my script or with kubejs botanypots?
looks like a problem with kjs botany pots
I will make a new support post then, specifically asking for help with kubejs botanypots