]> git.lizzy.rs Git - worldedit.git/blob - Chat Commands.md
23920a4860bccc6423b3e5f3e4a43c7f4689c4a3
[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 ### //pos1\r
18 \r
19 Set WorldEdit region position 1 to the player's location.\r
20 \r
21     //pos1\r
22 \r
23 ### //pos2\r
24 \r
25 Set WorldEdit region position 2 to the player's location.\r
26 \r
27     //pos2\r
28 \r
29 ### //p set/set1/set2/get\r
30 \r
31 Set WorldEdit region, WorldEdit position 1, or WorldEdit position 2 by punching nodes, or display the current WorldEdit region.\r
32 \r
33     //p set\r
34     //p set1\r
35     //p set2\r
36     //p get\r
37 \r
38 ### //volume\r
39 \r
40 Display the volume of the current WorldEdit region.\r
41 \r
42     //volume\r
43 \r
44 ### //set <node>\r
45 \r
46 Set the current WorldEdit region to <node>.\r
47 \r
48     //set dirt\r
49     //set default:glass\r
50     //set mesecons:mesecon\r
51 \r
52 ### //replace <search node> <replace node>\r
53 \r
54 Replace all instances of <search node> with <place node> in the current WorldEdit region.\r
55 \r
56     //replace cobble stone\r
57     //replace default:steelblock glass\r
58     //replace dirt flowers:flower_waterlily\r
59     //replace flowers:flower_rose flowers:flower_tulip\r
60 \r
61 ### //hollowsphere <radius> <node>\r
62 \r
63 Add hollow sphere at WorldEdit position 1 with radius <radius>, composed of <node>.\r
64 \r
65     //hollowsphere 5 dirt\r
66     //hollowsphere 12 default:glass\r
67     //hollowsphere 17 mesecons:mesecon\r
68 \r
69 ### //sphere <radius> <node>\r
70 \r
71 Add sphere at WorldEdit position 1 with radius <radius>, composed of <node>.\r
72 \r
73     //sphere 5 dirt\r
74     //sphere 12 default:glass\r
75     //sphere 17 mesecons:mesecon\r
76 \r
77 ### //hollowcylinder x/y/z/? <length> <radius> <node>\r
78 \r
79 Add hollow cylinder at WorldEdit position 1 along the x/y/z/? axis with length <length> and radius <radius>, composed of <node>.\r
80 \r
81     //hollowcylinder x +5 8 dirt\r
82     //hollowcylinder y 28 10 default:glass\r
83     //hollowcylinder z -12 3 mesecons:mesecon\r
84     //hollowcylinder ? 2 4 stone\r
85 \r
86 ### //cylinder x/y/z/? <length> <radius> <node>\r
87 \r
88 Add cylinder at WorldEdit position 1 along the x/y/z/? axis with length <length> and radius <radius>, composed of <node>.\r
89 \r
90     //cylinder x +5 8 dirt\r
91     //cylinder y 28 10 default:glass\r
92     //cylinder z -12 3 mesecons:mesecon\r
93     //cylinder ? 2 4 stone\r
94     \r
95 ### //pyramid <height> <node>\r
96 \r
97 Add pyramid at WorldEdit position 1 with height <height>, composed of <node>.\r
98 \r
99     //pyramid 8 dirt\r
100     //pyramid 5 default:glass\r
101     //pyramid 2 stone\r
102 \r
103 ### //spiral <width> <height> <spacer> <node>\r
104 \r
105 Add spiral at WorldEdit position 1 with width <width>, height <height>, space between walls <spacer>, composed of <node>.\r
106 \r
107     //spiral 20 5 3 dirt\r
108     //spiral 5 2 1 default:glass\r
109     //spiral 7 1 5 stone\r
110 \r
111 ### //copy x/y/z/? <amount>\r
112 \r
113 Copy the current WorldEdit region along the x/y/z/? axis by <amount> nodes.\r
114 \r
115     //copy x 15\r
116     //copy y -7\r
117     //copy z +4\r
118     //copy ? 8\r
119 \r
120 ### //move x/y/z/? <amount>\r
121 \r
122 Move the current WorldEdit positions and region along the x/y/z/? axis by <amount> nodes.\r
123 \r
124     //move x 15\r
125     //move y -7\r
126     //move z +4\r
127     //move ? -1\r
128 \r
129 ### //stack x/y/z/? <count>\r
130 \r
131 Stack the current WorldEdit region along the x/y/z/? axis <count> times.\r
132 \r
133     //stack x 3\r
134     //stack y -1\r
135     //stack z +5\r
136     //stack ? 12\r
137 \r
138 ### //transpose x/y/z/? x/y/z/?\r
139 \r
140 Transpose the current WorldEdit positions and region along the x/y/z/? and x/y/z/? axes.\r
141 \r
142     //transpose x y\r
143     //transpose x z\r
144     //transpose y z\r
145     //transpose ? y\r
146 \r
147 ### //flip x/y/z/?\r
148 \r
149 Flip the current WorldEdit region along the x/y/z/? axis.\r
150 \r
151    //flip x\r
152    //flip y\r
153    //flip z\r
154    //flip ?\r
155 \r
156 ### //rotate x/y/z/? <angle>\r
157 \r
158 Rotate the current WorldEdit positions and region along the x/y/z/? axis by angle <angle> (90 degree increment).\r
159 \r
160     //rotate x 90\r
161     //rotate y 180\r
162     //rotate z 270\r
163     //rotate ? -90\r
164 \r
165 ### //orient <angle>\r
166 \r
167 Rotate oriented nodes in the current WorldEdit region around the Y axis by angle <angle> (90 degree increment)\r
168 \r
169     //orient 90\r
170     //orient 180\r
171     //orient 270\r
172     //orient -90\r
173 \r
174 ### //fixlight\r
175 \r
176 Fixes the lighting in the current WorldEdit region.\r
177 \r
178     //fixlight\r
179 \r
180 ## //hide\r
181 \r
182 Hide all nodes in the current WorldEdit region non-destructively.\r
183 \r
184     //hide\r
185 \r
186 ### //suppress <node>\r
187 \r
188 Suppress all <node> in the current WorldEdit region non-destructively.\r
189 \r
190     //suppress dirt\r
191     //suppress default:glass\r
192     //suppress mesecons:mesecon\r
193 \r
194 ### //highlight <node>\r
195 \r
196 Highlight <node> in the current WorldEdit region by hiding everything else non-destructively.\r
197 \r
198     //highlight dirt\r
199     //highlight default:glass\r
200     //highlight mesecons:mesecon\r
201 \r
202 ### //restore\r
203 \r
204 Restores nodes hidden with WorldEdit in the current WorldEdit region.\r
205 \r
206     //restore\r
207 \r
208 ### //save <file>\r
209 \r
210 Save the current WorldEdit region to "(world folder)/schems/<file>.we".\r
211 \r
212     //save some random filename\r
213     //save huge_base\r
214 \r
215 ### //allocate <file>\r
216 \r
217 Set the region defined by nodes from "(world folder)/schems/<file>.we" as the current WorldEdit region.\r
218 \r
219     //allocate some random filename\r
220     //allocate huge_base\r
221 \r
222 ### //load <file>\r
223 \r
224 Load nodes from "(world folder)/schems/<file>.we" with position 1 of the current WorldEdit region as the origin.\r
225 \r
226     //load some random filename\r
227     //load huge_base\r
228 \r
229 ### //metasave <file>\r
230 \r
231 Save the current WorldEdit region including metadata to "(world folder)/schems/<file>.wem".\r
232 \r
233     //metasave some random filename\r
234     //metasave huge_base\r
235 \r
236 ### //metaload <file>\r
237 \r
238 Load nodes and metadata from "(world folder)/schems/<file>.wem" with position 1 of the current WorldEdit region as the origin.\r
239 \r
240     //metaload some random filename\r
241     //metaload huge_base\r
242 \r
243 ### //lua <code>\r
244 \r
245 Executes <code> as a Lua chunk in the global namespace.\r
246 \r
247     //lua worldedit.pos1["singleplayer"] = {x=0, y=0, z=0}\r
248     //lua worldedit.rotate(worldedit.pos1["singleplayer"], worldedit.pos2["singleplayer"], "y", 90)\r
249 \r
250 ### //luatransform <code>\r
251 \r
252 Executes <code> as a Lua chunk in the global namespace with the variable pos available, for each node in the current WorldEdit region.\r
253 \r
254     //luatransform minetest.env:add_node(pos, {name="default:stone"})\r
255     //luatransform if minetest.env:get_node(pos).name == "air" then minetest.env:add_node(pos, {name="default:water_source"})