Add cblocks

This commit is contained in:
jordan4ibanez 2016-11-23 21:43:28 -05:00
parent b87e6b52cb
commit 6d70795126
7 changed files with 129 additions and 0 deletions

View File

@ -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

View File

@ -0,0 +1,2 @@
default
lucky_block?

View File

@ -0,0 +1 @@
Adds coloured wood, glass and stone blocks.

View File

@ -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")

View File

@ -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.

View File

@ -0,0 +1 @@
name = cblocks

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 B