// priority: 101

/**
 * Dripper Recipes
 *
 * Item input, Fluid input, Item output, Fluid amount, Chance
 *
 * @type {[string, string, string, number, number]}
 */
const dripperRecipes = [
  ["minecraft:dirt", "minecraft:water", "minecraft:clay", 100, 0.2],
  ["minecraft:iron_block", "minecraft:lava", "ftbstuff:cast_iron_block", 1000, 0.08],
  ["minecraft:magma_block", "minecraft:lava", "ftbstuff:blue_magma_block", 1000, 0.05],
];

ServerEvents.recipes((event) => {
  dripperRecipes.forEach(([itemInput, fluidInput, itemOutput, fluidAmount, chance]) => {
    event
      .custom({
        type: "ftbstuff:dripper",
        chance: chance,
        input: itemInput,
        output: itemOutput,
        fluid: {
          amount: fluidAmount,
          id: fluidInput,
        },
      })
      .id(`ftb:stuff/dripper/${itemOutput.split(":")[1]}`);
  });
});
