nodes.lua 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. minetest.register_node("decoblocks:bamboo_fence", {
  2. description = "Bamboo Fence",
  3. tiles = {
  4. "decoblocks_bamboo_fence_top.png",
  5. "decoblocks_bamboo_fence_top.png",
  6. "decoblocks_bamboo_fence.png",
  7. },
  8. inventory_image = "default_fence_overlay.png^decoblocks_bamboo.png^default_fence_overlay.png^[makealpha:255,126,126",
  9. wield_image = "default_fence_overlay.png^decoblocks_bamboo.png^default_fence_overlay.png^[makealpha:255,126,126",
  10. drawtype = "nodebox",
  11. paramtype = "light",
  12. connects_to = {"group:fence", "group:wood", "group:choppy", "group:stone"},
  13. node_box = {
  14. type = "connected",
  15. fixed = {
  16. {-0.125, -0.5, -0.125, 0.125, 0.5, 0.125}, -- NodeBox1
  17. },
  18. connect_back = {
  19. {-0.125, -0.5, -0.125, 0.125, 0.5, 0.125}, -- NodeBox1
  20. {-0.0625, 0.25, -0.0625, 0.0625, 0.375, 0.5}, -- NodeBox2
  21. {-0.0625, -0.0625, -0.0625, 0.0625, 0.0625, 0.5}, -- NodeBox3
  22. {-0.0625, -0.375, -0.0625, 0.0625, -0.25, 0.5}, -- NodeBox4
  23. },
  24. connect_front = {
  25. {-0.125, -0.5, -0.125, 0.125, 0.5, 0.125}, -- NodeBox1
  26. {-0.0625, 0.25, -0.5, 0.0625, 0.375, 0.0625}, -- NodeBox2
  27. {-0.0625, -0.0625, -0.5, 0.0625, 0.0625, 0.0625}, -- NodeBox3
  28. {-0.0625, -0.375, -0.5, 0.0625, -0.25, 0.0625}, -- NodeBox4
  29. },
  30. connect_left = {
  31. {-0.125, -0.5, -0.125, 0.125, 0.5, 0.125}, -- NodeBox1
  32. {-0.5, 0.25, -0.0625, 0.0625, 0.375, 0.0625}, -- NodeBox2
  33. {-0.5, -0.0625, -0.0625, 0.0625, 0.0625, 0.0625}, -- NodeBox3
  34. {-0.5, -0.375, -0.0625, 0.0625, -0.25, 0.0625}, -- NodeBox4
  35. },
  36. connect_right = {
  37. {-0.125, -0.5, -0.125, 0.125, 0.5, 0.125}, -- NodeBox1
  38. {0, 0.25, -0.0625, 0.5, 0.375, 0.0625}, -- NodeBox2
  39. {0, -0.0625, -0.0625, 0.5, 0.0625, 0.0625}, -- NodeBox3
  40. {0, -0.375, -0.0625, 0.5, -0.25, 0.0625}, -- NodeBox4
  41. }
  42. },
  43. groups = {choppy=1, oddly_breakable_by_hand=1, fence=1},
  44. sounds = default.node_sound_wood_defaults()
  45. })
  46. minetest.register_node("decoblocks:scarecrow", {
  47. description = "Scarecrow",
  48. drawtype = "mesh",
  49. mesh = "scarecrow.obj",
  50. paramtype2 = "facedir",
  51. tiles = {
  52. "decoblocks_scarecrow.png",
  53. },
  54. visual_scale = 0.5,
  55. wield_image = "decoblocks_scarecrow_item.png",
  56. wield_scale = {x=1.0, y=1.0, z=1.0},
  57. paramtype = "light",
  58. selection_box = {
  59. type = "fixed",
  60. fixed = {-0.3, -0.5, -0.3, 0.3, 1, 0.3}
  61. },
  62. collision_box = {
  63. type = "fixed",
  64. fixed = {-0.3, -0.5, -0.3, 0.3, 1, 0.3}
  65. },
  66. inventory_image = "decoblocks_scarecrow_item.png",
  67. groups = {choppy = 1, oddly_breakable_by_hand = 1},
  68. sounds = default.node_sound_wood_defaults()
  69. })
  70. minetest.register_node("decoblocks:spikes", {
  71. description = "Spikes",
  72. drawtype = "firelike",
  73. tiles = {
  74. "decoblocks_spikes.png"
  75. },
  76. wield_image = "decoblocks_spikes.png",
  77. inventory_image = "decoblocks_spikes.png",
  78. groups = {cracky=3},
  79. paramtype = "light",
  80. walkable = false,
  81. damage_per_second = 3,
  82. selection_box = {
  83. type = "fixed",
  84. fixed = {-0.5, -0.5, -0.5, 0.5, -0.3, 0.5}
  85. },
  86. collision_box = {
  87. type = "fixed",
  88. fixed = {-0.5, -0.5, -0.5, 0.5, -0.2, 0.5}
  89. }
  90. })
  91. minetest.register_node("decoblocks:paper_lantern", {
  92. description = "Paper Lantern",
  93. tiles = {"decoblocks_paper_lantern_top.png", "decoblocks_paper_lantern_top.png", "decoblocks_paper_lantern.png"},
  94. paramtype = "light",
  95. light_source = 13,
  96. is_ground_content = false,
  97. groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 3,
  98. flammable = 3, wool = 1},
  99. sounds = default.node_sound_defaults(),
  100. })