Playsound on player not working
Auseawesome opened this issue ยท 15 comments
Minecraft Version
1.20.1
KubeJS Version
2001.6.4-build.138
Rhino Version
2001.2.2-build.18
Architectury Version
9.2.14
Forge/Fabric Version
Forge 47.2.20
Describe your issue
ItemEvents.rightClicked('minecraft:stick', event => {
event.player.playSound('minecraft:entity.chicken.death')
event.player.tell("Testing 123")
})
tells the player but does not play any sound.
ItemEvents.rightClicked('minecraft:stick', event => {
event.level.playSound(null, event.player.x, event.player.y, event.player.z, 'minecraft:entity.chicken.death', 'master', 1, 1.0)
event.player.tell("Testing 123")
})
But this works
Crash report/logs
No response
thats the level one I'm using currently iirc. Which is the bottom thing I suggested, it's the fact the player one doesn't work at all thats the issue, which you admitted to not being able to get working yourself in the previous comment on this issue.
I am, this issue isn't about helping me, its about getting the player one fixed, as its kind of redundant at the moment
i think lats aware of it anyways, though you could keep this open for max/lat to see
try doing player.x.toFixed(0) ect, i know some minecraft commands are like that though not sure if this is the same way
well surely it should have a location because otherwise it's completely useless, as far as I could tell I couldn't pass a location in
i personally tried my best to get the player one working but i ended up just using the vanilla commands for it, is the level method not working or something that you need the player playsound?
The bottom one works, its the top one that doesn't work and that doesn't involve player.x
ahh yeah thats a known thing, it doesnt specify a location so it goes to 0 0 0 always