]> git.lizzy.rs Git - worldedit.git/blob - ChatCommands.md
Add //drain
[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 \r
26 ### `//about`\r
27 \r
28 Get information about the mod.\r
29 \r
30     //about\r
31 \r
32 ### `//inspect on/off/1/0/true/false/yes/no/enable/disable/<blank>`\r
33 \r
34 Enable or disable node inspection.\r
35 \r
36     //inspect on\r
37     //inspect off\r
38     //inspect 1\r
39     //inspect 0\r
40     //inspect true\r
41     //inspect false\r
42     //inspect yes\r
43     //inspect no\r
44     //inspect enable\r
45     //inspect disable\r
46     //inspect\r
47 \r
48 ### `//reset`\r
49 \r
50 Reset the region so that it is empty.\r
51 \r
52     //reset\r
53 \r
54 ### `//mark`\r
55 \r
56 Show markers at the region positions.\r
57 \r
58     //mark\r
59 \r
60 ### `//unmark`\r
61 \r
62 Hide markers if currently shown.\r
63 \r
64     //unmark\r
65 \r
66 ### `//pos1`\r
67 \r
68 Set WorldEdit region position 1 to the player's location.\r
69 \r
70     //pos1\r
71 \r
72 ### `//pos2`\r
73 \r
74 Set WorldEdit region position 2 to the player's location.\r
75 \r
76     //pos2\r
77 \r
78 ### `//p set/set1/set2/get`\r
79 \r
80 Set WorldEdit region, WorldEdit position 1, or WorldEdit position 2 by punching nodes, or display the current WorldEdit region.\r
81 \r
82     //p set\r
83     //p set1\r
84     //p set2\r
85     //p get\r
86 \r
87 ### `//fixedpos set1 x y z`\r
88 \r
89 Set a WorldEdit region position to the position at (`<x>`, `<y>`, `<z>`).\r
90 \r
91     //fixedpos set1 0  0 0\r
92     //fixedpos set1 -30 5 28\r
93     //fixedpos set2 1004 -200 432\r
94 \r
95 ### `//volume`\r
96 \r
97 Display the volume of the current WorldEdit region.\r
98 \r
99     //volume\r
100 \r
101 ### `//deleteblocks`\r
102 \r
103 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
104 \r
105     //deleteblocks\r
106 \r
107 ### `//set <node>`\r
108 \r
109 Set the current WorldEdit region to `<node>`.\r
110 \r
111     //set air\r
112     //set cactus\r
113     //set Blue Lightstone\r
114     //set dirt with grass\r
115 \r
116 ### `//mix <node1> ...`\r
117 \r
118 Fill the current WorldEdit region with a random mix of `<node1>`, `...`.\r
119 \r
120     //mix air\r
121     //mix cactus stone glass sandstone\r
122     //mix Bronze\r
123     //mix default:cobble air\r
124 \r
125 ### `//replace <search node> <replace node>`\r
126 \r
127 Replace all instances of `<search node>` with `<replace node>` in the current WorldEdit region.\r
128 \r
129     //replace Cobblestone air\r
130     //replace lightstone_blue glass\r
131     //replace dirt Bronze Block\r
132     //replace mesecons:wire_00000000_off flowers:flower_tulip\r
133 \r
134 ### `//replaceinverse <search node> <replace node>`\r
135 \r
136 Replace all nodes other than `<search node>` with `<replace node>` in the current WorldEdit region.\r
137 \r
138     //replaceinverse Cobblestone air\r
139     //replaceinverse flowers:flower_waterlily glass\r
140     //replaceinverse dirt Bronze Block\r
141     //replaceinverse mesecons:wire_00000000_off flowers:flower_tulip\r
142 \r
143 ### `//hollowsphere <radius> <node>`\r
144 \r
145 Add hollow sphere centered at WorldEdit position 1 with radius `<radius>`, composed of `<node>`.\r
146 \r
147     //hollowsphere 5 Diamond Block\r
148     //hollowsphere 12 glass\r
149     //hollowsphere 17 mesecons:wire_00000000_off\r
150 \r
151 ### `//sphere <radius> <node>`\r
152 \r
153 Add sphere centered at WorldEdit position 1 with radius `<radius>`, composed of `<node>`.\r
154 \r
155     //sphere 5 Diamond Block\r
156     //sphere 12 glass\r
157     //sphere 17 mesecons:wire_00000000_off\r
158 \r
159 ### `//hollowdome <radius> <node>`\r
160 \r
161 Add hollow dome centered at WorldEdit position 1 with radius `<radius>`, composed of `<node>`.\r
162 \r
163     //hollowdome 5 Diamond Block\r
164     //hollowdome -12 glass\r
165     //hollowdome 17 mesecons:wire_00000000_off\r
166 \r
167 ### `//dome <radius> <node>`\r
168 \r
169 Add dome centered at WorldEdit position 1 with radius `<radius>`, composed of `<node>`.\r
170 \r
171     //dome 5 Diamond Block\r
172     //dome -12 glass\r
173     //dome 17 mesecons:wire_00000000_off\r
174 \r
175 ### `//hollowcylinder x/y/z/? <length> <radius> <node>`\r
176 \r
177 Add hollow cylinder at WorldEdit position 1 along the x/y/z/? axis with length `<length>` and radius `<radius>`, composed of `<node>`.\r
178 \r
179     //hollowcylinder x +5 8 Bronze Block\r
180     //hollowcylinder y 28 10 glass\r
181     //hollowcylinder z -12 3 mesecons:wire_00000000_off\r
182     //hollowcylinder ? 2 4 default:stone\r
183 \r
184 ### `//cylinder x/y/z/? <length> <radius> <node>`\r
185 \r
186 Add cylinder at WorldEdit position 1 along the x/y/z/? axis with length `<length>` and radius `<radius>`, composed of `<node>`.\r
187 \r
188     //cylinder x +5 8 Bronze Block\r
189     //cylinder y 28 10 glass\r
190     //cylinder z -12 3 mesecons:wire_00000000_off\r
191     //cylinder ? 2 4 default:stone\r
192     \r
193 ### `//pyramid x/y/z? <height> <node>`\r
194 \r
195 Add pyramid centered at WorldEdit position 1 along the x/y/z/? axis with height `<height>`, composed of `<node>`.\r
196 \r
197     //pyramid x 8 Diamond Block\r
198     //pyramid y -5 glass\r
199     //pyramid z 2 mesecons:wire_00000000_off\r
200     //pyramid ? 12 mesecons:wire_00000000_off\r
201 \r
202 ### `//spiral <length> <height> <spacer> <node>`\r
203 \r
204 Add spiral centered at WorldEdit position 1 with side length `<length>`, height `<height>`, space between walls `<spacer>`, composed of `<node>`.\r
205 \r
206     //spiral 20 5 3 Diamond Block\r
207     //spiral 5 2 1 glass\r
208     //spiral 7 1 5 mesecons:wire_00000000_off\r
209 \r
210 ### `//copy x/y/z/? <amount>`\r
211 \r
212 Copy the current WorldEdit region along the x/y/z/? axis by `<amount>` nodes.\r
213 \r
214     //copy x 15\r
215     //copy y -7\r
216     //copy z +4\r
217     //copy ? 8\r
218 \r
219 ### `//move x/y/z/? <amount>`\r
220 \r
221 Move the current WorldEdit positions and region along the x/y/z/? axis by `<amount>` nodes.\r
222 \r
223     //move x 15\r
224     //move y -7\r
225     //move z +4\r
226     //move ? -1\r
227 \r
228 ### `//stack x/y/z/? <count>`\r
229 \r
230 Stack the current WorldEdit region along the x/y/z/? axis `<count>` times.\r
231 \r
232     //stack x 3\r
233     //stack y -1\r
234     //stack z +5\r
235     //stack ? 12\r
236 \r
237 ### `//stack2 <count> <x> <y> <z>`\r
238 \r
239 Stack the current WorldEdit region `<count>` times by offset `<x>`, `<y>`, `<z>`.\r
240 \r
241     //stack2 5 3 8 2\r
242     //stack2 1 -1 -1 -1\r
243 \r
244 ### `//scale <factor>`\r
245 \r
246 Scale the current WorldEdit positions and region by a factor of positive integer `<factor>` with position 1 as the origin.\r
247 \r
248     //scale 2\r
249     //scale 1\r
250     //scale 10\r
251 \r
252 ### `//transpose x/y/z/? x/y/z/?`\r
253 \r
254 Transpose the current WorldEdit positions and region along the x/y/z/? and x/y/z/? axes.\r
255 \r
256     //transpose x y\r
257     //transpose x z\r
258     //transpose y z\r
259     //transpose ? y\r
260 \r
261 ### `//flip x/y/z/?`\r
262 \r
263 Flip the current WorldEdit region along the x/y/z/? axis.\r
264 \r
265     //flip x\r
266     //flip y\r
267     //flip z\r
268     //flip ?\r
269 \r
270 ### `//rotate x/y/z/? <angle>`\r
271 \r
272 Rotate the current WorldEdit positions and region along the x/y/z/? axis by angle `<angle>` (90 degree increment).\r
273 \r
274     //rotate x 90\r
275     //rotate y 180\r
276     //rotate z 270\r
277     //rotate ? -90\r
278 \r
279 ### `//orient <angle>`\r
280 \r
281 Rotate oriented nodes in the current WorldEdit region around the Y axis by angle `<angle>` (90 degree increment)\r
282 \r
283     //orient 90\r
284     //orient 180\r
285     //orient 270\r
286     //orient -90\r
287 \r
288 ### `//fixlight`\r
289 \r
290 Fixes the lighting in the current WorldEdit region.\r
291 \r
292     //fixlight\r
293 \r
294 ### `//drain`\r
295 \r
296 Removes any fluid node within the current WorldEdit region.\r
297 \r
298     //drain\r
299 \r
300 ### `//hide`\r
301 \r
302 Hide all nodes in the current WorldEdit region non-destructively.\r
303 \r
304     //hide\r
305 \r
306 ### `//suppress <node>`\r
307 \r
308 Suppress all <node> in the current WorldEdit region non-destructively.\r
309 \r
310     //suppress Diamond Block\r
311     //suppress glass\r
312     //suppress mesecons:wire_00000000_off\r
313 \r
314 ### `//highlight <node>`\r
315 \r
316 Highlight <node> in the current WorldEdit region by hiding everything else non-destructively.\r
317 \r
318     //highlight Diamond Block\r
319     //highlight glass\r
320     //highlight mesecons:wire_00000000_off\r
321 \r
322 ### `//restore`\r
323 \r
324 Restores nodes hidden with WorldEdit in the current WorldEdit region.\r
325 \r
326     //restore\r
327 \r
328 ### `//save <file>`\r
329 \r
330 Save the current WorldEdit region to "(world folder)/schems/`<file>`.we".\r
331 \r
332     //save some random filename\r
333     //save huge_base\r
334 \r
335 ### `//allocate <file>`\r
336 \r
337 Set the region defined by nodes from "(world folder)/schems/`<file>`.we" as the current WorldEdit region.\r
338 \r
339     //allocate some random filename\r
340     //allocate huge_base\r
341 \r
342 ### `//load <file>`\r
343 \r
344 Load nodes from "(world folder)/schems/`<file>`.we" with position 1 of the current WorldEdit region as the origin.\r
345 \r
346     //load some random filename\r
347     //load huge_base\r
348 \r
349 ### `//lua <code>`\r
350 \r
351 Executes `<code>` as a Lua chunk in the global namespace.\r
352 \r
353     //lua worldedit.pos1["singleplayer"] = {x=0, y=0, z=0}\r
354     //lua worldedit.rotate(worldedit.pos1["singleplayer"], worldedit.pos2["singleplayer"], "y", 90)\r
355 \r
356 ### `//luatransform <code>`\r
357 \r
358 Executes `<code>` as a Lua chunk in the global namespace with the variable pos available, for each node in the current WorldEdit region.\r
359 \r
360     //luatransform minetest.add_node(pos, {name="default:stone"})\r
361     //luatransform if minetest.get_node(pos).name == "air" then minetest.add_node(pos, {name="default:water_source"})\r
362 \r
363 ### `//mtschemcreate <file>`\r
364 \r
365 Save the current WorldEdit region using the Minetest Schematic format to "(world folder)/schems/`<file>`.mts".\r
366 \r
367     //mtschemcreate some random filename\r
368     //mtschemcreate huge_base\r
369 \r
370 ### `//mtschemplace <file>`\r
371 \r
372 Load nodes from "(world folder)/schems/`<file>`.mts" with position 1 of the current WorldEdit region as the origin.\r
373 \r
374     //mtschemplace some random filename\r
375     //mtschemplace huge_base\r
376 \r
377 ### `//mtschemprob start/finish/get`\r
378 \r
379 After using `//mtschemprob start` all nodes punched will bring up a text field where a probablity can be entered.\r
380 This mode can be left with `//mtschemprob finish`. `//mtschemprob get` will display the probabilities saved for the nodes.\r
381 \r
382     //mtschemprob get\r
383 \r
384 ### `//clearobjects`\r
385 \r
386 Clears all objects within the WorldEdit region.\r
387 \r
388     //clearobjects\r