From bd2d0f717ae35264169a573404112ea69affbbdc Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 12 Nov 2020 21:12:25 +0100 Subject: [PATCH] Sugarcane: No place inside liquid --- mods/ITEMS/mcl_core/nodes_cactuscane.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mods/ITEMS/mcl_core/nodes_cactuscane.lua b/mods/ITEMS/mcl_core/nodes_cactuscane.lua index f914a6e6b..9c0077ea2 100644 --- a/mods/ITEMS/mcl_core/nodes_cactuscane.lua +++ b/mods/ITEMS/mcl_core/nodes_cactuscane.lua @@ -87,11 +87,17 @@ minetest.register_node("mcl_core:reeds", { -- Placement rules: -- * On top of group:soil_sugarcane AND next to water or frosted ice. OR -- * On top of sugar canes + -- * Not inside liquid if snn == "mcl_core:reeds" then return true elseif minetest.get_item_group(snn, "soil_sugarcane") == 0 then return false end + local place_node = minetest.get_node(place_pos) + local pdef = minetest.registered_nodes[place_node.name] + if pdef and pdef.liquidtype ~= "none" then + return false + end -- Legal water position rules are the same as for decoration spawn_by rules. -- This differs from MC, which does not allow diagonal neighbors