mojira.dev
MCPE-148527

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

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.

Comments 2

Hi

Does this issue still occur after updating to 1.18.2?

This ticket will automatically reopen when you reply.

Cleaning up old tickets: This ticket had been set to 'Awaiting Response', but has not received a response from the reporter (~3 months+) so is being closed as Incomplete. If you feel this is still a valid issue then please comment, or create a new ticket following the Issue Guidelines which includes steps to reproduce the problem.

For any account or purchasing related issues, please contact Minecraft Customer Support directly, as we cannot assist with those here at the bug tracker.

Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki

ConMaster2112

(Unassigned)

Plausible

Windows

Windows 11

1.17.41 Hotfix

Retrieved