#Dragon's breath type interaction

33 messages · Page 1 of 1 (latest)

grizzled thistle
#

I want to make an interaction where the player right clicks an empty bottle in the void in the ae2 spatial storage and it fills the bottle with a void custom gas.
also, I have the gas, but I don't know how to make a custom bottles.

mighty flameBOT
#

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

tawdry delta
#

??tutorial

umbral tideBOT
tawdry delta
#

first youtube link shows how to add custom items

#

also heres a list full of events

#

??kjswiki

umbral tideBOT
tawdry delta
#

youll want the js ItemEvents.rightClicked(event => {})

tawdry delta
# grizzled thistle I want to make an interaction where the player right clicks an empty bottle in t...

heres a simple example of right clicking a diamond in the end and turning it into an acacia boat js ItemEvents.rightClicked(event => { const {item,level,player,server,player:{x,y,z,username}} = event if (level.dimension != 'minecraft:the_end') return if (item.id != 'minecraft:diamond') return item.count-- player.give('minecraft:acacia_boat') server.runCommandSilent(`playsound minecraft:entity.experience_orb.pickup block ${username} ${x} ${y} ${z} 1 1`) }) theres also an example of playing a sound via command

#

ive not tested it yet but should work

#

this goes in server scripts

grizzled thistle
#

it works, but the normal pop sound is still happening in addition to the playsound. is there a way to fix that?

tawdry delta
#

if you only want the pop sound to play you can take away the server.runCommandSilent line

grizzled thistle
#

i would like the opposite of that, i only want the playsound to happen

tawdry delta
#

hmm

#

whats the bottle item called

#

if it was a custom item it wouldnt make a pop sound so im assuming youre using some other item to fill the bottle

grizzled thistle
#

it is a custom item that i made called kubejs:void_in_a_bottle

#
ItemEvents.rightClicked(event => {
  const {item,level,server,player,player:{x,y,z,username}} = event
  if (level.dimension != 'ae2:spatial_storage') return
  if (item.id != 'minecraft:glass_bottle') return
    item.count--
    player.give('kubejs:void_in_a_bottle')
    server.runCommandSilent(`playsound minecraft:item.bottle.fill_dragonbreath block ${username} ${x} ${y} ${z} 1 1`)
})```
#

here's the code

tawdry delta
#

why on earth would there be a pop sound if you havent specified it to play a pop sound

#

try commenting out the current playsound command and make sure its not just the dragonbreath item bottle playing

grizzled thistle
#

the sound of an item entering your inventory

tawdry delta
#

oh

#

i see

#

looks like minecraft has special classes to fill the bottle item with dragons breath

grizzled thistle
#

what

#

do you mean that minecraft fills up the bottle instead of giving it, so it doesn't do the pop sound?

tawdry delta
#

yea