projects
/
oweals
/
minetest_game.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
05375c0
)
Always disable leafdecay for player-placed leaves, even when 'sneaking'
author
Alex Yst
<github.com.+@y.st>
Sat, 28 Sep 2019 20:10:26 +0000
(13:10 -0700)
committer
Paramat
<paramat@users.noreply.github.com>
Sat, 28 Sep 2019 20:10:26 +0000
(21:10 +0100)
Avoids player-placed leaves decaying when building while sneaking, which is common.
mods/default/functions.lua
patch
|
blob
|
history
diff --git
a/mods/default/functions.lua
b/mods/default/functions.lua
index 9d6c593728a795c825b1489a751f29e825b7c404..91f8bb3912b6693ba52b9148cf5b2a6327aaaef1 100644
(file)
--- 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)