]> git.lizzy.rs Git - worldedit.git/blob - ChatCommands.md
Disable worldedit_gui fallback code (closes #141)
[worldedit.git] / ChatCommands.md
1 Chat Commands\r
2 -------------\r
3 For more information, see the [README](README.md).\r
4 \r
5 Many commands also have shorter names that can be typed faster. For example, if we wanted to use `//move ? 5`, we could instead type `//m ? 5`. All shortened names are listed below:\r
6 \r
7 | Short Name | Original Name      |\r
8 |:-----------|:-------------------|\r
9 | `//i`      | `//inspect`        |\r
10 | `//rst`    | `//reset`          |\r
11 | `//mk`     | `//mark`           |\r
12 | `//umk`    | `//unmark`         |\r
13 | `//1`      | `//pos1`           |\r
14 | `//2`      | `//pos2`           |\r
15 | `//fp`     | `//fixedpos`       |\r
16 | `//v`      | `//volume`         |\r
17 | `//s`      | `//set`            |\r
18 | `//r`      | `//replace`        |\r
19 | `//ri`     | `//replaceinverse` |\r
20 | `//hspr`   | `//hollowsphere`   |\r
21 | `//spr`    | `//sphere`         |\r
22 | `//hdo`    | `//hollowdome`     |\r
23 | `//do`     | `//dome`           |\r
24 | `//hcyl`   | `//hollowcylinder` |\r
25 | `//cyl`    | `//cylinder`       |\r
26 | `//hpyr`   | `//hollowpyramid`  |\r
27 | `//pyr`    | `//pyramid`        |\r
28 \r
29 ### `//about`\r
30 \r
31 Get information about the mod.\r
32 \r
33     //about\r
34 \r
35 ### `//inspect on/off/1/0/true/false/yes/no/enable/disable/<blank>`\r
36 \r
37 Enable or disable node inspection.\r
38 \r
39     //inspect on\r
40     //inspect off\r
41     //inspect 1\r
42     //inspect 0\r
43     //inspect true\r
44     //inspect false\r
45     //inspect yes\r
46     //inspect no\r
47     //inspect enable\r
48     //inspect disable\r
49     //inspect\r
50 \r
51 ### `//reset`\r
52 \r
53 Reset the region so that it is empty.\r
54 \r
55     //reset\r
56 \r
57 ### `//mark`\r
58 \r
59 Show markers at the region positions.\r
60 \r
61     //mark\r
62 \r
63 ### `//unmark`\r
64 \r
65 Hide markers if currently shown.\r
66 \r
67     //unmark\r
68 \r
69 ### `//pos1`\r
70 \r
71 Set WorldEdit region position 1 to the player's location.\r
72 \r
73     //pos1\r
74 \r
75 ### `//pos2`\r
76 \r
77 Set WorldEdit region position 2 to the player's location.\r
78 \r
79     //pos2\r
80 \r
81 ### `//p set/set1/set2/get`\r
82 \r
83 Set WorldEdit region, WorldEdit position 1, or WorldEdit position 2 by punching nodes, or display the current WorldEdit region.\r
84 \r
85     //p set\r
86     //p set1\r
87     //p set2\r
88     //p get\r
89 \r
90 ### `//fixedpos set1 x y z`\r
91 \r
92 Set a WorldEdit region position to the position at (`<x>`, `<y>`, `<z>`).\r
93 \r
94     //fixedpos set1 0  0 0\r
95     //fixedpos set1 -30 5 28\r
96     //fixedpos set2 1004 -200 432\r
97 \r
98 ### `//volume`\r
99 \r
100 Display the volume of the current WorldEdit region.\r
101 \r
102     //volume\r
103 \r
104 ### `//deleteblocks`\r
105 \r
106 Delete the MapBlocks (16x16x16 units) that contain the selected region. This means that mapgen will be invoked for that area. As only whole MapBlocks get removed, the deleted area is usually larger than the selected one. Also, mapgen can trigger mechanisms like mud reflow or cavegen, which affects nodes (up to 112 nodes away) outside the MapBlock, so dont use this near buildings. Note that active entities are not part of a MapBlock and do not get deleted.\r
107 \r
108     //deleteblocks\r
109 \r
110 ### `//set <node>`\r
111 \r
112 Set the current WorldEdit region to `<node>`.\r
113 \r
114     //set air\r
115     //set cactus\r
116     //set Blue Lightstone\r
117     //set dirt with grass\r
118 \r
119 ### `//mix <node1> ...`\r
120 \r
121 Fill the current WorldEdit region with a random mix of `<node1>`, `...`.\r
122 \r
123     //mix air\r
124     //mix cactus stone glass sandstone\r
125     //mix Bronze\r
126     //mix default:cobble air\r
127 \r
128 ### `//replace <search node> <replace node>`\r
129 \r
130 Replace all instances of `<search node>` with `<replace node>` in the current WorldEdit region.\r
131 \r
132     //replace Cobblestone air\r
133     //replace lightstone_blue glass\r
134     //replace dirt Bronze Block\r
135     //replace mesecons:wire_00000000_off flowers:flower_tulip\r
136 \r
137 ### `//replaceinverse <search node> <replace node>`\r
138 \r
139 Replace all nodes other than `<search node>` with `<replace node>` in the current WorldEdit region.\r
140 \r
141     //replaceinverse Cobblestone air\r
142     //replaceinverse flowers:flower_waterlily glass\r
143     //replaceinverse dirt Bronze Block\r
144     //replaceinverse mesecons:wire_00000000_off flowers:flower_tulip\r
145 \r
146 ### `//hollowsphere <radius> <node>`\r
147 \r
148 Add hollow sphere centered at WorldEdit position 1 with radius `<radius>`, composed of `<node>`.\r
149 \r
150     //hollowsphere 5 Diamond Block\r
151     //hollowsphere 12 glass\r
152     //hollowsphere 17 mesecons:wire_00000000_off\r
153 \r
154 ### `//sphere <radius> <node>`\r
155 \r
156 Add sphere centered at WorldEdit position 1 with radius `<radius>`, composed of `<node>`.\r
157 \r
158     //sphere 5 Diamond Block\r
159     //sphere 12 glass\r
160     //sphere 17 mesecons:wire_00000000_off\r
161 \r
162 ### `//hollowdome <radius> <node>`\r
163 \r
164 Add hollow dome centered at WorldEdit position 1 with radius `<radius>`, composed of `<node>`.\r
165 \r
166     //hollowdome 5 Diamond Block\r
167     //hollowdome -12 glass\r
168     //hollowdome 17 mesecons:wire_00000000_off\r
169 \r
170 ### `//dome <radius> <node>`\r
171 \r
172 Add dome centered at WorldEdit position 1 with radius `<radius>`, composed of `<node>`.\r
173 \r
174     //dome 5 Diamond Block\r
175     //dome -12 glass\r
176     //dome 17 mesecons:wire_00000000_off\r
177 \r
178 ### `//hollowcylinder x/y/z/? <length> <radius> <node>`\r
179 \r
180 Add hollow cylinder at WorldEdit position 1 along the x/y/z/? axis with length `<length>` and radius `<radius>`, composed of `<node>`.\r
181 \r
182     //hollowcylinder x +5 8 Bronze Block\r
183     //hollowcylinder y 28 10 glass\r
184     //hollowcylinder z -12 3 mesecons:wire_00000000_off\r
185     //hollowcylinder ? 2 4 default:stone\r
186 \r
187 ### `//cylinder x/y/z/? <length> <radius> <node>`\r
188 \r
189 Add cylinder at WorldEdit position 1 along the x/y/z/? axis with length `<length>` and radius `<radius>`, composed of `<node>`.\r
190 \r
191     //cylinder x +5 8 Bronze Block\r
192     //cylinder y 28 10 glass\r
193     //cylinder z -12 3 mesecons:wire_00000000_off\r
194     //cylinder ? 2 4 default:stone\r
195     \r
196 ### `//hollowpyramid x/y/z? <height> <node>`\r
197 \r
198 Add hollow pyramid centered at WorldEdit position 1 along the x/y/z/? axis with height `<height>`, composed of `<node>`.\r
199 \r
200     //hollowpyramid x 8 Diamond Block\r
201     //hollowpyramid y -5 glass\r
202     //hollowpyramid z 2 mesecons:wire_00000000_off\r
203     //hollowpyramid ? 12 mesecons:wire_00000000_off\r
204 \r
205 ### `//pyramid x/y/z? <height> <node>`\r
206 \r
207 Add pyramid centered at WorldEdit position 1 along the x/y/z/? axis with height `<height>`, composed of `<node>`.\r
208 \r
209     //pyramid x 8 Diamond Block\r
210     //pyramid y -5 glass\r
211     //pyramid z 2 mesecons:wire_00000000_off\r
212     //pyramid ? 12 mesecons:wire_00000000_off\r
213 \r
214 ### `//spiral <length> <height> <spacer> <node>`\r
215 \r
216 Add spiral centered at WorldEdit position 1 with side length `<length>`, height `<height>`, space between walls `<spacer>`, composed of `<node>`.\r
217 \r
218     //spiral 20 5 3 Diamond Block\r
219     //spiral 5 2 1 glass\r
220     //spiral 7 1 5 mesecons:wire_00000000_off\r
221 \r
222 ### `//copy x/y/z/? <amount>`\r
223 \r
224 Copy the current WorldEdit region along the x/y/z/? axis by `<amount>` nodes.\r
225 \r
226     //copy x 15\r
227     //copy y -7\r
228     //copy z +4\r
229     //copy ? 8\r
230 \r
231 ### `//move x/y/z/? <amount>`\r
232 \r
233 Move the current WorldEdit positions and region along the x/y/z/? axis by `<amount>` nodes.\r
234 \r
235     //move x 15\r
236     //move y -7\r
237     //move z +4\r
238     //move ? -1\r
239 \r
240 ### `//stack x/y/z/? <count>`\r
241 \r
242 Stack the current WorldEdit region along the x/y/z/? axis `<count>` times.\r
243 \r
244     //stack x 3\r
245     //stack y -1\r
246     //stack z +5\r
247     //stack ? 12\r
248 \r
249 ### `//stack2 <count> <x> <y> <z>`\r
250 \r
251 Stack the current WorldEdit region `<count>` times by offset `<x>`, `<y>`, `<z>`.\r
252 \r
253     //stack2 5 3 8 2\r
254     //stack2 1 -1 -1 -1\r
255 \r
256 ### `//scale <factor>`\r
257 \r
258 Scale the current WorldEdit positions and region by a factor of positive integer `<factor>` with position 1 as the origin.\r
259 \r
260     //scale 2\r
261     //scale 1\r
262     //scale 10\r
263 \r
264 ### `//transpose x/y/z/? x/y/z/?`\r
265 \r
266 Transpose the current WorldEdit positions and region along the x/y/z/? and x/y/z/? axes.\r
267 \r
268     //transpose x y\r
269     //transpose x z\r
270     //transpose y z\r
271     //transpose ? y\r
272 \r
273 ### `//flip x/y/z/?`\r
274 \r
275 Flip the current WorldEdit region along the x/y/z/? axis.\r
276 \r
277     //flip x\r
278     //flip y\r
279     //flip z\r
280     //flip ?\r
281 \r
282 ### `//rotate x/y/z/? <angle>`\r
283 \r
284 Rotate the current WorldEdit positions and region along the x/y/z/? axis by angle `<angle>` (90 degree increment).\r
285 \r
286     //rotate x 90\r
287     //rotate y 180\r
288     //rotate z 270\r
289     //rotate ? -90\r
290 \r
291 ### `//orient <angle>`\r
292 \r
293 Rotate oriented nodes in the current WorldEdit region around the Y axis by angle `<angle>` (90 degree increment)\r
294 \r
295     //orient 90\r
296     //orient 180\r
297     //orient 270\r
298     //orient -90\r
299 \r
300 ### `//fixlight`\r
301 \r
302 Fixes the lighting in the current WorldEdit region.\r
303 \r
304     //fixlight\r
305 \r
306 ### `//drain`\r
307 \r
308 Removes any fluid node within the current WorldEdit region.\r
309 \r
310     //drain\r
311 \r
312 ### `//hide`\r
313 \r
314 Hide all nodes in the current WorldEdit region non-destructively.\r
315 \r
316     //hide\r
317 \r
318 ### `//suppress <node>`\r
319 \r
320 Suppress all <node> in the current WorldEdit region non-destructively.\r
321 \r
322     //suppress Diamond Block\r
323     //suppress glass\r
324     //suppress mesecons:wire_00000000_off\r
325 \r
326 ### `//highlight <node>`\r
327 \r
328 Highlight <node> in the current WorldEdit region by hiding everything else non-destructively.\r
329 \r
330     //highlight Diamond Block\r
331     //highlight glass\r
332     //highlight mesecons:wire_00000000_off\r
333 \r
334 ### `//restore`\r
335 \r
336 Restores nodes hidden with WorldEdit in the current WorldEdit region.\r
337 \r
338     //restore\r
339 \r
340 ### `//save <file>`\r
341 \r
342 Save the current WorldEdit region to "(world folder)/schems/`<file>`.we".\r
343 \r
344     //save some random filename\r
345     //save huge_base\r
346 \r
347 ### `//allocate <file>`\r
348 \r
349 Set the region defined by nodes from "(world folder)/schems/`<file>`.we" as the current WorldEdit region.\r
350 \r
351     //allocate some random filename\r
352     //allocate huge_base\r
353 \r
354 ### `//load <file>`\r
355 \r
356 Load nodes from "(world folder)/schems/`<file>`.we" with position 1 of the current WorldEdit region as the origin.\r
357 \r
358     //load some random filename\r
359     //load huge_base\r
360 \r
361 ### `//lua <code>`\r
362 \r
363 Executes `<code>` as a Lua chunk in the global namespace.\r
364 \r
365     //lua worldedit.pos1["singleplayer"] = {x=0, y=0, z=0}\r
366     //lua worldedit.rotate(worldedit.pos1["singleplayer"], worldedit.pos2["singleplayer"], "y", 90)\r
367 \r
368 ### `//luatransform <code>`\r
369 \r
370 Executes `<code>` as a Lua chunk in the global namespace with the variable pos available, for each node in the current WorldEdit region.\r
371 \r
372     //luatransform minetest.add_node(pos, {name="default:stone"})\r
373     //luatransform if minetest.get_node(pos).name == "air" then minetest.add_node(pos, {name="default:water_source"})\r
374 \r
375 ### `//mtschemcreate <file>`\r
376 \r
377 Save the current WorldEdit region using the Minetest Schematic format to "(world folder)/schems/`<file>`.mts".\r
378 \r
379     //mtschemcreate some random filename\r
380     //mtschemcreate huge_base\r
381 \r
382 ### `//mtschemplace <file>`\r
383 \r
384 Load nodes from "(world folder)/schems/`<file>`.mts" with position 1 of the current WorldEdit region as the origin.\r
385 \r
386     //mtschemplace some random filename\r
387     //mtschemplace huge_base\r
388 \r
389 ### `//mtschemprob start/finish/get`\r
390 \r
391 After using `//mtschemprob start` all nodes punched will bring up a text field where a probablity can be entered.\r
392 This mode can be left with `//mtschemprob finish`. `//mtschemprob get` will display the probabilities saved for the nodes.\r
393 \r
394     //mtschemprob get\r
395 \r
396 ### `//clearobjects`\r
397 \r
398 Clears all objects within the WorldEdit region.\r
399 \r
400     //clearobjects\r
401     \r
402 ### `//shift x/y/z/?/up/down/left/right/front/back [+|-]<amount>`\r
403 \r
404 Shifts the selection area by `[+|-]<amount>` without touching its contents. The shifting axis can be absolute (`x/y/z`) or \r
405 relative (`up/down/left/right/front/back`). \r
406 \r
407                 //shift left 5\r
408 \r
409 ### `//expand [+|-]x/y/z/?/up/down/left/right/front/back <amount> [reverse-amount]`\r
410 \r
411 Expands the selection by `<amount>` in the selected absolute or relative axis. If specified, the selection can be expanded in the\r
412 opposite direction over the same axis by `[reverse-amount]`.\r
413 \r
414                 //expand right 7 5\r
415                 \r
416 ### `//contract [+|-]x/y/z/?/up/down/left/right/front/back <amount> [reverse-amount]`\r
417 \r
418 Contracts the selection by `<amount>` in the selected absolute or relative axis. If specified, the selection can be contracted in the\r
419 opposite direction over the same axis by `[reverse-amount]`.\r
420 \r
421                 //expand right 7 5\r
422                 \r
423 ### `//outset [hv] <amount>`\r
424 \r
425 Expands the selection in all directions by `<amount>`. If specified, the selection can be expanded horizontally in the x and z axes `[h]`\r
426 or vertically in the y axis `[v]`.\r
427 \r
428                 //outset v 5\r
429                 \r
430 ### `//inset [hv] <amount>`\r
431 \r
432 Contracts the selection in all directions by `<amount>`. If specified, the selection can be contracted horizontally in the x and z axes `[h]`\r
433 or vertically in the y axis `[v]`.\r
434 \r
435                 //outset v 5