diff options
author | tenplus1 <kinsellaja@yahoo.com> | 2014-12-29 11:03:11 +0000 |
---|---|---|
committer | tenplus1 <kinsellaja@yahoo.com> | 2014-12-29 11:03:11 +0000 |
commit | cae854e5baefd2f73ce1682bd35b77222b701b94 (patch) | |
tree | eef4b37b220e420f2b0e64f2ddbcc8e487d5c871 /water.lua | |
parent | 4c3e8741cad55be7509c49f908ca796d6bba2705 (diff) |
Updated to work with MT 0.4.11
Diffstat (limited to 'water.lua')
-rw-r--r-- | water.lua | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -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, +}) +]] |