summaryrefslogtreecommitdiff
path: root/water.lua
diff options
context:
space:
mode:
authortenplus1 <kinsellaja@yahoo.com>2014-12-29 11:03:11 +0000
committertenplus1 <kinsellaja@yahoo.com>2014-12-29 11:03:11 +0000
commitcae854e5baefd2f73ce1682bd35b77222b701b94 (patch)
treeeef4b37b220e420f2b0e64f2ddbcc8e487d5c871 /water.lua
parent4c3e8741cad55be7509c49f908ca796d6bba2705 (diff)
Updated to work with MT 0.4.11
Diffstat (limited to 'water.lua')
-rw-r--r--water.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/water.lua b/water.lua
index 7de32ec..3ba84ef 100644
--- a/water.lua
+++ b/water.lua
@@ -107,3 +107,23 @@ minetest.register_abm({
minetest.add_node(pos,{name="default:dirt"})
end,
})
+--[[
+-- If water next to mushroom pore then remove water
+minetest.register_abm({
+ nodenames = {"ethereal:mushroom_pore"},
+ neighbors = {"group:water"},
+ interval = 2,
+ chance = 1,
+ action = function(pos, node)
+ local pos0 = {x=pos.x-1,y=pos.y-1,z=pos.z-1}
+ local pos1 = {x=pos.x+1,y=pos.y+1,z=pos.z+1}
+
+ local water = minetest.env:find_nodes_in_area(pos0, pos1, "group:water")
+ if water then
+ for n = 1, #water do
+ minetest.env:set_node(water[n], {name="air"})
+ end
+ end
+ end,
+})
+]]