#KubeJS Create: unable to set draining recipe fluid result properly

6 messages · Page 1 of 1 (latest)

tight ridge
#

i am trying to make a draining recipie where the output is not water or lava, the current script is this
ServerEvents.recipes(e => {
e.recipes.create.emptying([Fluid.of(milk , 1000), 'air'], 'cagedmobs:milk_drop')
})
the error given is that milk is not defined, as shown in server log 1
when i change it to have minecraft: before milk, like this
ServerEvents.recipes(e => {
e.recipes.create.emptying([Fluid.of(minecraft:milk , 1000), 'air'], 'cagedmobs:milk_drop')
})
it gives the error saying there is a missing ')' character at the end of the arguments list, as shown in server log 2

sharp valveBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

fierce surgeBOT
#

Paste version of serverlog1.log, serverlog2.log from @tight ridge

#

You can write your code in a codeblock by typing it between the codeblock delimiters:
Note that these are backticks, not apostrophes

```js :arrow_left:

ServerEvents.recipes(event => {
event.smelting('minecraft:glass', '#forge:sand').xp(.1)
})

``` :arrow_left:

This example will look like this:

ServerEvents.recipes(event => {
  event.smelting('minecraft:glass', '#forge:sand').xp(.1)
})
bold thicket
#

you need quotes around milk or minecraft:milk..... because you used milk and not 'milk' it was looking for a variable named milk

tight ridge
#

ah, ok, that makes sense, thank you