#Ad Astra recipes not changing

85 messages · Page 1 of 1 (latest)

idle smelt
#

event.replaceInput(
{}, // Arg 1: the filter
'ad_astra:hammer', // Arg 2: the item to replace
'modern_industrialization:steel_hammer' // Arg 3: the item to replace it with
)

whole fjordBOT
#

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

idle smelt
#

event.replaceInput( {}, // Arg 1: the filter 'techreborn:rubber', // Arg 2: the item to replace 'modern_industrialization:rubber_sheet' // Arg 3: the item to replace it with )

that works with mi, but not with ad_astra. any ideas why?

supple helm
#

do you know if ad astra hammer got nbts and stuff?

#

get a hammer on your hand and run /kubejs hand

idle smelt
#

oh, it can hold damage: 0 tag

dapper hazel
#

thats not the problem

#

the issue is that those are not vanilla crafting table recipes

fervent plover
#

^

dapper hazel
#

"type": "ad_astra:hammering"

supple helm
#

that too lol ¯_(ツ)_/¯

fervent plover
#

I just wanted to suggest that that was the issue raha

dapper hazel
#

i was looking up the recipe haha

idle smelt
#

so how can I replace it with type knowing?

fervent plover
#

kjs doesn't know how to handle "custom" recipe types (like this one) if it isn't told how to

#

that's why addons exist

fervent plover
idle smelt
#

there is no ad astra addon as I know..

dapper hazel
idle smelt
#

why is everything so complicated lol

fervent plover
fervent plover
#

I did something scuffed like that

dapper hazel
#

i could probably make an ad astra plugin 👀

fervent plover
#

let me find that

dapper hazel
#

ive made one plugin before

fervent plover
dapper hazel
fervent plover
#

it's not that complicated

dapper hazel
#

they could easily take 30 mins to implement everything a plugin needs directly in the mod, but they dont want to~

supple helm
#

why the hell they had to use a custom for that recipe?

vast raptorBOT
#

[Quote ➤](#1129017377649070131 message) for shaped:

e.forEachRecipe({ mod: 'modid', type: 'crafting_shaped' }, r => {
    Object.keys(JSON.parse(r.json.get('key'))).forEach(i => {
        let item = r.json.get('key').get(i).get(Object.keys(JSON.parse(r.json).key[i])[0])
        if (Object.keys(JSON.parse(r.json).key[i])[0] == 'tag') item = `#${item}`.replace(/"/g, '')
        if (item.toString().includes('iron_ingot') || item.toString() == '#forge:ingots/iron') r.json.get('key').add(i, Item.of('powah:steel_energized').toJson())
    })
    e.custom({
        type: 'extendedcrafting:shaped_table',
        tier: 1,
        pattern: r.json.get('pattern'),
        key: r.json.get('key'),
        result: r.json.get('result')
    }).id(r.getOrCreateId())
})
#

[Quote ➤](#1129017377649070131 message) and for shapeless:

e.forEachRecipe({ mod: 'modid', type: 'crafting_shapeless' }, r => {
    for (let i = 0; i < r.json.get('ingredients').size(); i++) {
        let item = r.json.get('ingredients').get(i).get(Object.keys(JSON.parse(r.json).ingredients[i])[0])
        if (Object.keys(JSON.parse(r.json).ingredients[i])[0] == 'tag') item = `#${item}`.replace(/"/g, '')
        if (item.toString().includes('iron_ingot') || item.toString() == '#forge:ingots/iron') r.json.get('ingredients').set(i, Item.of('powah:steel_energized').toJson())
    }
    e.custom({
        type: 'extendedcrafting:shapeless_table',
        tier: 1,
        ingredients: r.json.get('ingredients'),
        result: r.json.get('result')
    }).id(r.getOrCreateId())
})
fervent plover
#

so like kubejs, it uses a custom recipe type for shaped and shapeless recipes

dapper hazel
#

reading those suggests you cant change it, only replace the recipe?

#

looks cursed af

fervent plover
supple helm
vast raptorBOT
#

[Quote ➤](#1125649518373916683 message) correct, using any of the special ingredient actions (.keepIngredient(), .replaceIngredient(), .damageIngredient()) would make it a kubejs recipe instead of a minecraft one

idle smelt
#

well, I think it would be a long evening..

#

that bunch of code looks awful xD

fervent plover
supple helm
#

so kubejs kinda replaces it?

idle smelt
fervent plover
fervent plover
fervent plover
idle smelt
#
        'BAB',
        'ADA',
        'BAB'
      ], {
        B: 'create:brass_ingot',
        A: 'create:andesite_alloy',
        D: 'create:mechanical_drill'
      })```

like this?
fervent plover
#

??codeblock

vast raptorBOT
# fervent plover ??codeblock

You can write your code in a codeblock by typing it between the codeblock delimiters:

```js :arrow_left:

onEvent('recipes', e => {
e.smelting('minecraft:glass', '#forge:sand').xp(.1)
})

``` :arrow_left:

As an example, :arrow_up: will look like this:

onEvent('recipes', e => {
  e.smelting('minecraft:glass', '#forge:sand').xp(.1)
})
dapper hazel
#

drop the 1x

idle smelt
fervent plover
idle smelt
#

rocket workbench doesn't seems to be supported

fervent plover
#

for a recipe type to be supported, there has to be support in the base mod for kjs (or an addon)

#

which in this case, there isn't one

#

tho lexxie said that she might make one

tranquil spindle
#

even without a plugin

dapper hazel
#

i wanna see if i can make one uwu

#

for everything it has

tranquil spindle
#

@marble orbit probably knows what the event has been renamed to

tranquil spindle
supple helm
#

😮

dapper hazel
#

took forever to figure out how to make a plugin that uses ingredient stack

#

pie helped me out

#

w>

tranquil spindle
#

cc @idle smelt

#

that should be an immediate fix

#

well... actually

#

is it shaped or shapeless

#

either way

#

just use the correct method lol