1
0
mirror of https://github.com/mt-mods/moretrees.git synced 2024-11-15 15:00:21 +01:00

Player placed fruits have param2 set to 1 (#24)

Player placed fruits have their param2 set to 1 for any mods that need to know if it was grown by sapling or placed by player.
This commit is contained in:
tenplus1 2022-12-27 20:20:39 +00:00 committed by GitHub
parent 21bdcc360b
commit 393840ba49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -542,6 +542,11 @@ for i in ipairs(moretrees.treelist) do
},
groups = {fleshy=3,dig_immediate=3,flammable=2, attached_node=1, leafdecay = 1, leafdecay_drop = 1},
sounds = default.node_sound_defaults(),
after_place_node = function(pos, placer)
if placer:is_player() then
minetest.set_node(pos, {name = "moretrees:"..fruit, param2 = 1})
end
end
})
end