From 2d6e1c61a2954f6f70b97f825b1f7288aa196873 Mon Sep 17 00:00:00 2001 From: SmokeyDope Date: Sat, 25 Feb 2023 10:59:05 +0000 Subject: [PATCH] Add placement sound to lectern --- mods/ITEMS/mcl_lectern/init.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mods/ITEMS/mcl_lectern/init.lua b/mods/ITEMS/mcl_lectern/init.lua index 94f86c8300..e6b7e3db8f 100644 --- a/mods/ITEMS/mcl_lectern/init.lua +++ b/mods/ITEMS/mcl_lectern/init.lua @@ -96,6 +96,15 @@ local lectern_def = { local lectern_node = ItemStack(itemstack) -- Place the node! local _, success = minetest.item_place_node(lectern_node, placer, pointed_thing, fdir) + + -- Add placement sound. + local idef = lectern_node:get_definition() + if success then + if idef.sounds and idef.sounds.place then + minetest.sound_play(idef.sounds.place, {pos=above, gain=1}, true) + end + end + if not success then return itemstack end