From 4dcbe75e84b302f4e404bd99479384f03401416e Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 17 Dec 2019 19:51:50 +0100 Subject: [PATCH] Allow corals placement on top of node only --- mods/ITEMS/mcl_ocean/corals.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mods/ITEMS/mcl_ocean/corals.lua b/mods/ITEMS/mcl_ocean/corals.lua index a75fb072fe..8e6ff422c3 100644 --- a/mods/ITEMS/mcl_ocean/corals.lua +++ b/mods/ITEMS/mcl_ocean/corals.lua @@ -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")