1
0
mirror of https://github.com/minetest/minetest_game.git synced 2025-06-29 21:30:26 +02:00

Add nil checks for placer

This commit is contained in:
DTA7
2017-10-01 15:41:58 +02:00
committed by paramat
parent 3ae382c913
commit a2d7678ffd
14 changed files with 72 additions and 53 deletions

View File

@ -667,9 +667,7 @@ minetest.register_node("default:apple", {
sounds = default.node_sound_leaves_defaults(),
after_place_node = function(pos, placer, itemstack)
if placer:is_player() then
minetest.set_node(pos, {name = "default:apple", param2 = 1})
end
minetest.set_node(pos, {name = "default:apple", param2 = 1})
end,
})