nodes.lua 586 B

1234567891011121314
  1. local function register_basic(name, desc, light) --Registers node with same texture on all sides.
  2. light = light or 5
  3. minetest.register_node('lights:'..name, {
  4. description = desc,
  5. tiles = {{name='lights_'..name..'.png', align_style='world', scale=4}},
  6. inventory_image = '[inventorycube{lights_'..name..'.png&[sheet:4x4:1,1{lights_'..name..'.png&[sheet:4x4:1,1{lights_'..name..'.png&[sheet:4x4:1,1',
  7. groups = {breakable=1},
  8. light_source = light,
  9. sounds = {footstep = {name = glass, gain = .8}}
  10. })
  11. end
  12. register_basic('block_1', 'Light 1', 10)