Allow opening chests when wielding corals
[oweals/minetest_game.git] / mods / wool / init.lua
1 local dyes = dye.dyes
2
3 for i = 1, #dyes do
4         local name, desc = unpack(dyes[i])
5
6         minetest.register_node("wool:" .. name, {
7                 description = desc .. " Wool",
8                 tiles = {"wool_" .. name .. ".png"},
9                 is_ground_content = false,
10                 groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 3,
11                                 flammable = 3, wool = 1},
12                 sounds = default.node_sound_defaults(),
13         })
14
15         minetest.register_craft{
16                 type = "shapeless",
17                 output = "wool:" .. name,
18                 recipe = {"group:dye,color_" .. name, "group:wool"},
19         }
20 end
21
22 -- Legacy
23 -- Backwards compatibility with jordach's 16-color wool mod
24 minetest.register_alias("wool:dark_blue", "wool:blue")
25 minetest.register_alias("wool:gold", "wool:yellow")