tweak leveled node placement.
they now stack regardless of face targetted, unless there's no space, or player is sneaking.
This commit is contained in:
parent
512847f8f6
commit
1084214c10
1 changed files with 2 additions and 3 deletions
|
@ -58,10 +58,9 @@ local function on_place (itemstack, placer, pointed)
|
|||
|
||||
if not is_same_kind(pointed.under, placed_def.kindname) then return fallback_to_default() end
|
||||
|
||||
local above = pointed.under + vector.new(0, 1, 0)
|
||||
local is_top = above == pointed.above
|
||||
if not is_top then return fallback_to_default() end
|
||||
if placer:is_player() and placer:get_player_control().sneak then return fallback_to_default() end
|
||||
|
||||
local above = pointed.under + vector.new(0, 1, 0)
|
||||
local above_node = minetest.get_node(above)
|
||||
|
||||
local target_node = minetest.get_node(pointed.under)
|
||||
|
|
Loading…
Reference in a new issue