Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-170001

play_effect and play_sound block event responses do not work.

XMLWordPrintable

    • Icon: Bug 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:

      1. Download the example addon below
      2. Install it how you would install all other addons (click on it for Windows 10)
      3. Create a new world
      4. Make sure experimental gameplay is turned on. (Holiday features)
      5. Activate the behavior pack
      6. Finish creating your world
      7. Place "bug:play_effect" and "bug:play_sound" blocks on the ground from the creative inventory.
      8. 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
      } 

            Legopitstop Legopitstop
            Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              CHK: