]> git.lizzy.rs Git - worldedit.git/blob - Chat Commands.md
Clarify the documentation regarding the the positioning of WorldEdit primitives relat...
[worldedit.git] / Chat Commands.md
1 Chat Commands\r
2 -------------\r
3 For more information, see the [README](README.md).\r
4 \r
5 ### //reset\r
6 \r
7 Reset the region so that it is empty.\r
8 \r
9     //reset\r
10 \r
11 ### //mark\r
12 \r
13 Show markers at the region positions.\r
14 \r
15     //mark\r
16 \r
17 ### //unmark\r
18 \r
19 Hide markers if currently shown.\r
20 \r
21     //unmark\r
22 \r
23 ### //pos1\r
24 \r
25 Set WorldEdit region position 1 to the player's location.\r
26 \r
27     //pos1\r
28 \r
29 ### //pos2\r
30 \r
31 Set WorldEdit region position 2 to the player's location.\r
32 \r
33     //pos2\r
34 \r
35 ### //p set/set1/set2/get\r
36 \r
37 Set WorldEdit region, WorldEdit position 1, or WorldEdit position 2 by punching nodes, or display the current WorldEdit region.\r
38 \r
39     //p set\r
40     //p set1\r
41     //p set2\r
42     //p get\r
43 \r
44 ### //volume\r
45 \r
46 Display the volume of the current WorldEdit region.\r
47 \r
48     //volume\r
49 \r
50 ### //set <node>\r
51 \r
52 Set the current WorldEdit region to <node>.\r
53 \r
54     //set cactus\r
55     //set Bronze Block\r
56     //set mesecons:wire_00000000_off\r
57 \r
58 ### //replace <search node> <replace node>\r
59 \r
60 Replace all instances of <search node> with <replace node> in the current WorldEdit region.\r
61 \r
62     //replace Cobblestone cactus\r
63     //replace lightstone_blue glass\r
64     //replace dirt Bronze Block\r
65     //replace mesecons:wire_00000000_off flowers:flower_tulip\r
66 \r
67 ### //replaceinverse <search node> <replace node>\r
68 \r
69 Replace all nodes other than <search node> with <replace node> in the current WorldEdit region.\r
70 \r
71     //replaceinverse Cobblestone cactus\r
72     //replaceinverse flowers:flower_waterlily glass\r
73     //replaceinverse dirt Bronze Block\r
74     //replaceinverse mesecons:wire_00000000_off flowers:flower_tulip\r
75 \r
76 ### //hollowsphere <radius> <node>\r
77 \r
78 Add hollow sphere centered at WorldEdit position 1 with radius <radius>, composed of <node>.\r
79 \r
80     //hollowsphere 5 Diamond Block\r
81     //hollowsphere 12 glass\r
82     //hollowsphere 17 mesecons:wire_00000000_off\r
83 \r
84 ### //sphere <radius> <node>\r
85 \r
86 Add sphere centered at WorldEdit position 1 with radius <radius>, composed of <node>.\r
87 \r
88     //sphere 5 Diamond Block\r
89     //sphere 12 glass\r
90     //sphere 17 mesecons:wire_00000000_off\r
91 \r
92 ### //hollowdome <radius> <node>\r
93 \r
94 Add hollow dome centered at WorldEdit position 1 with radius <radius>, composed of <node>.\r
95 \r
96     //hollowdome 5 Diamond Block\r
97     //hollowdome 12 glass\r
98     //hollowdome 17 mesecons:wire_00000000_off\r
99 \r
100 ### //dome <radius> <node>\r
101 \r
102 Add dome centered at WorldEdit position 1 with radius <radius>, composed of <node>.\r
103 \r
104     //dome 5 Diamond Block\r
105     //dome 12 glass\r
106     //dome 17 mesecons:wire_00000000_off\r
107 \r
108 ### //hollowcylinder x/y/z/? <length> <radius> <node>\r
109 \r
110 Add hollow cylinder at WorldEdit position 1 along the x/y/z/? axis with length <length> and radius <radius>, composed of <node>.\r
111 \r
112     //hollowcylinder x +5 8 Bronze Block\r
113     //hollowcylinder y 28 10 glass\r
114     //hollowcylinder z -12 3 mesecons:wire_00000000_off\r
115     //hollowcylinder ? 2 4 default:stone\r
116 \r
117 ### //cylinder x/y/z/? <length> <radius> <node>\r
118 \r
119 Add cylinder at WorldEdit position 1 along the x/y/z/? axis with length <length> and radius <radius>, composed of <node>.\r
120 \r
121     //cylinder x +5 8 Bronze Block\r
122     //cylinder y 28 10 glass\r
123     //cylinder z -12 3 mesecons:wire_00000000_off\r
124     //cylinder ? 2 4 default:stone\r
125     \r
126 ### //pyramid <height> <node>\r
127 \r
128 Add pyramid centered at WorldEdit position 1 with height <height>, composed of <node>.\r
129 \r
130     //pyramid 8 Diamond Block\r
131     //pyramid 5 glass\r
132     //pyramid 2 mesecons:wire_00000000_off\r
133 \r
134 ### //spiral <width> <height> <spacer> <node>\r
135 \r
136 Add spiral centered at WorldEdit position 1 with width <width>, height <height>, space between walls <spacer>, composed of <node>.\r
137 \r
138     //spiral 20 5 3 Diamond Block\r
139     //spiral 5 2 1 glass\r
140     //spiral 7 1 5 mesecons:wire_00000000_off\r
141 \r
142 ### //copy x/y/z/? <amount>\r
143 \r
144 Copy the current WorldEdit region along the x/y/z/? axis by <amount> nodes.\r
145 \r
146     //copy x 15\r
147     //copy y -7\r
148     //copy z +4\r
149     //copy ? 8\r
150 \r
151 ### //move x/y/z/? <amount>\r
152 \r
153 Move the current WorldEdit positions and region along the x/y/z/? axis by <amount> nodes.\r
154 \r
155     //move x 15\r
156     //move y -7\r
157     //move z +4\r
158     //move ? -1\r
159 \r
160 ### //stack x/y/z/? <count>\r
161 \r
162 Stack the current WorldEdit region along the x/y/z/? axis <count> times.\r
163 \r
164     //stack x 3\r
165     //stack y -1\r
166     //stack z +5\r
167     //stack ? 12\r
168 \r
169 ### //scale <factor>\r
170 \r
171 Scale the current WorldEdit positions and region by a factor of positive integer <factor> with position 1 as the origin.\r
172 \r
173     //scale 2\r
174     //scale 1\r
175     //scale 10\r
176 \r
177 ### //transpose x/y/z/? x/y/z/?\r
178 \r
179 Transpose the current WorldEdit positions and region along the x/y/z/? and x/y/z/? axes.\r
180 \r
181     //transpose x y\r
182     //transpose x z\r
183     //transpose y z\r
184     //transpose ? y\r
185 \r
186 ### //flip x/y/z/?\r
187 \r
188 Flip the current WorldEdit region along the x/y/z/? axis.\r
189 \r
190     //flip x\r
191     //flip y\r
192     //flip z\r
193     //flip ?\r
194 \r
195 ### //rotate x/y/z/? <angle>\r
196 \r
197 Rotate the current WorldEdit positions and region along the x/y/z/? axis by angle <angle> (90 degree increment).\r
198 \r
199     //rotate x 90\r
200     //rotate y 180\r
201     //rotate z 270\r
202     //rotate ? -90\r
203 \r
204 ### //orient <angle>\r
205 \r
206 Rotate oriented nodes in the current WorldEdit region around the Y axis by angle <angle> (90 degree increment)\r
207 \r
208     //orient 90\r
209     //orient 180\r
210     //orient 270\r
211     //orient -90\r
212 \r
213 ### //fixlight\r
214 \r
215 Fixes the lighting in the current WorldEdit region.\r
216 \r
217     //fixlight\r
218 \r
219 ### //hide\r
220 \r
221 Hide all nodes in the current WorldEdit region non-destructively.\r
222 \r
223     //hide\r
224 \r
225 ### //suppress <node>\r
226 \r
227 Suppress all <node> in the current WorldEdit region non-destructively.\r
228 \r
229     //suppress Diamond Block\r
230     //suppress glass\r
231     //suppress mesecons:wire_00000000_off\r
232 \r
233 ### //highlight <node>\r
234 \r
235 Highlight <node> in the current WorldEdit region by hiding everything else non-destructively.\r
236 \r
237     //highlight Diamond Block\r
238     //highlight glass\r
239     //highlight mesecons:wire_00000000_off\r
240 \r
241 ### //restore\r
242 \r
243 Restores nodes hidden with WorldEdit in the current WorldEdit region.\r
244 \r
245     //restore\r
246 \r
247 ### //save <file>\r
248 \r
249 Save the current WorldEdit region to "(world folder)/schems/<file>.we".\r
250 \r
251     //save some random filename\r
252     //save huge_base\r
253 \r
254 ### //allocate <file>\r
255 \r
256 Set the region defined by nodes from "(world folder)/schems/<file>.we" as the current WorldEdit region.\r
257 \r
258     //allocate some random filename\r
259     //allocate huge_base\r
260 \r
261 ### //load <file>\r
262 \r
263 Load nodes from "(world folder)/schems/<file>.we" with position 1 of the current WorldEdit region as the origin.\r
264 \r
265     //load some random filename\r
266     //load huge_base\r
267 \r
268 ### //lua <code>\r
269 \r
270 Executes <code> as a Lua chunk in the global namespace.\r
271 \r
272     //lua worldedit.pos1["singleplayer"] = {x=0, y=0, z=0}\r
273     //lua worldedit.rotate(worldedit.pos1["singleplayer"], worldedit.pos2["singleplayer"], "y", 90)\r
274 \r
275 ### //luatransform <code>\r
276 \r
277 Executes <code> as a Lua chunk in the global namespace with the variable pos available, for each node in the current WorldEdit region.\r
278 \r
279     //luatransform minetest.env:add_node(pos, {name="default:stone"})\r
280     //luatransform if minetest.env:get_node(pos).name == "air" then minetest.env:add_node(pos, {name="default:water_source"})\r
281 \r
282 ### //mtschemcreate <file>\r
283 \r
284 Save the current WorldEdit region using the Minetest Schematic format to "(world folder)/schems/<file>.mts".\r
285 \r
286     //mtschemcreate some random filename\r
287     //mtschemcreate huge_base\r
288 \r
289 ### //mtschemplace <file>\r
290 \r
291 Load nodes from "(world folder)/schems/<file>.mts" with position 1 of the current WorldEdit region as the origin.\r
292 \r
293     //mtschemplace some random filename\r
294     //mtschemplace huge_base\r
295 \r
296 ### //mtschemprob start/finish/get\r
297 \r
298 After using //mtschemprob start all nodes punched will bring up a text field where a probablity can be entered.\r
299 This mode can be left with //mtschemprob finish. //mtschemprob get will display the probabilities saved for the nodes.\r
300 \r
301     //mtschemprob get\r