Added log entry to track which method is used
This commit is contained in:
parent
bae0e1c4df
commit
b4d972fc4a
47
init.lua
47
init.lua
@ -1,26 +1,8 @@
|
||||
--[[if nether then
|
||||
minetest.register_abm({
|
||||
label = "Nether Water Evaporate",
|
||||
nodenames = {"group:water", "default:water_flowing", "default:river_water_flowing"},
|
||||
min_y = -32000,
|
||||
max_y = -24995,
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
catch_up = false,
|
||||
action = function(pos, node)
|
||||
-- if pos.y < nether.DEPTH_CEILING and pos.y > nether.DEPTH_FLOOR then
|
||||
minetest.set_node(pos, {name = "air"})
|
||||
minetest.sound_play("default_cool_lava",
|
||||
{pos = pos, max_hear_distance = 16, gain = 0.25}, true)
|
||||
end
|
||||
-- end
|
||||
})
|
||||
end
|
||||
]]--
|
||||
if nether then
|
||||
minetest.log("Warning", "nether.DEPTH_CEILING = " .. nether.DEPTH_CEILING)
|
||||
minetest.log("Warning", "nether.DEPTH_FLOOR = " .. nether.DEPTH_FLOOR)
|
||||
if minetest.register_on_liquid_transformed then
|
||||
minetest.log("Warning", "nether_water_evap: registering liquid transform hook")
|
||||
minetest.register_on_liquid_transformed(function(pl, nl)
|
||||
for i,pos in pairs(pl) do
|
||||
if pos.y < -24995 then
|
||||
@ -34,7 +16,7 @@ if nether then
|
||||
end
|
||||
end)
|
||||
else
|
||||
minetest.log("Warning", "Liquid transformed API not present. Creating ABM instead")
|
||||
minetest.log("Warning", "nether_water_evap: liquid transform hook not present. Creating ABM instead")
|
||||
minetest.register_abm({
|
||||
label = "Nether Water Evaporate",
|
||||
nodenames = {"group:water", "default:water_flowing", "default:river_water_flowing"},
|
||||
@ -51,28 +33,3 @@ if nether then
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
--[[
|
||||
local water_flowing = minetest.registered_nodes["default:water_flowing"]
|
||||
minetest.log("Flowing water was found registered :)")
|
||||
if water_flowing then
|
||||
minetest.override_item("default:water_flowing", {
|
||||
on_construct = function(pos)
|
||||
minetest.log("Flowing water at y=" .. pos.y)
|
||||
if pos.y <= -24995 then
|
||||
minetest.set_node(pos, {name = "air"})
|
||||
minetest.sound_play("default_cool_lava",
|
||||
{pos = pos, max_hear_distance = 16, gain = 0.25}, true)
|
||||
end
|
||||
end,
|
||||
on_flood = function(pos)
|
||||
minetest.log("Flowing water flooding at y=" .. pos.y)
|
||||
end,
|
||||
on_timer = function(pos)
|
||||
minetest.log("Flowing water timer at y=" .. pos.y)
|
||||
end
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
]]--
|
||||
|
Loading…
x
Reference in New Issue
Block a user