Codebase list minetest-mod-nether / c35f6a2
Clean up trailing whitespace. Done using `cleanfile`. Auke Kok 7 years ago
1 changed file(s) with 11 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
8484 else
8585 return false
8686 end
87
87
8888 if not move_check(p1, p2.y, "y") then
8989 return false
9090 end
9191 if not move_check(p2, p1.y, "y") then
9292 return false
9393 end
94
94
9595 return true
9696 end
9797
116116 if not p1 or not p2 then
117117 return false
118118 end
119
119
120120 for d = 1, 2 do
121121 for y = p1.y + 1, p2.y - 1 do
122122 local p
130130 end
131131 end
132132 end
133
133
134134 local param2
135135 if p1.z == p2.z then
136136 param2 = 0
137137 else
138138 param2 = 1
139139 end
140
140
141141 local target = {x = p1.x, y = p1.y, z = p1.z}
142142 target.x = target.x + 1
143143 if target.y < NETHER_DEPTH then
145145 else
146146 target.y = NETHER_DEPTH - math.random(500, 1500)
147147 end
148
148
149149 for d = 0, 3 do
150150 for y = p1.y, p2.y do
151151 local p = {}
209209 if minetest.get_node(objpos).name ~= "nether:portal" then
210210 return
211211 end
212
212
213213 obj:setpos(target)
214
214
215215 local function check_and_build_portal(pos, target)
216216 local n = minetest.get_node_or_nil(target)
217217 if n and n.name ~= "nether:portal" then
222222 minetest.after(1, check_and_build_portal, pos, target)
223223 end
224224 end
225
225
226226 minetest.after(1, check_and_build_portal, pos, target)
227
227
228228 end, obj, pos, target)
229229 end
230230 end
289289 is_ground_content = true,
290290 sounds = default.node_sound_stone_defaults(),
291291 groups = {cracky = 1, level = 2},
292
292
293293 on_destruct = function(pos)
294294 local meta = minetest.get_meta(pos)
295295 local p1 = minetest.string_to_pos(meta:get_string("p1"))