diff --git a/README.md b/README.md index cda71d7..5d1f75c 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,9 @@ CBlocks (Coloured Blocks) mod for Minetest This mod adds coloured wood and stonebrick blocks to the game without the need for any additional textures. To craft place 2 wood or stonebrick blocks and then 1 coloured dye. -https://forum.minetest.net/viewtopic.php?f=9&t=13303 \ No newline at end of file +https://forum.minetest.net/viewtopic.php?f=9&t=13303 + +Released under WTFPL + +0.1 - Initial release +0.2 - Added coloured glass and fixed violet diff --git a/init.lua b/init.lua index 5fc72f3..6f20d10 100644 --- a/init.lua +++ b/init.lua @@ -11,7 +11,7 @@ local colours = { {"orange", "Orange", "#ff840170"}, {"pink", "Pink", "#ff65b570"}, {"red", "Red", "#ff000070"}, - {"violet", "Violet", "#ea05ff70"}, + {"violet", "Violet", "#2000c970"}, {"white", "White", "#abababc0"}, {"yellow", "Yellow", "#e3ff0070"}, } @@ -52,4 +52,25 @@ minetest.register_craft({ } }) +-- glass + +minetest.register_node( "cblocks:glass_" .. colours[i][1], { + description = colours[i][2] .. " Glass", + tiles = {"cblocks.png^[colorize:" .. colours[i][3]}, + drawtype = "glasslike", + paramtype = "light", + sunlight_propagates = true, + use_texture_alpha = true, + is_ground_content = false, + groups = {cracky = 3, oddly_breakable_by_hand = 3}, + sounds = default.node_sound_glass_defaults(), +}) + +minetest.register_craft({ + output = "cblocks:glass_".. colours[i][1] .. " 2", + recipe = { + {"default:glass","default:glass", "dye:" .. colours[i][1]}, + } +}) + end \ No newline at end of file diff --git a/textures/cblocks.png b/textures/cblocks.png new file mode 100644 index 0000000..af22b3a Binary files /dev/null and b/textures/cblocks.png differ