diff --git a/magma/init.lua b/magma/init.lua new file mode 100644 index 0000000..a2a4164 --- /dev/null +++ b/magma/init.lua @@ -0,0 +1,33 @@ +--- Magma block! + +magma_texture = {{ + name = "magma.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 8, + }, + backface_culling = false, +}} + +minetest.register_node("magma:magma", { + description = "Magma", + tiles = magma_texture, + special_tiles = magma_texture, + is_ground_content = false, + damage_per_second = 2, + light_source = 8, + groups = { cracky = 3 }, +}) + +minetest.register_abm({ + label = "Generate magma", + nodenames = {"minecraft:cobble"}, + neighbors = {"minecraft:lava_source", "minecraft:lava_flowing"}, + interval = 1.0, + chance = 1, + action = function(pos, node, active_object_count, active_object_count_wider) + minetest.set_node(pos, { name = "magma:magma" }) + end +}) \ No newline at end of file diff --git a/magma/mod.conf b/magma/mod.conf new file mode 100644 index 0000000..beb6449 --- /dev/null +++ b/magma/mod.conf @@ -0,0 +1 @@ +name = magma \ No newline at end of file diff --git a/magma/textures/magma.png b/magma/textures/magma.png new file mode 100644 index 0000000..b48e598 Binary files /dev/null and b/magma/textures/magma.png differ