sandstone-mc / sandstone

Sandstone | Next Generation Framework for Minecraft
https://sandstone.dev/
MIT License
171 stars 15 forks source link

coordinates in `playsound` command arguments compile incorrectly #175

Closed huckleton closed 1 year ago

huckleton commented 2 years ago

Javascript Code:

playsound('minecraft:entity.chicken.egg', 'neutral', '@p', ['~', '~', '~'], 0.5)

Compiled Output:

playsound minecraft:entity.chicken.egg neutral @p ~,~,~ 0.5
                                                   ^error

which is actually incorrect, because playsound wants spaces and not commas for coordinates. note: version 1.18.2, though i don't know if this format actually changed at any point

playsound

huckleton commented 2 years ago

declaring the position as a VectorClass works, e.g.

playsound('minecraft:entity.chicken.egg', 'neutral', '@p', new VectorClass(['~','~','~']), 0.5)

however, i'm not sure if the behavior described in the OP is intended behavior