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

[Scripting] BlockCustomComponent#onPlace is called on block update

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.21.10.20 Preview, 1.21.0.26 Preview, 1.20.81 Hotfix
    • Unconfirmed
    • Multiple

      The `onPlace` method on block custom components is triggered when the block is updated (eg. state change) not only when the block is placed.

      How to reproduce with test pack:

      • Place the `testpack:test_block` block
      • The block's `testpack:test_state` will be reversed every 10 ticks
      • `onPlace` will warn "onPlace triggered" to the content log when it is called
      • Observe

            Fluffyalien Fluffyalien
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: