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