Hi, I'm trying to create a custom crafting recipe in the enchanting apparatus using the event.custom() method, but it doesn't seem to work. The code itself doesn't have any errors, even when I use /reload there are no errors. On the other hand there is an error message in the kubejs log file which I can't quite wrap my head around, so I would like some help in solving my issue.
#Ars Nouveau enchanting apparatus custom crafting not working
17 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
??sendcode
Send your code here instead of a screenshot
It makes it easier to diagnose your code and help you fix it or make the required changes/additions.
??kjslogs
You can find your KubeJS server log in /minecraft/logs/kubejs/server.log.
If you are on 1.18 or below it will be called server.txt.
Please send it if asked, as it contains helpful information.
onEvent('recipes', event => {
createRecipe(event)
arsRecipes(event)
oreProcessing(event)
itemRemove(event)
unify(event)
})
function arsRecipes(event){
event.remove({output: CR('andesite_casing')})
//Enchanting apparatus
event.custom({
"type": "ars_nouveau:enchanting_apparatus",
"reagent": [
{"item": "occultism:otherstone"}
],
"pedestalItems": [
{
"item": {
"item": "#minecraft:wooden_slabs"
}
},
{
"item": {
"item": "create:andesite_alloy"
}
},
{
"item": {
"item": "#minecraft:wooden_slabs"
}
},
{
"item": {
"item": "create:andesite_alloy"
}
}
],
"output": {
"item": "create:andesite_casing"
},
"sourceCost": 250,
"keepNbtOfReagent": false
})
Paste version of server.txt from @craggy plaza
onEvent('recipes', event => {
createRecipe(event)
arsRecipes(event)
oreProcessing(event)
itemRemove(event)
unify(event)
})
function arsRecipes(event){
event.remove({output: CR('andesite_casing')})
//Enchanting apparatus
event.custom({
"type": "ars_nouveau:enchanting_apparatus",
"reagent": [
{"item": "occultism:otherstone"}
],
"pedestalItems": [
{
"tag": "minecraft:wooden_slabs"
},
{
"item": "create:andesite_alloy"
},
{
"tag": "minecraft:wooden_slabs"
},
{
"item": "create:andesite_alloy"
}
],
"output": {
"item": "create:andesite_casing"
},
"sourceCost": 250,
"keepNbtOfReagent": false
})
Try this
Paste version of server.txt from @craggy plaza
You have an Error with the second Tag. You have written tag: twice and have a {} to much
I would be very grateful if you could write down the corrected code. I am new to js/java so I don't know where these errors are at, thanks.
Wait sorry have edited the above Code. I have Made a stupid mistake
no problem