Add cblocks
This commit is contained in:
parent
b87e6b52cb
commit
6d70795126
13
mods/Blocks/cblocks/README.md
Normal file
13
mods/Blocks/cblocks/README.md
Normal 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
|
2
mods/Blocks/cblocks/depends.txt
Normal file
2
mods/Blocks/cblocks/depends.txt
Normal file
@ -0,0 +1,2 @@
|
||||
default
|
||||
lucky_block?
|
1
mods/Blocks/cblocks/description.txt
Normal file
1
mods/Blocks/cblocks/description.txt
Normal file
@ -0,0 +1 @@
|
||||
Adds coloured wood, glass and stone blocks.
|
91
mods/Blocks/cblocks/init.lua
Normal file
91
mods/Blocks/cblocks/init.lua
Normal 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")
|
21
mods/Blocks/cblocks/license.txt
Normal file
21
mods/Blocks/cblocks/license.txt
Normal 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.
|
1
mods/Blocks/cblocks/mod.conf
Normal file
1
mods/Blocks/cblocks/mod.conf
Normal file
@ -0,0 +1 @@
|
||||
name = cblocks
|
BIN
mods/Blocks/cblocks/textures/cblocks.png
Normal file
BIN
mods/Blocks/cblocks/textures/cblocks.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 84 B |
Loading…
x
Reference in New Issue
Block a user