leaves.lua 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. local leaftype = "plantlike"
  2. local leafscale = 1.4
  3. -- banana tree leaves
  4. minetest.register_node("epic_trees:bananaleaves", {
  5. description = "Banana Leaves",
  6. drawtype = leaftype,
  7. visual_scale = leafscale,
  8. tiles = {"banana_leaf.png"},
  9. inventory_image = "banana_leaf.png",
  10. wield_image = "banana_leaf.png",
  11. paramtype = "light",
  12. walkable = false,
  13. waving = 1,
  14. groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
  15. drop = {
  16. max_items = 1,
  17. items = {
  18. {items = {"epic_trees:banana_tree_sapling"}, rarity = 10},
  19. {items = {"epic_trees:bananaleaves"}}
  20. }
  21. },
  22. sounds = default.node_sound_leaves_defaults(),
  23. after_place_node = default.after_place_leaves,
  24. })
  25. default.register_leafdecay({
  26. trunks = {"epic_trees:banana_trunk"},
  27. leaves = {"epic_trees:bananaleaves", "epic_trees:banana"},
  28. radius = 3
  29. })
  30. -- orange tree leaves
  31. minetest.register_node("epic_trees:orange_leaves", {
  32. description = "Orange Leaves",
  33. drawtype = leaftype,
  34. visual_scale = leafscale,
  35. tiles = {"orange_leaves.png"},
  36. inventory_image = "orange_leaves.png",
  37. wield_image = "orange_leaves.png",
  38. paramtype = "light",
  39. walkable = epic_trees.leafwalk,
  40. waving = 1,
  41. groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
  42. drop = {
  43. max_items = 1,
  44. items = {
  45. {items = {"epic_trees:orange_tree_sapling"}, rarity = 15},
  46. {items = {"epic_trees:orange_leaves"}}
  47. }
  48. },
  49. sounds = default.node_sound_leaves_defaults(),
  50. after_place_node = default.after_place_leaves,
  51. })
  52. default.register_leafdecay({
  53. trunks = {"default:tree"},
  54. leaves = {"epic_trees:orange_leaves", "epic_trees:orange", 'default:leaves', 'default:apple'},
  55. radius = 3
  56. })