33Runs a particular command asynchronously from the context of the broader dimension.
44Note that there is a maximum queue of 128 asynchronous commands that can be run in a given tick.
55
6+ Usually, it executes the command in the next tick.
7+ To run command in the same tick, you have to [ delay the JS code] ( ./system.run.md#improve-runcommandasync ) .
8+
69Returns a ` Promise<CommandResult> ` . Throws an error ** synchronously** if the queue is full.
710
811## Commands you have to use
912
1013Normally we recommend avoiding using commands,
11- however, the following command features are not implemented in scripting API (as of 1.19.50 ).
14+ however, the following command features are not implemented in scripting API (as of 1.19.60 ).
1215
1316### @s
1417
@@ -39,11 +42,16 @@ however, the following command features are not implemented in scripting API (as
3942
4043### /setblock
4144
42- 1 . ` /setblock ... destroy `
45+ 1 . Can't destroy block ` /setblock ... destroy `
46+
47+ ### /clone
4348
44- ### /fill
49+ 1 . Can't clone blocks.
50+ 2 . Can't move blocks.
4551
46- 1 . ` /fill ` is fast.
52+ ### /titleraw
53+
54+ 1 . Can't display raw title.
4755
4856### /ability
4957
@@ -80,6 +88,7 @@ however, the following command features are not implemented in scripting API (as
8088### /gamemode
8189
82901 . Cannot set player's gamemode.
91+ 2 . Cannot set world default gamemode.
8392
8493### /locate
8594
@@ -90,27 +99,50 @@ however, the following command features are not implemented in scripting API (as
9099
911001 . Even though the loot is broken from the start, but it's useful for drop or set the item to players/world.
92101
93- ### /scoreboard
102+ ### /setworldspawn
103+
104+ 1 . Can't get world spawn point.
105+ 2 . Can't set world spawn point.
106+
107+ ### /spawnpoint
108+
109+ 1 . Can't get player spawn point.
110+ 2 . Can't set player spawn point.
111+
112+ ### /clearspawnpoint
113+
114+ 1 . Can't clear player spawn point.
115+
116+ ### /weather
117+
118+ 1 . Can't get weather directly.
119+ 2 . Can't set weather.
120+
121+ ### /difficulty
122+
123+ 1 . Can't set world difficulty.
124+
125+ ### /playanimation
126+
127+ 1 . Can't play client entity animation.
128+
129+ ### /mobevent
130+
131+ 1 . Can't enable/disable mobevent.
94132
95- 1 . Cannot add/set/remove/operation/reset players/entities' scores.
133+ ### /camerashake
96134
97- ### /time
135+ 1 . Can't add/stop camera shake for player.
98136
99- 1 . Cannot set world's time.
100- 2 . Cannot get world's time (relative and daytime).
137+ ### /fog
101138
102- ### /xp
139+ 1 . Can't manage active fog settings for player.
103140
104- 1 . Cannot set player's experience.
105- 2 . Cannot get player's experience.
141+ ### /stopsound
106142
107- ### Other Commands
143+ 1 . Can't stop playing a sound.
108144
109- Following commands useful for mapmaking cannot be replaced with JS code:
145+ ### /dialogue
110146
111- 1 . ` /camerashake `
112- 2 . ` /fog `
113- 3 . ` /stopsound `
114- 4 . ` /weather `
115- 5 . ` /setspawnpoint ` ` /clearspawnpoint `
116- 6 . ` /clone `
147+ 1 . Can't open the NPC dialogue to player.
148+ 2 . Can't change the dialogue displayed by an NPC.
0 commit comments