#Ad Astra recipes not changing
85 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
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?
do you know if ad astra hammer got nbts and stuff?
get a hammer on your hand and run /kubejs hand
oh, it can hold damage: 0 tag
thats not the problem
the issue is that those are not vanilla crafting table recipes
^
"type": "ad_astra:hammering"
that too lol ¯_(ツ)_/¯
I just wanted to suggest that that was the issue 
i was looking up the recipe haha
so how can I replace it with type knowing?
well
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
(and to also add support for recipes from a specific mod)
there is no ad astra addon as I know..
i wonder if you can use a foreachrecipe to change it, ive never tried it https://cdn.discordapp.com/emojis/1127607724671242301.webp?size=48&name=thinking_hmmm_lex&quality=lossless
why is everything so complicated lol
there isn't one afaik
you probably can
I did something scuffed like that
i could probably make an ad astra plugin 👀
let me find that
for jumbo furnace, I remember that
that group of devs is not interested in making anything for kubejs xD
you can just override that recipe
it's not that complicated
they could easily take 30 mins to implement everything a plugin needs directly in the mod, but they dont want to~
why the hell they had to use a custom for that recipe?
[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())
})
because of the fact that the hammer has to be damaged
so like kubejs, it uses a custom recipe type for shaped and shapeless recipes
reading those suggests you cant change it, only replace the recipe?
looks cursed af
because it is 
oh I thought vanilla supported damage because I saw some examples on kjs wiki
[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
it doesn't
you can always just override the recipe
so kubejs kinda replaces it?
without type tag?
but in this case, it's not really needed
with it
kinda, yes
I don't get it
'BAB',
'ADA',
'BAB'
], {
B: 'create:brass_ingot',
A: 'create:andesite_alloy',
D: 'create:mechanical_drill'
})```
like this?
??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)
})
yup
drop the 1x
where do I need to put type then?
for recipe types supported by kjs, it's not needed
rocket workbench doesn't seems to be supported
well
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
should be easy to just register it during the register recipe schemas thing
even without a plugin
@marble orbit probably knows what the event has been renamed to
based
😮
took forever to figure out how to make a plugin that uses ingredient stack
pie helped me out
w>
StartupEvents.recipeSchemaRegistry(event => {
event.namespace("ad_astra").shaped("hammering");
})
cc @idle smelt
that should be an immediate fix
well... actually
is it shaped or shapeless
either way
just use the correct method lol