Sugarcane: No place inside liquid
This commit is contained in:
parent
9365493696
commit
bd2d0f717a
|
@ -87,11 +87,17 @@ minetest.register_node("mcl_core:reeds", {
|
||||||
-- Placement rules:
|
-- Placement rules:
|
||||||
-- * On top of group:soil_sugarcane AND next to water or frosted ice. OR
|
-- * On top of group:soil_sugarcane AND next to water or frosted ice. OR
|
||||||
-- * On top of sugar canes
|
-- * On top of sugar canes
|
||||||
|
-- * Not inside liquid
|
||||||
if snn == "mcl_core:reeds" then
|
if snn == "mcl_core:reeds" then
|
||||||
return true
|
return true
|
||||||
elseif minetest.get_item_group(snn, "soil_sugarcane") == 0 then
|
elseif minetest.get_item_group(snn, "soil_sugarcane") == 0 then
|
||||||
return false
|
return false
|
||||||
end
|
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.
|
-- Legal water position rules are the same as for decoration spawn_by rules.
|
||||||
-- This differs from MC, which does not allow diagonal neighbors
|
-- This differs from MC, which does not allow diagonal neighbors
|
||||||
|
|
Loading…
Reference in New Issue