#Dragon's breath type interaction
33 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
??tutorial
📼Youtube Tutorials📼
first youtube link shows how to add custom items
also heres a list full of events
??kjswiki
This is a list of all the events. Choose your version.
youll want the js ItemEvents.rightClicked(event => {})
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
it works, but the normal pop sound is still happening in addition to the playsound. is there a way to fix that?
if you only want the pop sound to play you can take away the server.runCommandSilent line
i would like the opposite of that, i only want the playsound to happen
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
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
so i dont get it, theres a "normal pop sound" happening?
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
the sound of an item entering your inventory
oh
i see

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