1
0
Fork 0

Don't allow to place ladders over ladders

This commit is contained in:
Wuzzy 2017-03-01 15:47:36 +01:00
parent 0ab6124f0a
commit 6544aac4d6
1 changed files with 3 additions and 1 deletions

View File

@ -1176,8 +1176,10 @@ minetest.register_node("mcl_core:ladder", {
local node = minetest.get_node(under) local node = minetest.get_node(under)
local def = minetest.registered_nodes[node.name] local def = minetest.registered_nodes[node.name]
local groups = def.groups local groups = def.groups
-- Don't allow to place the ladder at particular nodes
if (groups and (groups.glass or groups.leaves or groups.slab)) or if (groups and (groups.glass or groups.leaves or groups.slab)) or
node.name == "mcl_core:ice" or node.name == "mcl_nether:glowstone" or node.name == "mcl_ocean:sea_lantern" then node.name == "mcl_core:ladder" or node.name == "mcl_core:ice" or node.name == "mcl_nether:glowstone" or node.name == "mcl_ocean:sea_lantern" then
return itemstack return itemstack
end end