-
Bug
-
Resolution: Unresolved
-
None
-
1.19.80, 1.20.71 Hotfix
-
None
-
Confirmed
-
Windows
-
1038034
play_sound and play_effect block event responses do not work. play_sound does not play the sound to the player who interacted with the block and play_effect does not spawn particles at the position of the target.
{ "events": { "on_interact": { "play_effect": { "data": 0, "effect": "minecraft:candle_flame_particle", "target": "self" }, "play_sound": { "sound": "random.click", "target": "self" } } } }
Steps to Reproduce:
- Download the example addon below
- Install it how you would install all other addons (click on it for Windows 10)
- Create a new world
- Make sure experimental gameplay is turned on. (Holiday features)
- Activate the behavior pack
- Finish creating your world
- Place "bug:play_effect" and "bug:play_sound" blocks on the ground from the creative inventory.
- Right-click on the placed blocks.
Observed Results:
- Clicking on bug:play_effect does not spawn any particles
- Clicking on bug:play_sound does not play any sounds.
- Both blocks print "I triggered on_interact event!" in chat showing that the event is properly triggering.
Expected Results:
- Clicking on bug:play_effect will spawn the defined particle like the /particle command
- Clicking on bug:play_sound will play the defined sound to the player like the /playsound command
Other Notes
- According to the Microsoft docs "target" can use Minecraft Filters. but throws an error if you do use an object-like filter.
"play_sound":{ "sound" : "jumpscare", "target" : {"test": "random_chance", "value": "2"} // Causes error. only excepts enums }