From 7a4b107d75aa1c27cf4cff20ff8f0e318127d963 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 4 Mar 2017 16:55:57 +0100 Subject: [PATCH] Fix silent ladder placement --- mods/ITEMS/mcl_core/nodes.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_core/nodes.lua b/mods/ITEMS/mcl_core/nodes.lua index 945f3f63..c6e18288 100644 --- a/mods/ITEMS/mcl_core/nodes.lua +++ b/mods/ITEMS/mcl_core/nodes.lua @@ -1203,8 +1203,14 @@ minetest.register_node("mcl_core:ladder", { end local success = minetest.item_place_node(itemstack, placer, pointed_thing) - if success and not minetest.setting_getbool("creative_mode") then - itemstack:take_item() + local idef = itemstack:get_definition() + if success then + if idef.sounds and idef.sounds.place then + minetest.sound_play(idef.sounds.place, {pos=above, gain=1}) + end + if not minetest.setting_getbool("creative_mode") then + itemstack:take_item() + end end return itemstack end,