#recipe removal not working?

42 messages · Page 1 of 1 (latest)

worn sky
#

Ok. I might be asking a stupid question.

event.remove({input: "kubejs:deepslate_pebble", output: "minecraft:deepslate"})```
This command is written correctly yes?
It should remove any recipe that has input "deepslate_pebble" and outputs "minecraft:deepslate" and amount of items in recipe don't matter does it?
south sailBOT
#

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

obtuse kernel
#

Is it inside the recipe event?

fiery anvilBOT
#

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.

obtuse kernel
#

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?

worn sky
#

Recipe I'm trying to remove is one I added myself with bulk

obtuse kernel
#

Just filter it then

#

Send the bulk addition code

worn sky
#

Alright, from top to bottom

worn sky
fiery anvilBOT
#

Paste version of server.log from @worn sky

obtuse kernel
worn sky
#
//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
        }
    )
}
obtuse kernel
#

Why don't you just remove deeplsate from there

worn sky
#

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

obtuse kernel
#

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"...

worn sky
#

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 pk_zapdos_derp

#

and still don't know why recipe removal doesn't work, because it's not the only place where it's an issue

slate crater
#

also if im understanding correctly, youre trying to remove recipes you added?
that doesnt work, you cant do that

worn sky
#

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

slate crater
#
//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` })
  })
}
slate crater
#

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` })
  })
}
worn sky
#
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)

obtuse kernel
#

Nah just create more tickets

worn sky
#

sure, what's the worst they can do to me? ban me? kappa (I'm kidding mr admin who possibly will read this)