summaryrefslogtreecommitdiff
path: root/water.lua
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2016-08-19 17:22:09 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2016-08-19 17:22:09 +0100
commit4643128bea08a977c32e10bfc8260d1a91e2451e (patch)
tree61cd54d3d1828cc7f18f47ff1338ae5314b2583d /water.lua
parentd98b48e2e102f59be92967ba4a6533923a29cb0e (diff)
Added default abm overrides
Diffstat (limited to 'water.lua')
-rw-r--r--water.lua13
1 files changed, 8 insertions, 5 deletions
diff --git a/water.lua b/water.lua
index 8784ac8..c62bfeb 100644
--- a/water.lua
+++ b/water.lua
@@ -44,6 +44,7 @@ minetest.register_craft({
-- If Crystal Spike, Crystal Dirt, Snow near Water, change Water to Ice
minetest.register_abm({
+ label = "Ethereal freeze water",
nodenames = {
"ethereal:crystal_spike", "default:snow", "default:snowblock",
"ethereal:snowbrick"
@@ -53,19 +54,19 @@ minetest.register_abm({
chance = 4,
catch_up = false,
action = function(pos, node)
- local water = minetest.find_nodes_in_area_under_air(
- {x = pos.x - 1, y = pos.y - 1, z = pos.z - 1},
- {x = pos.x + 1, y = pos.y + 1, z = pos.z + 1},
+
+ local near = minetest.find_node_near(pos, 1,
{"default:water_source", "default:river_water_source"})
- if water and #water > 0 then
- minetest.swap_node(water[1], {name = "default:ice"})
+ if near then
+ minetest.swap_node(near, {name = "default:ice"})
end
end,
})
-- If Heat Source near Ice or Snow then melt
minetest.register_abm({
+ label = "Ethereal melt snow/ice",
nodenames = {
"default:ice", "default:snowblock", "default:snow",
"default:dirt_with_snow", "ethereal:snowbrick", "ethereal:icebrick"
@@ -104,6 +105,7 @@ minetest.register_abm({
-- If Water Source near Dry Dirt, change to normal Dirt
minetest.register_abm({
+ label = "Ethereal wet dry dirt",
nodenames = {"ethereal:dry_dirt", "default:dirt_with_dry_grass"},
neighbors = {"group:water"},
interval = 15,
@@ -121,6 +123,7 @@ minetest.register_abm({
-- If torch touching water then drop as item
minetest.register_abm({
+ label = "Ethereal drop torch",
nodenames = {"default:torch"},
neighbors = {"group:water"},
interval = 5,