Skip to content

Instantly share code, notes, and snippets.

@PilzAdam
Created October 21, 2012 17:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PilzAdam/3927808 to your computer and use it in GitHub Desktop.
Save PilzAdam/3927808 to your computer and use it in GitHub Desktop.
minetest.register_node(":default:lava_source", {
description = "Lava",
inventory_image = minetest.inventorycube("default_lava.png"),
drawtype = "liquid",
--tiles ={"default_lava.png"},
tiles ={
{name="default_lava_source_animated.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}}
},
special_tiles = {
-- New-style lava source material (mostly unused)
{name="default_lava.png", backface_culling=false},
},
paramtype = "light",
light_source = LIGHT_MAX - 1,
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
liquidtype = "source",
liquid_alternative_flowing = "default:lava_flowing",
liquid_alternative_source = "default:lava_source",
liquid_viscosity = LAVA_VISC,
damage_per_second = 4*2,
post_effect_color = {a=192, r=255, g=64, b=0},
groups = {lava=3, liquid=2, hot=3},
on_construct = function(pos)
if pos.y >= 0 then
minetest.env:remove_node(pos)
end
end,
})
@cornernote
Copy link

local lava = {}
for k,v in pairs(minetest.registered_nodes["default:lava_source"]) do lava[k] = v end
lava.on_construct = function(pos) if pos.y >= 0 then minetest.env:remove_node(pos) end end
minetest.register_node(":default:lava_source", lava)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment