@@ -79,22 +79,17 @@ core.register_entity(":__builtin:falling_node", {
79
79
local np = {x = bcp .x , y = bcp .y + 1 , z = bcp .z }
80
80
-- Check what's here
81
81
local n2 = core .get_node (np )
82
- -- If it's not air or liquid, remove node and replace it with
83
- -- it's drops
84
- if n2 .name ~= " air" and (not core .registered_nodes [n2 .name ] or
85
- core .registered_nodes [n2 .name ].liquidtype == " none" ) then
86
- local drops = core .get_node_drops (n2 .name , " " )
87
- core .remove_node (np )
88
- -- Add dropped items
89
- local _ , dropped_item
90
- for _ , dropped_item in ipairs (drops ) do
91
- core .add_item (np , dropped_item )
92
- end
93
- -- Run script hook
94
- local _ , callback
95
- for _ , callback in ipairs (core .registered_on_dignodes ) do
96
- callback (np , n2 , nil )
97
- end
82
+ -- remove node and replace it with it's drops
83
+ local drops = core .get_node_drops (n2 .name , " " )
84
+ core .remove_node (np )
85
+ local _ , dropped_item
86
+ for _ , dropped_item in ipairs (drops ) do
87
+ core .add_item (np , dropped_item )
88
+ end
89
+ -- Run script hook
90
+ local _ , callback
91
+ for _ , callback in ipairs (core .registered_on_dignodes ) do
92
+ callback (np , n2 , nil )
98
93
end
99
94
-- Create node and remove entity
100
95
core .add_node (np , self .node )
@@ -168,7 +163,7 @@ function nodeupdate_single(p, delay)
168
163
core .registered_nodes [n_bottom .name ].liquidtype == " none" ) and
169
164
(n .name ~= n_bottom .name or (core .registered_nodes [n_bottom .name ].leveled and
170
165
core .get_node_level (p_bottom ) < core .get_node_max_level (p_bottom ))) and
171
- (not core .registered_nodes [n_bottom .name ].walkable or
166
+ (not core .registered_nodes [n_bottom .name ].walkable or
172
167
core .registered_nodes [n_bottom .name ].buildable_to ) then
173
168
if delay then
174
169
core .after (0.1 , nodeupdate_single , {x = p .x , y = p .y , z = p .z }, false )
@@ -180,7 +175,7 @@ function nodeupdate_single(p, delay)
180
175
end
181
176
end
182
177
end
183
-
178
+
184
179
if core .get_item_group (n .name , " attached_node" ) ~= 0 then
185
180
if not check_attached_node (p , n ) then
186
181
drop_attached_node (p )
@@ -194,7 +189,7 @@ function nodeupdate(p, delay)
194
189
p .x = math.floor (p .x + 0.5 )
195
190
p .y = math.floor (p .y + 0.5 )
196
191
p .z = math.floor (p .z + 0.5 )
197
-
192
+
198
193
for x = - 1 ,1 do
199
194
for y = - 1 ,1 do
200
195
for z = - 1 ,1 do
0 commit comments