From: Alex Yst Date: Sat, 28 Sep 2019 20:10:26 +0000 (-0700) Subject: Always disable leafdecay for player-placed leaves, even when 'sneaking' X-Git-Tag: 5.1.0~8 X-Git-Url: https://git.librecmc.org/?p=oweals%2Fminetest_game.git;a=commitdiff_plain;h=c800398593ac6836056a1c94cb46f6b7497a0d79 Always disable leafdecay for player-placed leaves, even when 'sneaking' Avoids player-placed leaves decaying when building while sneaking, which is common. --- diff --git a/mods/default/functions.lua b/mods/default/functions.lua index 9d6c5937..91f8bb39 100644 --- a/mods/default/functions.lua +++ b/mods/default/functions.lua @@ -414,7 +414,7 @@ end -- Prevent decay of placed leaves default.after_place_leaves = function(pos, placer, itemstack, pointed_thing) - if placer and placer:is_player() and not placer:get_player_control().sneak then + if placer and placer:is_player() then local node = minetest.get_node(pos) node.param2 = 1 minetest.set_node(pos, node)