init.lua 550 B

1234567891011121314151617181920
  1. local dyes = dye.dyes
  2. for i = 1, #dyes do
  3. local name, desc, hex = unpack(dyes[i])
  4. minetest.register_node('wool:' .. name, {
  5. description = desc .. ' Wool',
  6. tiles = {'wool.png^[multiply:'..hex},
  7. is_ground_content = false,
  8. groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 3, flammable = 3, wool = 1},
  9. sounds = default.node_sound_defaults(),
  10. })
  11. minetest.register_craft{
  12. type = 'shapeless',
  13. output = 'wool:' .. name,
  14. recipe = {'group:dye,color_' .. name, 'group:wool'},
  15. }
  16. end