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

Update blocks when they spawn (Add-ons)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Awaiting Response
    • None
    • 1.19.51
    • None
    • Unconfirmed
    • Multiple

      After updating the documentation for blocks to version 1.19.40, blocks were no longer updated when they were generated in the world using features. That is, the minecraft:on_placed component does not trigger the required corresponding event, and minecraft:tiking has stopped working altogether. This greatly interferes with adding your own blocks.

       
      Steps to Reproduce:
      1) We create our own block in the addon, which, when it spawns in the world, should activate the event "event_name", for example. To do this, use the "minecraft:on_placed" component, specify "event": "event_name" in the parameters. We get the piece of code:

      "minecraft:on_placed":
          "event": "event_name"
      }

      2) Next, we knowingly correctly prescribe event, feature and feature_rule, from which we get that
      3) Еhe block appears correctly in the world.

      Observed Results:
      Trigger "on_placed" doesn't fire, causing the required event to not start

      Expected Results:
      When the block spawns in the world, the "on_placed" trigger fires, which fires the "event_name" event, causing it to fire correctly as well

      It also works with the "minecraft:ticking" component, which just doesn't fire if the block spawns itself in the world

      P.S. It is important to note that all of these actions fully work when using the old version of the documentation for blocks (1.16.100) and on older versions of the game (before the version with the documentation update, for example 1.19.0)

            ЭrtReYn Yaroslav
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: