| 
1 | 1 | ServerEvents.recipes((event) => {  | 
2 | 2 |   /**  | 
3 | 3 |    * @param {string} input  | 
4 |  | -   * @param {{tag: string, [amount]: number}} fluid  | 
 | 4 | +   * @param {{fluid: string, [amount]: number} | {tag: string, [amount]: number}} fluid  | 
5 | 5 |    * @param {{item: string, [amount]: number}} output  | 
6 | 6 |    * @param {boolean} [consumeCast]  | 
7 | 7 |    */  | 
8 | 8 |   function addCasting(input, fluid, output, consumeCast) {  | 
 | 9 | +    const amt = fluid.amount || 900  | 
 | 10 | +    const obj = fluid.fluid  | 
 | 11 | +      ? { amount: amt, fluid: fluid.fluid }  | 
 | 12 | +      : { amount: amt, tag: fluid.tag };  | 
 | 13 | + | 
9 | 14 |     event.custom({  | 
10 | 15 |       type: "productivemetalworks:block_casting",  | 
11 | 16 |       cast: {  | 
12 | 17 |         item: input  | 
13 | 18 |       },  | 
14 |  | -      consume_cast: consumeCast || true,  | 
15 |  | -      fluid: {  | 
16 |  | -        amount: fluid.amount || 900,  | 
17 |  | -        tag: fluid.tag  | 
18 |  | -      },  | 
 | 19 | +      consume_cast: consumeCast ?? true,  | 
 | 20 | +      fluid: obj,  | 
19 | 21 |       result: {  | 
20 | 22 |         count: output.amount || 1,  | 
21 | 23 |         id: output.item  | 
@@ -52,4 +54,7 @@ ServerEvents.recipes((event) => {  | 
52 | 54 |   addCasting("allthecompressed:sand_1x", { tag: "c:molten_carbon" }, { item: "geore:budding_coal" })  | 
53 | 55 |   addCasting("allthecompressed:sand_1x", { tag: "c:molten_amethyst" }, { item: "minecraft:budding_amethyst" })  | 
54 | 56 |   addCasting("allthecompressed:red_sand_1x", { tag: "c:molten_quartz" }, { item: "geore:budding_black_quartz" })  | 
 | 57 | +  addCasting("allthecompressed:sand_5x", { fluid: "allthemodium:molten_unobtainium", amount: 7290 }, { item: "geore:budding_unobtainium" })  | 
 | 58 | +  addCasting("allthecompressed:sand_5x", { fluid: "allthemodium:molten_vibranium", amount: 7290 }, { item: "geore:budding_vibranium" })  | 
 | 59 | +  addCasting("allthecompressed:sand_5x", { fluid: "allthemodium:molten_allthemodium", amount: 7290 }, { item: "geore:budding_allthemodium" })  | 
55 | 60 | })  | 
0 commit comments