Changes on slab placement

This commit is contained in:
JoseDouglas26 2024-05-24 20:10:40 -03:00
parent 56f7093834
commit 4e9647fccc
1 changed files with 3 additions and 3 deletions

View File

@ -262,8 +262,8 @@ function mcl_stairs.register_slab(subname, recipeitem, groups, images, descripti
-- combine two slabs if possible
-- Requirements: Same slab material, must be placed on top of lower slab, or on bottom of upper slab
if (wield_item == unode.name or (udefs and wield_item == udefs._mcl_other_slab_half)) and
not ((dir.y >= 0 and minetest.get_item_group(under.name, "slab_top") == 1) or
(dir.y <= 0 and minetest.get_item_group(under.name, "slab_top") == 0)) then
not ((dir.y >= 0 and minetest.get_item_group(unode.name, "slab_top") == 1) or
(dir.y <= 0 and minetest.get_item_group(unode.name, "slab_top") == 0)) then
minetest.set_node(under, {name = double_slab, param2 = p2})
@ -271,7 +271,7 @@ function mcl_stairs.register_slab(subname, recipeitem, groups, images, descripti
itemstack:take_item()
end
return itemstack
elseif (wield_item == anode.name or (adefs and adefs._mcl_other_slab_half)) then
elseif (wield_item == anode.name or (adefs and wield_item == adefs._mcl_other_slab_half)) then
minetest.set_node(above, {name = double_slab, param2 = p2})
if not creative_enabled then