Fluid
Use the fluid requirement in a KubeJS recipe
Use one of these methods to add a Fluid Requirement to the recipe.
.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
fluidparam must be created usingFluid.of()KubeJS method. Example :Fluid.of("minecraft:water", 1000)The
tankparam must be a string corresponding to a tank id defined in a custom machine json Fluid Componenttankproperty.The
tagparam must be a string starting with # defining a valid tag id. Example :"#minecraft:water"The
amountparam must be a positive integer.The
nbtparam must be a map. Example:{nbt1: 1, nbt2: "something"}.
Example
ServerEvents.recipes(event => {
event.recipes.custommachinery.custom_machine("custommachinery:power_crusher", 100)
.requireFluid(Fluid.of("minecraft:water", 1000))
})Last updated