#Extended Crafting Recipe Creation
83 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
you sohuldn't need to use e.custom in this case
you can use event.recipes.extendedcrafting.shaped_table and event.recipes.extendedcrafting.shapeless_table
oh? then what would I do because im still learning :3
which have the same syntax as e.shaped and e.shapeless
no worries 
ofc 
event.custom works for every type of recipe since it turns directly into the datapack json, but certain mods + vanilla define their own recipe functions that make it way easier
Oh okay see the more i know the better because i also have to make custom powah recipes and such.
luckily powah is one of the mods that has an addon that adds support
(KubeJS Powah)[https://www.curseforge.com/minecraft/mc-mods/kubejs-powah]
fuck how do markdown links work
it's the other way around
for mods that don't have built-in support, there are addons, like in this case - KubeJS Powah
Will need to use custom as this Mod is for 1.19.2 only.
yep
I actually have one from one of my unfinished modpacks (
)
let me grab it
one sec
let energizing = (result, ingredients, power, id) => {
e.custom({
type: 'powah:energizing'
ingredients: ingredients.map(i => Ingredient.of(i).toJson()),
energy: power,
result: Item.of(result).toJson()
}).id(id)
}
//example usage:
energizing('diamond', ['dirt', 'dirt', 'stick', 'coal'], 100000, 'modpack_name:my_cool_energizing_recipe')
this should break If id is not defined, make a check thet makes sure id is defined If you want to use this (or remove the id overwrite entirely)
How would I go about doing that exactly?
function applyID(event, id, recipe) {
typeof id == "string" ? event.custom(recipe).id(id) : event.custom(recipe)
}
And Pass in the params
define this outside of the recipes Event
Or inside, then you can remove the Event param
Better to use e.custom, the kube way doesn't support specific tiers
You sure it doesnt?
Tried it myself, it's integration just seems incomplete
oh yea
so if you want to use a specific tier, than use e.custom
actually, based on the example recipes they have on github, the tier is only based on the size of the shaped recipe
or a tier argument on shapeless ones sometimes
the kjs methods should work correctly because of that
whats with the modpack_name:my_cool_energizing_recipe part?
oh im dumb
wait no im not x3
what exactly is that part for x3
how exactly do i make a recipe with this? Im totally new at this so im still learning
i know im doing something wrong x3
Paste version of CustomPowahRecipes.js from @steady minnow
how do i define a function lmao
just do energizing
not e.energizing
e.blah means it's a part of the event
but just doing blah() means it's just a function on its own
so i dont need the onevent?
well it still needs the event to call e.custom
just no e.?
mhm
see if you can find a way to pass e into the function so that it knows about it and can call e.custom from the function
its still erroring
is it because e is not defined?
wait actually try moving the function into the onEvent block
okay one sec
like this
onEvent('recipes', e => {
function energizing(result, ingredients, power, id) {
e.custom({
type: 'powah:energizing',
ingredients: ingredients.map(i => Ingredient.of(i).toJson()),
energy: power,
result: Item.of(result).toJson()
}).id(id)
}
energizing('diamond', ['dirt', 'dirt', 'stick', 'coal'], 100000, 'modpack_name:my_cool_energizing_recipe')
energizing('diamond', ['powah:crystal_nitro'], 15000, 'Astros:Chickens')
})
hold on one sec
Paste version of CustomPowahRecipes.js from @steady minnow
OMG I DID IT!
ignore the untexture item, Its a custom item that needs texture made
It duplicates the recipe to all applicable tables depending on the pattern size, making it a specific tier prevents that
well wouldn't all of the applicable tables would have to be smaller?
why would you want something to be done on a 3x3 but not a 5x5
Because it’s ugly and obnoxious 
well if kubejs methods are ugly and obnoxious then just use datapacks directly ???
When did I say Kube was ugly?
wait what were you calling ugly then?
Multiple recipes duplicated to all the tables