add lava cooling

This commit is contained in:
oilboi 2020-04-18 12:37:08 -04:00
parent bc112e7e2e
commit e6c681a065
4 changed files with 25 additions and 2 deletions

View File

@ -1,6 +1,6 @@
dedicated_server_step = 0.01
liquid_update = 0.25
abm_interval = 0.01
abm_interval = 0.25
show_entity_selectionbox = false
enable_client_modding = true
console_alpha = 157

View File

@ -17,4 +17,5 @@ dofile(path.."/settings.lua")
dofile(path.."/craft_recipes.lua")
dofile(path.."/falling.lua")
dofile(path.."/bucket.lua")
dofile(path.."/lava_cooling.lua")

View File

@ -0,0 +1,22 @@
minetest.register_abm({
label = "Lava cooling",
nodenames = {"main:lava"},
neighbors = {"main:water", "main:waterflow"},
interval = 1.0,
chance = 5.0,
catch_up = false,
action = function(pos)
minetest.set_node(pos,{name="nether:obsidian"})
end,
})
minetest.register_abm({
label = "Lava cooling",
nodenames = {"main:lavaflow"},
neighbors = {"main:water", "main:waterflow"},
interval = 1.0,
chance = 5.0,
catch_up = false,
action = function(pos)
minetest.set_node(pos,{name="main:cobble"})
end,
})

View File

@ -47,7 +47,7 @@ local function extreme_tnt(pos,range)
minetest.sound_play("tnt_explode", {pos = pos, gain = 1.0, max_hear_distance = range*range*range})
end
local function tnt(pos,range)
function tnt(pos,range)
local pos = vector.floor(vector.add(pos,0.5))
--throw players and items