> For the complete documentation index, see [llms.txt](https://frinn.gitbook.io/custom-machinery-1.19/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://frinn.gitbook.io/custom-machinery-1.19/mod-integrations/kubejs/recipes/fluid.md).

# Fluid

**Use one of these methods to add a** [**Fluid Requirement**](/custom-machinery-1.19/recipes/requirements/fluid.md) **to the recipe.**

```javascript
.requireFluid(fluid)
.requireFluid(fluid, "tank")

.requireFluidTag("tag", amount)
.requireFluidTag("tag", amount, nbt)
.requireFluidTag("tag", amount, "tank")
.requireFluidTag("tag", amount, nbt, "tank")

.produceFluid(fluid)
.produceFluid(fluid, "tank")

.requireFluidPerTick(fluid)
.requireFluidPerTick(fluid, "tank")

.requireFluidTagPerTick("tag", amount)
.requireFluidTagPerTick("tag", amount, nbt)
.requireFluidTagPerTick("tag", amount, "tank")
.requireFluidTagPerTick("tag", amount, nbt, "tank")

.produceFluidPerTick(fluid)
.produceFluidPerTick(fluid, "tank")
```

* The `fluid` param must be created using `Fluid.of()` KubeJS method. \
  Example : `Fluid.of("minecraft:water", 1000)`
* The `tank` param must be a string corresponding to a tank id defined in a custom machine json [Fluid Component](/custom-machinery-1.19/creating-custom-machines/machine-components/fluid-component.md) `tank` property.
* The `tag` param must be a string starting with # defining a valid tag id. \
  Example : `"#minecraft:water"`
* The `amount` param must be a positive integer.
* The `nbt` param must be a map. \
  Example: `{nbt1: 1, nbt2: "something"}`.

### Example

```javascript
ServerEvents.recipes(event => {

  event.recipes.custommachinery.custom_machine("custommachinery:power_crusher", 100)
  .requireFluid(Fluid.of("minecraft:water", 1000))
  
})
```
