init.lua 904 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. local S = minetest.get_translator("homedecor_furniture")
  2. local ob_cbox = {
  3. type = "fixed",
  4. fixed = { -0.5, -0.5, 0, 0.5, 0.5, 0.5 }
  5. }
  6. minetest.register_node(":homedecor:openframe_bookshelf", {
  7. description = S("Bookshelf (open-frame)"),
  8. drawtype = "mesh",
  9. mesh = "homedecor_openframe_bookshelf.obj",
  10. tiles = {
  11. "homedecor_openframe_bookshelf_books.png",
  12. "default_wood.png"
  13. },
  14. groups = {choppy=3,oddly_breakable_by_hand=2,flammable=3},
  15. sounds = default.node_sound_wood_defaults(),
  16. paramtype = "light",
  17. paramtype2 = "facedir",
  18. selection_box = ob_cbox,
  19. collision_box = ob_cbox,
  20. })
  21. homedecor.register("wall_shelf", {
  22. description = S("Wall Shelf"),
  23. tiles = {
  24. "default_wood.png",
  25. },
  26. groups = { snappy = 3 },
  27. sounds = default.node_sound_wood_defaults(),
  28. node_box = {
  29. type = "fixed",
  30. fixed = {
  31. {-0.5, 0.4, 0.47, 0.5, 0.47, 0.5},
  32. {-0.5, 0.47, -0.1875, 0.5, 0.5, 0.5}
  33. }
  34. }
  35. })