diff --git a/mods/Blocks/cblocks/README.md b/mods/Blocks/cblocks/README.md new file mode 100644 index 0000000..8c80caa --- /dev/null +++ b/mods/Blocks/cblocks/README.md @@ -0,0 +1,13 @@ +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 + + +Change log: + +- 0.1 - Initial release +- 0.2 - Added coloured glass and fixed violet + +Lucky Blocks: 4 diff --git a/mods/Blocks/cblocks/depends.txt b/mods/Blocks/cblocks/depends.txt new file mode 100644 index 0000000..8035459 --- /dev/null +++ b/mods/Blocks/cblocks/depends.txt @@ -0,0 +1,2 @@ +default +lucky_block? \ No newline at end of file diff --git a/mods/Blocks/cblocks/description.txt b/mods/Blocks/cblocks/description.txt new file mode 100644 index 0000000..d501ccd --- /dev/null +++ b/mods/Blocks/cblocks/description.txt @@ -0,0 +1 @@ +Adds coloured wood, glass and stone blocks. \ No newline at end of file diff --git a/mods/Blocks/cblocks/init.lua b/mods/Blocks/cblocks/init.lua new file mode 100644 index 0000000..9ec1acc --- /dev/null +++ b/mods/Blocks/cblocks/init.lua @@ -0,0 +1,91 @@ + +local colours = { + {"black", "Black", "#000000b0"}, + {"blue", "Blue", "#015dbb70"}, + {"brown", "Brown", "#a78c4570"}, + {"cyan", "Cyan", "#01ffd870"}, + {"dark_green", "Dark Green", "#005b0770"}, + {"dark_grey", "Dark Grey", "#303030b0"}, + {"green", "Green", "#61ff0170"}, + {"grey", "Grey", "#5b5b5bb0"}, + {"magenta", "Magenta", "#ff05bb70"}, + {"orange", "Orange", "#ff840170"}, + {"pink", "Pink", "#ff65b570"}, + {"red", "Red", "#ff000070"}, + {"violet", "Violet", "#2000c970"}, + {"white", "White", "#abababc0"}, + {"yellow", "Yellow", "#e3ff0070"}, +} + +for i = 1, #colours, 1 do + +-- wood + +minetest.register_node("cblocks:wood_" .. colours[i][1], { + description = colours[i][2] .. " Wooden Planks", + tiles = {"default_wood.png^[colorize:" .. colours[i][3]}, + paramtype = "light", + is_ground_content = false, + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, wood = 1}, + sounds = default.node_sound_wood_defaults(), +}) + +minetest.register_craft({ + output = "cblocks:wood_".. colours[i][1] .. " 2", + recipe = { + {"group:wood","group:wood", "dye:" .. colours[i][1]}, + } +}) + +-- stone brick + +minetest.register_node("cblocks:stonebrick_" .. colours[i][1], { + description = colours[i][2] .. " Stone Brick", + tiles = {"default_stone_brick.png^[colorize:" .. colours[i][3]}, + paramtype = "light", + is_ground_content = false, + groups = {cracky = 2, stone = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_craft({ + output = "cblocks:stonebrick_".. colours[i][1] .. " 2", + recipe = { + {"default:stonebrick","default:stonebrick", "dye:" .. colours[i][1]}, + } +}) + +-- 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 + +-- add lucky blocks +if minetest.get_modpath("lucky_block") then +lucky_block:add_blocks({ + {"dro", {"cblocks:wood_"}, 10, true}, + {"dro", {"cblocks:stonebrick_"}, 10, true}, + {"dro", {"cblocks:glass_"}, 10, true}, + {"exp"}, +}) +end + +print ("[MOD] Cblocks loaded") diff --git a/mods/Blocks/cblocks/license.txt b/mods/Blocks/cblocks/license.txt new file mode 100644 index 0000000..fec6f6a --- /dev/null +++ b/mods/Blocks/cblocks/license.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 TenPlus1 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/mods/Blocks/cblocks/mod.conf b/mods/Blocks/cblocks/mod.conf new file mode 100644 index 0000000..d90c50e --- /dev/null +++ b/mods/Blocks/cblocks/mod.conf @@ -0,0 +1 @@ +name = cblocks \ No newline at end of file diff --git a/mods/Blocks/cblocks/textures/cblocks.png b/mods/Blocks/cblocks/textures/cblocks.png new file mode 100644 index 0000000..af22b3a Binary files /dev/null and b/mods/Blocks/cblocks/textures/cblocks.png differ