mojira.dev
MCPE-181607

[Scripting] BlockCustomComponent#onPlace is called on block update

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

Attachments

Comments 4

Please attach a sample script that can be used to reproduce the issue.

KR_,

I've attached a test pack and added instructions to reproduce the bug in the issue description

KR_,

I've attached a test pack and added instructions to reproduce the bug in the issue description

Fluffyalien

(Unassigned)

Unconfirmed

Multiple

Windows 10

Script-API

1.21.10.20 Preview, 1.21.0.26 Preview, 1.20.81 Hotfix

Retrieved