#recipe removal not working?
42 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
Is it inside the recipe event?
Please send your KubeJS server log. It can be found at /minecraft/logs/kubejs/server.log.
If you are on 1.18 or 1.16 it will be called server.txt.
Please send the file directly, without links or snippets.
And is the recipe you are trying to remove from a mod?
Why do you need to remove a recipe with a kubeJS item in it, surely that recipe is being added in kubeJS?
Recipe I'm trying to remove is one I added myself with bulk
Alright, from top to bottom
Paste version of server.log from @worn sky
Upload the entire script that adds the recipes in bulk
//in another file
const stones = ["andesite","basalt","blackstone","calcite","deepslate","diorite","granite","netherrack","stone","tuff"]
ServerEvents.recipes(event => {
stones.forEach(function(currentValue){compression2x2(event,"minecraft:"+currentValue,"kubejs:"+currentValue+"_pebble")})
}
function compression2x2(event,output,input)
{
event.shaped(
Item.of(output),
[
"AA ",
"AA ",
" "
],
{
A: input
}
)
}
Why don't you just remove deeplsate from there
Because I want to have it compress into cobbled deepslate
and stone ones as well
I guess I could put in "foreach" function check if it's those two and then change output
Change the array into an object which associates the pebble with its output
Then just loop through the keys of the object
Object.keys(stones).forEach
{"kubejs:andesite_pebble": "minecraft:andesite"...
Yes I understand
Just sounds like a lot of work for little gain, since it's the only place I'm probably going to be using this array 
and still don't know why recipe removal doesn't work, because it's not the only place where it's an issue
or you can just simplify it to this 
//in another file
const stones = ["andesite", "basalt", "blackstone", "calcite", "deepslate", "diorite", "granite", "netherrack", "stone", "tuff"]
ServerEvents.recipes(event => {
stones.forEach(stone => event.shaped(stone, ["AA", "AA"], { A: `kubejs:${stone}_pebble` }))
}
also if im understanding correctly, youre trying to remove recipes you added?
that doesnt work, you cant do that
It won't resolve the issue of deepslate pebble crafting deepslate and stone pebble crafting stone
but I did put exceptions in forEach function
for those two
Damn
It's a shame
//in another file
const stones = ["andesite", "basalt", "blackstone", "calcite", "deepslate", "diorite", "granite", "netherrack", "stone", "tuff"]
ServerEvents.recipes(event => {
stones.forEach(stone => {
if (stone == 'deepslate') return
event.shaped(stone, ["AA", "AA"], { A: `kubejs:${stone}_pebble` })
})
}

yup, this
or
//in another file
const stones = ["andesite", "basalt", "blackstone", "calcite", "deepslate", "diorite", "granite", "netherrack", "stone", "tuff"]
ServerEvents.recipes(event => {
blacklist = ['deepslate']
stones.forEach(stone => {
if (blacklist.contains(stone)) return
event.shaped(stone, ["AA", "AA"], { A: `kubejs:${stone}_pebble` })
})
}
stones.forEach(function(currentValue){
let output_id =""
if(currentValue == "stone"){output_id = "cobblestone",compression2x2(event,output_id,"kubejs:"+currentValue+"_pebble");return}
if(currentValue == "deepslate"){output = "cobbled_deepslate",compression2x2(event,output_id,"kubejs:"+currentValue+"_pebble");return}
compression2x2(event,"minecraft:"+currentValue,"kubejs:"+currentValue+"_pebble")})
Uh... is there a place where I can ask for help without making a new ticket? I don't want to be creating tens of tickets (I'm a bit fiddling with kubejs right now and WILL get around some issues)
Nah just create more tickets
sure, what's the worst they can do to me? ban me?
(I'm kidding mr admin who possibly will read this)
Ticket closed!