mirror of
https://github.com/minetest/minetest_game.git
synced 2024-12-23 14:42:27 +01:00
Always disable leafdecay for player-placed leaves, even when 'sneaking'
Avoids player-placed leaves decaying when building while sneaking, which is common.
This commit is contained in:
parent
05375c0fd4
commit
c800398593
@ -414,7 +414,7 @@ end
|
|||||||
-- Prevent decay of placed leaves
|
-- Prevent decay of placed leaves
|
||||||
|
|
||||||
default.after_place_leaves = function(pos, placer, itemstack, pointed_thing)
|
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)
|
local node = minetest.get_node(pos)
|
||||||
node.param2 = 1
|
node.param2 = 1
|
||||||
minetest.set_node(pos, node)
|
minetest.set_node(pos, node)
|
||||||
|
Loading…
Reference in New Issue
Block a user