]> git.lizzy.rs Git - worldedit.git/blob - ChatCommands.md
Move worldedit.marker_update
[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 | `//hcube`  | `//hollowcube`     |\r
21 | `//hspr`   | `//hollowsphere`   |\r
22 | `//spr`    | `//sphere`         |\r
23 | `//hdo`    | `//hollowdome`     |\r
24 | `//do`     | `//dome`           |\r
25 | `//hcyl`   | `//hollowcylinder` |\r
26 | `//cyl`    | `//cylinder`       |\r
27 | `//hpyr`   | `//hollowpyramid`  |\r
28 | `//pyr`    | `//pyramid`        |\r
29 \r
30 ### `//about`\r
31 \r
32 Get information about the mod.\r
33 \r
34     //about\r
35 \r
36 ### `//inspect on/off/1/0/true/false/yes/no/enable/disable/<blank>`\r
37 \r
38 Enable or disable node inspection.\r
39 \r
40     //inspect on\r
41     //inspect off\r
42     //inspect 1\r
43     //inspect 0\r
44     //inspect true\r
45     //inspect false\r
46     //inspect yes\r
47     //inspect no\r
48     //inspect enable\r
49     //inspect disable\r
50     //inspect\r
51 \r
52 ### `//reset`\r
53 \r
54 Reset the region so that it is empty.\r
55 \r
56     //reset\r
57 \r
58 ### `//mark`\r
59 \r
60 Show markers at the region positions.\r
61 \r
62     //mark\r
63 \r
64 ### `//unmark`\r
65 \r
66 Hide markers if currently shown.\r
67 \r
68     //unmark\r
69 \r
70 ### `//pos1`\r
71 \r
72 Set WorldEdit region position 1 to the player's location.\r
73 \r
74     //pos1\r
75 \r
76 ### `//pos2`\r
77 \r
78 Set WorldEdit region position 2 to the player's location.\r
79 \r
80     //pos2\r
81 \r
82 ### `//p set/set1/set2/get`\r
83 \r
84 Set WorldEdit region, WorldEdit position 1, or WorldEdit position 2 by punching nodes, or display the current WorldEdit region.\r
85 \r
86     //p set\r
87     //p set1\r
88     //p set2\r
89     //p get\r
90 \r
91 ### `//fixedpos set1 x y z`\r
92 \r
93 Set a WorldEdit region position to the position at (`<x>`, `<y>`, `<z>`).\r
94 \r
95     //fixedpos set1 0  0 0\r
96     //fixedpos set1 -30 5 28\r
97     //fixedpos set2 1004 -200 432\r
98 \r
99 ### `//volume`\r
100 \r
101 Display the volume of the current WorldEdit region.\r
102 \r
103     //volume\r
104 \r
105 ### `//deleteblocks`\r
106 \r
107 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
108 \r
109     //deleteblocks\r
110 \r
111 ### `//set <node>`\r
112 \r
113 Set the current WorldEdit region to `<node>`.\r
114 \r
115     //set air\r
116     //set cactus\r
117     //set Blue Lightstone\r
118     //set dirt with grass\r
119 \r
120 ### `//param2 <param2>`\r
121 \r
122 Set the param2 value of all nodes in the current WorldEdit region to `<param2>`.\r
123 \r
124 ### `//mix <node1> [<count1>] <node2> [<count2>]...`\r
125 \r
126 Fill the current WorldEdit region with a random mix of `<node1>`, `<node2>`, `...`. Weightings can be optionally specified via a number after a node name.\r
127 \r
128     //mix air\r
129     //mix cactus stone glass sandstone\r
130     //mix Bronze\r
131     //mix default:cobble air\r
132     //mix stone 3 dirt 2\r
133     //mix cobblestone 8 stoneblock 2 stonebrick\r
134 \r
135 ### `//replace <search node> <replace node>`\r
136 \r
137 Replace all instances of `<search node>` with `<replace node>` in the current WorldEdit region.\r
138 \r
139     //replace Cobblestone air\r
140     //replace lightstone_blue glass\r
141     //replace dirt Bronze Block\r
142     //replace mesecons:wire_00000000_off flowers:flower_tulip\r
143 \r
144 ### `//replaceinverse <search node> <replace node>`\r
145 \r
146 Replace all nodes other than `<search node>` with `<replace node>` in the current WorldEdit region.\r
147 \r
148     //replaceinverse Cobblestone air\r
149     //replaceinverse flowers:flower_waterlily glass\r
150     //replaceinverse dirt Bronze Block\r
151     //replaceinverse mesecons:wire_00000000_off flowers:flower_tulip\r
152 \r
153 ### `//hollowcube <width> <height> <length> <node>`\r
154 \r
155 Adds a hollow cube with its ground level centered at WorldEdit position 1 with dimensions `<width>` x `<height>` x `<length>`, composed of `<node>`.\r
156 \r
157     //hollowcube 6 5 6 Diamond Block\r
158 \r
159 ### `//cube <width> <height> <length> <node>`\r
160 \r
161 Adds a cube with its ground level centered at WorldEdit position 1 with dimensions `<width>` x `<height>` x `<length>`, composed of `<node>`.\r
162 \r
163     //cube 6 5 6 Diamond Block\r
164     //cube 7 2 1 default:cobble\r
165 \r
166 ### `//hollowsphere <radius> <node>`\r
167 \r
168 Add hollow sphere centered at WorldEdit position 1 with radius `<radius>`, composed of `<node>`.\r
169 \r
170     //hollowsphere 5 Diamond Block\r
171     //hollowsphere 12 glass\r
172     //hollowsphere 17 mesecons:wire_00000000_off\r
173 \r
174 ### `//sphere <radius> <node>`\r
175 \r
176 Add sphere centered at WorldEdit position 1 with radius `<radius>`, composed of `<node>`.\r
177 \r
178     //sphere 5 Diamond Block\r
179     //sphere 12 glass\r
180     //sphere 17 mesecons:wire_00000000_off\r
181 \r
182 ### `//hollowdome <radius> <node>`\r
183 \r
184 Add hollow dome centered at WorldEdit position 1 with radius `<radius>`, composed of `<node>`.\r
185 \r
186     //hollowdome 5 Diamond Block\r
187     //hollowdome -12 glass\r
188     //hollowdome 17 mesecons:wire_00000000_off\r
189 \r
190 ### `//dome <radius> <node>`\r
191 \r
192 Add dome centered at WorldEdit position 1 with radius `<radius>`, composed of `<node>`.\r
193 \r
194     //dome 5 Diamond Block\r
195     //dome -12 glass\r
196     //dome 17 mesecons:wire_00000000_off\r
197 \r
198 ### `//hollowcylinder x/y/z/? <length> <radius1> [radius2] <node>`\r
199 \r
200 Add hollow cylinder at WorldEdit position 1 along the x/y/z/? axis with length `<length>`, base radius `<radius1>` (and top radius `[radius2]`), composed of `<node>`.\r
201 \r
202 Despite its name this command allows you to create cones (`radius2` = 0) as well as any shapes inbetween (0 < `radius2` < `radius1`).\r
203 Swapping `radius1` and `radius2` will create the same object but upside-down.\r
204 \r
205     //hollowcylinder x +5 8 Bronze Block\r
206     //hollowcylinder y 28 10 glass\r
207     //hollowcylinder z -12 3 mesecons:wire_00000000_off\r
208     //hollowcylinder ? 2 4 default:stone\r
209 \r
210     //hollowcylinder y 10 10 0 walls:cobble\r
211     //hollowcylinder x 6 0 5 Dirt\r
212     //hollowcylinder z 20 10 20 default:desert_stone\r
213 \r
214 ### `//cylinder x/y/z/? <length> <radius1> [radius2] <node>`\r
215 \r
216 Add cylinder at WorldEdit position 1 along the x/y/z/? axis with length `<length>`, base radius `<radius1>` (and top radius `[radius2]`), composed of `<node>`.\r
217 Can also create shapes other than cylinders, e.g. cones (see documentation above).\r
218 \r
219     //cylinder x +5 8 Bronze Block\r
220     //cylinder y 28 10 glass\r
221     //cylinder z -12 3 mesecons:wire_00000000_off\r
222     //cylinder ? 2 4 default:stone\r
223 \r
224     //cylinder y 10 10 0 walls:cobble\r
225     //cylinder x 6 0 5 Dirt\r
226     //cylinder z 20 10 20 default:desert_stone\r
227     \r
228 ### `//hollowpyramid x/y/z? <height> <node>`\r
229 \r
230 Add hollow pyramid centered at WorldEdit position 1 along the x/y/z/? axis with height `<height>`, composed of `<node>`.\r
231 \r
232     //hollowpyramid x 8 Diamond Block\r
233     //hollowpyramid y -5 glass\r
234     //hollowpyramid z 2 mesecons:wire_00000000_off\r
235     //hollowpyramid ? 12 mesecons:wire_00000000_off\r
236 \r
237 ### `//pyramid x/y/z? <height> <node>`\r
238 \r
239 Add pyramid centered at WorldEdit position 1 along the x/y/z/? axis with height `<height>`, composed of `<node>`.\r
240 \r
241     //pyramid x 8 Diamond Block\r
242     //pyramid y -5 glass\r
243     //pyramid z 2 mesecons:wire_00000000_off\r
244     //pyramid ? 12 mesecons:wire_00000000_off\r
245 \r
246 ### `//spiral <length> <height> <spacer> <node>`\r
247 \r
248 Add spiral centered at WorldEdit position 1 with side length `<length>`, height `<height>`, space between walls `<spacer>`, composed of `<node>`.\r
249 \r
250     //spiral 20 5 3 Diamond Block\r
251     //spiral 5 2 1 glass\r
252     //spiral 7 1 5 mesecons:wire_00000000_off\r
253 \r
254 ### `//copy x/y/z/? <amount>`\r
255 \r
256 Copy the current WorldEdit region along the x/y/z/? axis by `<amount>` nodes.\r
257 \r
258     //copy x 15\r
259     //copy y -7\r
260     //copy z +4\r
261     //copy ? 8\r
262 \r
263 ### `//move x/y/z/? <amount>`\r
264 \r
265 Move the current WorldEdit positions and region along the x/y/z/? axis by `<amount>` nodes.\r
266 \r
267     //move x 15\r
268     //move y -7\r
269     //move z +4\r
270     //move ? -1\r
271 \r
272 ### `//stack x/y/z/? <count>`\r
273 \r
274 Stack the current WorldEdit region along the x/y/z/? axis `<count>` times.\r
275 \r
276     //stack x 3\r
277     //stack y -1\r
278     //stack z +5\r
279     //stack ? 12\r
280 \r
281 ### `//stack2 <count> <x> <y> <z>`\r
282 \r
283 Stack the current WorldEdit region `<count>` times by offset `<x>`, `<y>`, `<z>`.\r
284 \r
285     //stack2 5 3 8 2\r
286     //stack2 1 -1 -1 -1\r
287 \r
288 ### `//stretch <stretchx> <stretchy> <stretchz>`\r
289 \r
290 Scale the current WorldEdit positions and region by a factor of `<stretchx>`, `<stretchy>`, `<stretchz>` along the X, Y, and Z axes, repectively, with position 1 as the origin.\r
291 \r
292     //stretch 2 2 2\r
293     //stretch 1 2 1\r
294     //stretch 10 20 1\r
295 \r
296 ### `//transpose x/y/z/? x/y/z/?`\r
297 \r
298 Transpose the current WorldEdit positions and region along the x/y/z/? and x/y/z/? axes.\r
299 \r
300     //transpose x y\r
301     //transpose x z\r
302     //transpose y z\r
303     //transpose ? y\r
304 \r
305 ### `//flip x/y/z/?`\r
306 \r
307 Flip the current WorldEdit region along the x/y/z/? axis.\r
308 \r
309     //flip x\r
310     //flip y\r
311     //flip z\r
312     //flip ?\r
313 \r
314 ### `//rotate x/y/z/? <angle>`\r
315 \r
316 Rotate the current WorldEdit positions and region along the x/y/z/? axis by angle `<angle>` (90 degree increment).\r
317 \r
318     //rotate x 90\r
319     //rotate y 180\r
320     //rotate z 270\r
321     //rotate ? -90\r
322 \r
323 ### `//orient <angle>`\r
324 \r
325 Rotate oriented nodes in the current WorldEdit region around the Y axis by angle `<angle>` (90 degree increment)\r
326 \r
327     //orient 90\r
328     //orient 180\r
329     //orient 270\r
330     //orient -90\r
331 \r
332 ### `//fixlight`\r
333 \r
334 Fixes the lighting in the current WorldEdit region.\r
335 \r
336     //fixlight\r
337 \r
338 ### `//drain`\r
339 \r
340 Removes any fluid node within the current WorldEdit region.\r
341 \r
342     //drain\r
343 \r
344 ### `//hide`\r
345 \r
346 Hide all nodes in the current WorldEdit region non-destructively.\r
347 \r
348     //hide\r
349 \r
350 ### `//suppress <node>`\r
351 \r
352 Suppress all <node> in the current WorldEdit region non-destructively.\r
353 \r
354     //suppress Diamond Block\r
355     //suppress glass\r
356     //suppress mesecons:wire_00000000_off\r
357 \r
358 ### `//highlight <node>`\r
359 \r
360 Highlight <node> in the current WorldEdit region by hiding everything else non-destructively.\r
361 \r
362     //highlight Diamond Block\r
363     //highlight glass\r
364     //highlight mesecons:wire_00000000_off\r
365 \r
366 ### `//restore`\r
367 \r
368 Restores nodes hidden with WorldEdit in the current WorldEdit region.\r
369 \r
370     //restore\r
371 \r
372 ### `//save <file>`\r
373 \r
374 Save the current WorldEdit region to "(world folder)/schems/`<file>`.we".\r
375 \r
376     //save some random filename\r
377     //save huge_base\r
378 \r
379 ### `//allocate <file>`\r
380 \r
381 Set the region defined by nodes from "(world folder)/schems/`<file>`.we" as the current WorldEdit region.\r
382 \r
383     //allocate some random filename\r
384     //allocate huge_base\r
385 \r
386 ### `//load <file>`\r
387 \r
388 Load nodes from "(world folder)/schems/`<file>`.we" with position 1 of the current WorldEdit region as the origin.\r
389 \r
390     //load some random filename\r
391     //load huge_base\r
392 \r
393 ### `//lua <code>`\r
394 \r
395 Executes `<code>` as a Lua chunk in the global namespace.\r
396 \r
397     //lua worldedit.pos1["singleplayer"] = {x=0, y=0, z=0}\r
398     //lua worldedit.rotate(worldedit.pos1["singleplayer"], worldedit.pos2["singleplayer"], "y", 90)\r
399 \r
400 ### `//luatransform <code>`\r
401 \r
402 Executes `<code>` as a Lua chunk in the global namespace with the variable pos available, for each node in the current WorldEdit region.\r
403 \r
404     //luatransform minetest.add_node(pos, {name="default:stone"})\r
405     //luatransform if minetest.get_node(pos).name == "air" then minetest.add_node(pos, {name="default:water_source"})\r
406 \r
407 ### `//mtschemcreate <file>`\r
408 \r
409 Save the current WorldEdit region using the Minetest Schematic format to "(world folder)/schems/`<file>`.mts".\r
410 \r
411     //mtschemcreate some random filename\r
412     //mtschemcreate huge_base\r
413 \r
414 ### `//mtschemplace <file>`\r
415 \r
416 Load nodes from "(world folder)/schems/`<file>`.mts" with position 1 of the current WorldEdit region as the origin.\r
417 \r
418     //mtschemplace some random filename\r
419     //mtschemplace huge_base\r
420 \r
421 ### `//mtschemprob start/finish/get`\r
422 \r
423 After using `//mtschemprob start` all nodes punched will bring up a text field where a probablity can be entered.\r
424 This mode can be left with `//mtschemprob finish`. `//mtschemprob get` will display the probabilities saved for the nodes.\r
425 \r
426     //mtschemprob get\r
427 \r
428 ### `//clearobjects`\r
429 \r
430 Clears all objects within the WorldEdit region.\r
431 \r
432     //clearobjects\r
433     \r
434 ### `//shift x/y/z/?/up/down/left/right/front/back [+|-]<amount>`\r
435 \r
436 Shifts the selection area by `[+|-]<amount>` without touching its contents. The shifting axis can be absolute (`x/y/z`) or \r
437 relative (`up/down/left/right/front/back`). \r
438 \r
439                 //shift left 5\r
440 \r
441 ### `//expand [+|-]x/y/z/?/up/down/left/right/front/back <amount> [reverse-amount]`\r
442 \r
443 Expands the selection by `<amount>` in the selected absolute or relative axis. If specified, the selection can be expanded in the\r
444 opposite direction over the same axis by `[reverse-amount]`.\r
445 \r
446                 //expand right 7 5\r
447                 \r
448 ### `//contract [+|-]x/y/z/?/up/down/left/right/front/back <amount> [reverse-amount]`\r
449 \r
450 Contracts the selection by `<amount>` in the selected absolute or relative axis. If specified, the selection can be contracted in the\r
451 opposite direction over the same axis by `[reverse-amount]`.\r
452 \r
453                 //expand right 7 5\r
454                 \r
455 ### `//outset [hv] <amount>`\r
456 \r
457 Expands the selection in all directions by `<amount>`. If specified, the selection can be expanded horizontally in the x and z axes `[h]`\r
458 or vertically in the y axis `[v]`.\r
459 \r
460                 //outset v 5\r
461                 \r
462 ### `//inset [hv] <amount>`\r
463 \r
464 Contracts the selection in all directions by `<amount>`. If specified, the selection can be contracted horizontally in the x and z axes `[h]`\r
465 or vertically in the y axis `[v]`.\r
466 \r
467                 //outset v 5\r
468 \r
469 ### `//brush none/<command> [parameters]`\r
470 \r
471 Assigns the given `<command>` to the currently held brush item, it will be ran with the first pointed solid node (as determined via raycast) as\r
472 WorldEdit position 1 when using that specific brush item.\r
473 Passing `none` instead clears the command assigned to the currently held brush item.\r
474 Note that this functionality requires the `worldedit_brush` mod enabled.\r
475 \r
476                 //brush cube 8 8 8 Cobblestone\r
477                 //brush spr 12 glass\r
478                 //brush none\r
479 \r
480 ### `//cubeapply <size> <command> [parameters]`\r
481 \r
482 Selects a cube with side length of `<size>` around the WorldEdit position 1 and runs the given `<command>` on the newly selected region.\r
483 This is mostly useful for brushes since it allows commands such as `//replace` to be ran, but it can also be used standalone.\r
484 \r
485                 //cubeapply 10 replaceinverse air default:water_source\r
486                 //brush cubeapply 15 drain\r
487                 //brush cubeapply 1 deleteblocks\r