]> git.lizzy.rs Git - worldedit.git/blob - ChatCommands.md
2a43c0574959360e78d7f8ae39a7ee457bced39c
[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 ### `//mix <node1> ...`\r
121 \r
122 Fill the current WorldEdit region with a random mix of `<node1>`, `...`.\r
123 \r
124     //mix air\r
125     //mix cactus stone glass sandstone\r
126     //mix Bronze\r
127     //mix default:cobble air\r
128 \r
129 ### `//replace <search node> <replace node>`\r
130 \r
131 Replace all instances of `<search node>` with `<replace node>` in the current WorldEdit region.\r
132 \r
133     //replace Cobblestone air\r
134     //replace lightstone_blue glass\r
135     //replace dirt Bronze Block\r
136     //replace mesecons:wire_00000000_off flowers:flower_tulip\r
137 \r
138 ### `//replaceinverse <search node> <replace node>`\r
139 \r
140 Replace all nodes other than `<search node>` with `<replace node>` in the current WorldEdit region.\r
141 \r
142     //replaceinverse Cobblestone air\r
143     //replaceinverse flowers:flower_waterlily glass\r
144     //replaceinverse dirt Bronze Block\r
145     //replaceinverse mesecons:wire_00000000_off flowers:flower_tulip\r
146 \r
147 ### `//hollowcube <width> <height> <length> <node>`\r
148 \r
149 Adds a hollow cube with its ground level centered at WorldEdit position 1 with dimensions `<width>` x `<height>` x `<length>`, composed of `<node>`.\r
150 \r
151     //hollowcube 6 5 6 Diamond Block\r
152 \r
153 ### `//cube <width> <height> <length> <node>`\r
154 \r
155 Adds a cube with its ground level centered at WorldEdit position 1 with dimensions `<width>` x `<height>` x `<length>`, composed of `<node>`.\r
156 \r
157     //cube 6 5 6 Diamond Block\r
158     //cube 7 2 1 default:cobble\r
159 \r
160 ### `//hollowsphere <radius> <node>`\r
161 \r
162 Add hollow sphere centered at WorldEdit position 1 with radius `<radius>`, composed of `<node>`.\r
163 \r
164     //hollowsphere 5 Diamond Block\r
165     //hollowsphere 12 glass\r
166     //hollowsphere 17 mesecons:wire_00000000_off\r
167 \r
168 ### `//sphere <radius> <node>`\r
169 \r
170 Add sphere centered at WorldEdit position 1 with radius `<radius>`, composed of `<node>`.\r
171 \r
172     //sphere 5 Diamond Block\r
173     //sphere 12 glass\r
174     //sphere 17 mesecons:wire_00000000_off\r
175 \r
176 ### `//hollowdome <radius> <node>`\r
177 \r
178 Add hollow dome centered at WorldEdit position 1 with radius `<radius>`, composed of `<node>`.\r
179 \r
180     //hollowdome 5 Diamond Block\r
181     //hollowdome -12 glass\r
182     //hollowdome 17 mesecons:wire_00000000_off\r
183 \r
184 ### `//dome <radius> <node>`\r
185 \r
186 Add dome centered at WorldEdit position 1 with radius `<radius>`, composed of `<node>`.\r
187 \r
188     //dome 5 Diamond Block\r
189     //dome -12 glass\r
190     //dome 17 mesecons:wire_00000000_off\r
191 \r
192 ### `//hollowcylinder x/y/z/? <length> <radius1> [radius2] <node>`\r
193 \r
194 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
195 \r
196 Despite its name this command allows you to create cones (`radius2` = 0) as well as any shapes inbetween (0 < `radius2` < `radius1`).\r
197 Swapping `radius1` and `radius2` will create the same object but upside-down.\r
198 \r
199     //hollowcylinder x +5 8 Bronze Block\r
200     //hollowcylinder y 28 10 glass\r
201     //hollowcylinder z -12 3 mesecons:wire_00000000_off\r
202     //hollowcylinder ? 2 4 default:stone\r
203 \r
204     //hollowcylinder y 10 10 0 walls:cobble\r
205     //hollowcylinder x 6 0 5 Dirt\r
206     //hollowcylinder z 20 10 20 default:desert_stone\r
207 \r
208 ### `//cylinder x/y/z/? <length> <radius1> [radius2] <node>`\r
209 \r
210 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
211 Can also create shapes other than cylinders, e.g. cones (see documentation above).\r
212 \r
213     //cylinder x +5 8 Bronze Block\r
214     //cylinder y 28 10 glass\r
215     //cylinder z -12 3 mesecons:wire_00000000_off\r
216     //cylinder ? 2 4 default:stone\r
217 \r
218     //cylinder y 10 10 0 walls:cobble\r
219     //cylinder x 6 0 5 Dirt\r
220     //cylinder z 20 10 20 default:desert_stone\r
221     \r
222 ### `//hollowpyramid x/y/z? <height> <node>`\r
223 \r
224 Add hollow pyramid centered at WorldEdit position 1 along the x/y/z/? axis with height `<height>`, composed of `<node>`.\r
225 \r
226     //hollowpyramid x 8 Diamond Block\r
227     //hollowpyramid y -5 glass\r
228     //hollowpyramid z 2 mesecons:wire_00000000_off\r
229     //hollowpyramid ? 12 mesecons:wire_00000000_off\r
230 \r
231 ### `//pyramid x/y/z? <height> <node>`\r
232 \r
233 Add pyramid centered at WorldEdit position 1 along the x/y/z/? axis with height `<height>`, composed of `<node>`.\r
234 \r
235     //pyramid x 8 Diamond Block\r
236     //pyramid y -5 glass\r
237     //pyramid z 2 mesecons:wire_00000000_off\r
238     //pyramid ? 12 mesecons:wire_00000000_off\r
239 \r
240 ### `//spiral <length> <height> <spacer> <node>`\r
241 \r
242 Add spiral centered at WorldEdit position 1 with side length `<length>`, height `<height>`, space between walls `<spacer>`, composed of `<node>`.\r
243 \r
244     //spiral 20 5 3 Diamond Block\r
245     //spiral 5 2 1 glass\r
246     //spiral 7 1 5 mesecons:wire_00000000_off\r
247 \r
248 ### `//copy x/y/z/? <amount>`\r
249 \r
250 Copy the current WorldEdit region along the x/y/z/? axis by `<amount>` nodes.\r
251 \r
252     //copy x 15\r
253     //copy y -7\r
254     //copy z +4\r
255     //copy ? 8\r
256 \r
257 ### `//move x/y/z/? <amount>`\r
258 \r
259 Move the current WorldEdit positions and region along the x/y/z/? axis by `<amount>` nodes.\r
260 \r
261     //move x 15\r
262     //move y -7\r
263     //move z +4\r
264     //move ? -1\r
265 \r
266 ### `//stack x/y/z/? <count>`\r
267 \r
268 Stack the current WorldEdit region along the x/y/z/? axis `<count>` times.\r
269 \r
270     //stack x 3\r
271     //stack y -1\r
272     //stack z +5\r
273     //stack ? 12\r
274 \r
275 ### `//stack2 <count> <x> <y> <z>`\r
276 \r
277 Stack the current WorldEdit region `<count>` times by offset `<x>`, `<y>`, `<z>`.\r
278 \r
279     //stack2 5 3 8 2\r
280     //stack2 1 -1 -1 -1\r
281 \r
282 ### `//scale <factor>`\r
283 \r
284 Scale the current WorldEdit positions and region by a factor of positive integer `<factor>` with position 1 as the origin.\r
285 \r
286     //scale 2\r
287     //scale 1\r
288     //scale 10\r
289 \r
290 ### `//transpose x/y/z/? x/y/z/?`\r
291 \r
292 Transpose the current WorldEdit positions and region along the x/y/z/? and x/y/z/? axes.\r
293 \r
294     //transpose x y\r
295     //transpose x z\r
296     //transpose y z\r
297     //transpose ? y\r
298 \r
299 ### `//flip x/y/z/?`\r
300 \r
301 Flip the current WorldEdit region along the x/y/z/? axis.\r
302 \r
303     //flip x\r
304     //flip y\r
305     //flip z\r
306     //flip ?\r
307 \r
308 ### `//rotate x/y/z/? <angle>`\r
309 \r
310 Rotate the current WorldEdit positions and region along the x/y/z/? axis by angle `<angle>` (90 degree increment).\r
311 \r
312     //rotate x 90\r
313     //rotate y 180\r
314     //rotate z 270\r
315     //rotate ? -90\r
316 \r
317 ### `//orient <angle>`\r
318 \r
319 Rotate oriented nodes in the current WorldEdit region around the Y axis by angle `<angle>` (90 degree increment)\r
320 \r
321     //orient 90\r
322     //orient 180\r
323     //orient 270\r
324     //orient -90\r
325 \r
326 ### `//fixlight`\r
327 \r
328 Fixes the lighting in the current WorldEdit region.\r
329 \r
330     //fixlight\r
331 \r
332 ### `//drain`\r
333 \r
334 Removes any fluid node within the current WorldEdit region.\r
335 \r
336     //drain\r
337 \r
338 ### `//hide`\r
339 \r
340 Hide all nodes in the current WorldEdit region non-destructively.\r
341 \r
342     //hide\r
343 \r
344 ### `//suppress <node>`\r
345 \r
346 Suppress all <node> in the current WorldEdit region non-destructively.\r
347 \r
348     //suppress Diamond Block\r
349     //suppress glass\r
350     //suppress mesecons:wire_00000000_off\r
351 \r
352 ### `//highlight <node>`\r
353 \r
354 Highlight <node> in the current WorldEdit region by hiding everything else non-destructively.\r
355 \r
356     //highlight Diamond Block\r
357     //highlight glass\r
358     //highlight mesecons:wire_00000000_off\r
359 \r
360 ### `//restore`\r
361 \r
362 Restores nodes hidden with WorldEdit in the current WorldEdit region.\r
363 \r
364     //restore\r
365 \r
366 ### `//save <file>`\r
367 \r
368 Save the current WorldEdit region to "(world folder)/schems/`<file>`.we".\r
369 \r
370     //save some random filename\r
371     //save huge_base\r
372 \r
373 ### `//allocate <file>`\r
374 \r
375 Set the region defined by nodes from "(world folder)/schems/`<file>`.we" as the current WorldEdit region.\r
376 \r
377     //allocate some random filename\r
378     //allocate huge_base\r
379 \r
380 ### `//load <file>`\r
381 \r
382 Load nodes from "(world folder)/schems/`<file>`.we" with position 1 of the current WorldEdit region as the origin.\r
383 \r
384     //load some random filename\r
385     //load huge_base\r
386 \r
387 ### `//lua <code>`\r
388 \r
389 Executes `<code>` as a Lua chunk in the global namespace.\r
390 \r
391     //lua worldedit.pos1["singleplayer"] = {x=0, y=0, z=0}\r
392     //lua worldedit.rotate(worldedit.pos1["singleplayer"], worldedit.pos2["singleplayer"], "y", 90)\r
393 \r
394 ### `//luatransform <code>`\r
395 \r
396 Executes `<code>` as a Lua chunk in the global namespace with the variable pos available, for each node in the current WorldEdit region.\r
397 \r
398     //luatransform minetest.add_node(pos, {name="default:stone"})\r
399     //luatransform if minetest.get_node(pos).name == "air" then minetest.add_node(pos, {name="default:water_source"})\r
400 \r
401 ### `//mtschemcreate <file>`\r
402 \r
403 Save the current WorldEdit region using the Minetest Schematic format to "(world folder)/schems/`<file>`.mts".\r
404 \r
405     //mtschemcreate some random filename\r
406     //mtschemcreate huge_base\r
407 \r
408 ### `//mtschemplace <file>`\r
409 \r
410 Load nodes from "(world folder)/schems/`<file>`.mts" with position 1 of the current WorldEdit region as the origin.\r
411 \r
412     //mtschemplace some random filename\r
413     //mtschemplace huge_base\r
414 \r
415 ### `//mtschemprob start/finish/get`\r
416 \r
417 After using `//mtschemprob start` all nodes punched will bring up a text field where a probablity can be entered.\r
418 This mode can be left with `//mtschemprob finish`. `//mtschemprob get` will display the probabilities saved for the nodes.\r
419 \r
420     //mtschemprob get\r
421 \r
422 ### `//clearobjects`\r
423 \r
424 Clears all objects within the WorldEdit region.\r
425 \r
426     //clearobjects\r
427     \r
428 ### `//shift x/y/z/?/up/down/left/right/front/back [+|-]<amount>`\r
429 \r
430 Shifts the selection area by `[+|-]<amount>` without touching its contents. The shifting axis can be absolute (`x/y/z`) or \r
431 relative (`up/down/left/right/front/back`). \r
432 \r
433                 //shift left 5\r
434 \r
435 ### `//expand [+|-]x/y/z/?/up/down/left/right/front/back <amount> [reverse-amount]`\r
436 \r
437 Expands the selection by `<amount>` in the selected absolute or relative axis. If specified, the selection can be expanded in the\r
438 opposite direction over the same axis by `[reverse-amount]`.\r
439 \r
440                 //expand right 7 5\r
441                 \r
442 ### `//contract [+|-]x/y/z/?/up/down/left/right/front/back <amount> [reverse-amount]`\r
443 \r
444 Contracts the selection by `<amount>` in the selected absolute or relative axis. If specified, the selection can be contracted in the\r
445 opposite direction over the same axis by `[reverse-amount]`.\r
446 \r
447                 //expand right 7 5\r
448                 \r
449 ### `//outset [hv] <amount>`\r
450 \r
451 Expands the selection in all directions by `<amount>`. If specified, the selection can be expanded horizontally in the x and z axes `[h]`\r
452 or vertically in the y axis `[v]`.\r
453 \r
454                 //outset v 5\r
455                 \r
456 ### `//inset [hv] <amount>`\r
457 \r
458 Contracts the selection in all directions by `<amount>`. If specified, the selection can be contracted horizontally in the x and z axes `[h]`\r
459 or vertically in the y axis `[v]`.\r
460 \r
461                 //outset v 5\r