Closed Elnhomantia closed 1 month ago
Hey 👋 @Elnhomantia KubeJS compat is planned, I dont know for now how I will implement it. But for now, you can just see how to create custom recipes in KubeJS on their wiki and just change the recipe type or others fields like my JSON recipes ones like Here for casting brass ingot recipe.
Yep, try doing something like this in your script:
let alloying = (input, time, fluidType, fluidAmount, heat) => {
event.custom({
"type": "createmetallurgy:alloying",
"ingredients": input,
"processingTime": time,
"results": [
{
"fluid": fluidType,
"amount": fluidAmount
}
],
"heatRequirement": heat
})
}
and use it later on
alloying(
[
{"fluid": "createmetallurgy:molten_copper", "amount": 10},
{"fluid": "createmetallurgy:molten_zinc", "amount": 10}
],
80, "createmetallurgy:molten_brass", 20, "heated"
);
I don't think it will be that easy. I didn't really think about how to do it afterwards so idk, and also I'm on Java not JavaScript
Actually I forgot I could actually go and see on the repo xD. Thx a lot for the help. This actually work and let me add anything as input/ouput :
/**
* Add melting recipe with create metallurgy
* @param {{item: 'tag'}|{fluid: 'tag', amount: number}[]} input
* @param {number} time
* @param {{item: 'tag'}|{fluid: 'tag', amount: number}[]} output
* @param {'no'|'heated'|'superheated'} heat
*/
let melting = (input, time, output, heat) => {
event.custom({
type: "createmetallurgy:melting",
ingredients: input,
processingTime: time,
results: output,
heatRequirement: heat,
});
};
/**
* Add alloying recipe with create metallurgy
* @param {{item: 'tag'}|{fluid: 'tag', amount: number}[]} input
* @param {number} time
* @param {{item: 'tag'}|{fluid: 'tag', amount: number}[]} output
* @param {'no'|'heated'|'superheated'} heat
*/
let alloying = (input, time, output, heat) => {
event.custom({
type: "createmetallurgy:alloying",
ingredients: input,
processingTime: time,
results: output,
heatRequirement: heat,
});
};
it should be and used in the ServerEvents.recipes((event) => {} of kubeJs
Could you add a kubeJs support please ? Or provide the way to make recipes in the json format ?
I wrote a schema that can be applied to basin and table. Although it is not perfect, the two most basic ones are not a big problem.
Here it is! Now Create Metallurgy will be compatible with KubeJS. I will make a little wiki page to help people use it. Here is the commit
so good!
Could you add a kubeJs support please ? Or provide the way to make recipes in the json format ?