#How can I make a food make the drinking sound when being consumed?

46 messages · Page 1 of 1 (latest)

fallow hollow
#

I want to make a food but it is actually a drink. Is it possible?

drowsy orbitBOT
#

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

reef veldt
#

It is possible, try checking the kubejs bookstack, this shoumd be listed in the item builder methods

timber lotus
#

.useAnimation('drink') adds the drinking animation + sound

fallow hollow
fallow hollow
#

Does 600 define the duration and does it define it in ticks or seconds?

#

and which one is the value of the effect

timber lotus
#

I think it is:

.effect(effect, dur, amp, idk)
#

You'll want to check with Probe if you're using VSCode

#

Actually I can go check for you

fallow hollow
#

Probe?

buoyant ploverBOT
#

ProbeJS is an addon mod for KubeJS that generates typings files for VSCode, allowing VSCode to offer autocompletions for a ton of things!

Mod by @rare lance

fallow hollow
#

ooh thanks

#

but if you can let me know it'd be much appreciated

#

i don't think im able to check rn

timber lotus
#

I got it

#
.effect(effect, dur, amp, chance)
fallow hollow
#

thank you!

#

can you stack multiple effects

#

like this?

timber lotus
#

Ye

fallow hollow
#

and if i set the amplification to 1

#

like speed

timber lotus
#

Chance can't be omitted btw

fallow hollow
timber lotus
#

Just set chance to 1

fallow hollow
timber lotus
#

1 is speed 1, 69 is speed 69

fallow hollow
#

okay great

#

because in commands if you make it 1 its speed 2

#

and speed 0 is speed 1

timber lotus
#

Ye

fallow hollow
#

it crashes my game

#

points me towards the exact line where this piece of code was

timber lotus
#

Then... it's borked?

#

It's documented, I figure it'd work

#

Show me your code

fallow hollow
#
        food
            .hunger(6)
            .saturation(6)
            .effect('poison', 600, 254, 1)
            .alwaysEdible()
            .fastToEat()
            //.useAnimation('drink')
            })```
#

it compressed weirdly

#

it can be cleaned

#

but here's the code

dawn thicket