0
0
Fork 0

Allow corals placement on top of node only

This commit is contained in:
Wuzzy 2019-12-17 19:51:50 +01:00
parent cf1df56b79
commit 4dcbe75e84
1 changed files with 4 additions and 0 deletions

View File

@ -24,6 +24,10 @@ local function coral_on_place(itemstack, placer, pointed_thing)
placer, itemstack, pointed_thing) or itemstack
end
if pos_under.y >= pos_above.y then
return itemstack
end
local g_block = minetest.get_item_group(node_under.name, "coral_block")
local g_coral = minetest.get_item_group(itemstack:get_name(), "coral")
local g_species_block = minetest.get_item_group(node_under.name, "coral_species")