init.lua 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. dryleaves = dryleaves or {}
  2. dryleaves.modpath = minetest.get_modpath("dryleaves")
  3. minetest.register_node("dryleaves:leaves", {
  4. description = "Dried Leaves",
  5. drawtype = "allfaces_optional",
  6. waving = 1,
  7. visual_scale = 1.3,
  8. tiles = {"dryleaves_leaves.png"},
  9. paramtype = "light",
  10. groups = utility.dig_groups("leaves", {leafdecay = 3, flammable = 3, leaves = 1, dry_leaves = 1}),
  11. sounds = default.node_sound_leaves_defaults(),
  12. on_construct = enhanced_leafdecay.make_leaf_constructor({}),
  13. on_timer = enhanced_leafdecay.make_leaf_nodetimer({}),
  14. })
  15. minetest.register_node("dryleaves:jungleleaves", {
  16. description = "Damp Old Leaves",
  17. drawtype = "allfaces_optional",
  18. waving = 1,
  19. visual_scale = 1.3,
  20. tiles = {"dryleaves_jungleleaves.png"},
  21. paramtype = "light",
  22. groups = utility.dig_groups("leaves", {leafdecay = 3, flammable = 3, leaves = 1, dry_leaves = 1}),
  23. sounds = default.node_sound_leaves_defaults(),
  24. on_construct = enhanced_leafdecay.make_leaf_constructor({}),
  25. on_timer = enhanced_leafdecay.make_leaf_nodetimer({}),
  26. })
  27. minetest.register_node("dryleaves:dry_leaves", {
  28. description = "Dry Jungle Leaves",
  29. tiles = {"darkage_dry_leaves.png"},
  30. paramtype = "light",
  31. groups = utility.dig_groups("leaves", {leafdecay = 3, flammable = 3, leaves = 1, dry_leaves = 1}),
  32. sounds = default.node_sound_leaves_defaults(),
  33. on_construct = enhanced_leafdecay.make_leaf_constructor({}),
  34. on_timer = enhanced_leafdecay.make_leaf_nodetimer({}),
  35. })
  36. minetest.register_craft({
  37. output = "dryleaves:jungleleaves",
  38. type = "shapeless",
  39. recipe = {"default:snow", "group:green_leaves"},
  40. })
  41. minetest.register_craft({
  42. type = "cooking",
  43. output = "dryleaves:leaves",
  44. recipe = "basictrees:tree_leaves",
  45. cooktime = 1,
  46. })
  47. minetest.register_craft({
  48. type = "cooking",
  49. output = "dryleaves:dry_leaves",
  50. recipe = "basictrees:jungletree_leaves",
  51. cooktime = 1,
  52. })