-
Notifications
You must be signed in to change notification settings - Fork 0
Fluid Functions
Diogo B.Beloni edited this page Sep 16, 2026
·
1 revision
This module provides helper functions for creating JSON objects representing fluid inputs and fluid outputs in recipes or processes.
Quantity values are always specified in millibuckets (mb), where 1000mb = 1 bucket.
-
fluidInput
Creates a JSON object representing a fluid input.Example:
fluidInput("minecraft:lava", 1000)
// {
// "type": "neoforge:single",
// "amount": 1000,
// "fluid": "minecraft:lava"
// }In this example, it represents one bucket of lava.
-
fluidOutput
Creates a JSON object representing a fluid output.Example:
fluidOutput("minecraft:water", 500)
// {
// "amount": 500,
// "id": "minecraft:water"
// }In this example, it represents half a bucket of water.
// Creating a hypothetical recipe with fluids
let fluidRecipe = {
input: fluidInput("minecraft:lava", 1000),
output: fluidOutput("minecraft:water", 1000)
};
console.log(fluidRecipe);
/*
{
input: {
"type": "neoforge:single",
"amount": 1000,
"fluid": "minecraft:lava"
},
output: {
"amount": 1000,
"id": "minecraft:water"
}
}
*/