-
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.