Skip to content

Commit

Permalink
Always disable leafdecay for player-placed leaves, even when 'sneaking'
Browse files Browse the repository at this point in the history
Avoids player-placed leaves decaying when building while sneaking, which is common.
  • Loading branch information
AlexYst authored and paramat committed Sep 28, 2019
1 parent 05375c0 commit c800398
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mods/default/functions.lua
Expand Up @@ -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)
Expand Down

0 comments on commit c800398

Please sign in to comment.