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

The Legacy Scripting API functions getComponent and applyComponentChanges are not compatible enough.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • None
    • 1.17.41 Hotfix
    • None
    • Plausible
    • Windows

      The Legacy Scripting API functions getComponent and applyComponentChanges are not compatible enough.

      When calling the getComponent() function and then applyComponentChanges () immediately, it reports an error for blocks that are have direction variable.

      then throw this exception
      [Scripting][error]-ScriptBlockStateComponent | Invalid type passed for block state 'direction'

      let BlockStateComponenet = this.getComponent(Block,"minecraft:blockstate");

      this.applyComponentChanges(Block, BlockStateComponent);

      For example, the door is checked whether it is closed or not, but the direction is always reset to 0.

            ConMaster2112 ConMaster2112
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: