@@ -259,7 +259,7 @@ function core.item_place_node(itemstack, placer, pointed_thing, param2,
259
259
prevent_after_place )
260
260
local def = itemstack :get_definition ()
261
261
if def .type ~= " node" or pointed_thing .type ~= " node" then
262
- return itemstack , false
262
+ return itemstack , nil
263
263
end
264
264
265
265
local under = pointed_thing .under
@@ -272,7 +272,7 @@ function core.item_place_node(itemstack, placer, pointed_thing, param2,
272
272
if not oldnode_under or not oldnode_above then
273
273
log (" info" , playername .. " tried to place"
274
274
.. " node in unloaded position " .. core .pos_to_string (above ))
275
- return itemstack , false
275
+ return itemstack , nil
276
276
end
277
277
278
278
local olddef_under = core .registered_nodes [oldnode_under .name ]
@@ -284,7 +284,7 @@ function core.item_place_node(itemstack, placer, pointed_thing, param2,
284
284
log (" info" , playername .. " tried to place"
285
285
.. " node in invalid position " .. core .pos_to_string (above )
286
286
.. " , replacing " .. oldnode_above .name )
287
- return itemstack , false
287
+ return itemstack , nil
288
288
end
289
289
290
290
-- Place above pointed node
@@ -302,7 +302,7 @@ function core.item_place_node(itemstack, placer, pointed_thing, param2,
302
302
.. " at protected position "
303
303
.. core .pos_to_string (place_to ))
304
304
core .record_protection_violation (place_to , playername )
305
- return itemstack
305
+ return itemstack , nil
306
306
end
307
307
308
308
log (" action" , playername .. " places node "
@@ -361,7 +361,7 @@ function core.item_place_node(itemstack, placer, pointed_thing, param2,
361
361
not builtin_shared .check_attached_node (place_to , newnode ) then
362
362
log (" action" , " attached node " .. def .name ..
363
363
" can not be placed at " .. core .pos_to_string (place_to ))
364
- return itemstack , false
364
+ return itemstack , nil
365
365
end
366
366
367
367
-- Add node and update
@@ -395,7 +395,7 @@ function core.item_place_node(itemstack, placer, pointed_thing, param2,
395
395
if take_item then
396
396
itemstack :take_item ()
397
397
end
398
- return itemstack , true
398
+ return itemstack , place_to
399
399
end
400
400
401
401
-- deprecated, item_place does not call this
@@ -416,15 +416,15 @@ function core.item_place(itemstack, placer, pointed_thing, param2)
416
416
local nn = n .name
417
417
if core .registered_nodes [nn ] and core .registered_nodes [nn ].on_rightclick then
418
418
return core .registered_nodes [nn ].on_rightclick (pointed_thing .under , n ,
419
- placer , itemstack , pointed_thing ) or itemstack , false
419
+ placer , itemstack , pointed_thing ) or itemstack , nil
420
420
end
421
421
end
422
422
423
423
-- Place if node, otherwise do nothing
424
424
if itemstack :get_definition ().type == " node" then
425
425
return core .item_place_node (itemstack , placer , pointed_thing , param2 )
426
426
end
427
- return itemstack
427
+ return itemstack , nil
428
428
end
429
429
430
430
function core .item_secondary_use (itemstack , placer )
0 commit comments