earth.lua 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  1. ----------------------------------------------------------
  2. -- Earthen Construction
  3. -- blocks made from dirt
  4. -------------------------------------------------
  5. -------------------------------
  6. --Compacted dirt
  7. --i.e. a dirt floor
  8. -- this is to simulate dirt floored buildings...
  9. -- where the only preparation was clearing the vegetation
  10. --created via dirt compactor tool
  11. minetest.register_node("earthbuild:compacted_dirt", {
  12. description = "Compacted Dirt",
  13. tiles = {"earthbuild_compacted_dirt.png"},
  14. groups = {crumbly = 2},
  15. drop = 'default:dirt',
  16. sounds = default.node_sound_dirt_defaults(),
  17. })
  18. -----------------------------------------------------
  19. --TURF
  20. -- the grass layer sliced off from the soil.
  21. -- uses the grass roots for strength.
  22. --grass still grows on top
  23. --craft... only using grass layer, so need to harvest dirt_with_grass...
  24. -- turf cutter to override default drop dirt.
  25. ---------
  26. --Turf
  27. minetest.register_node('earthbuild:turf', {
  28. description = 'Turf Wall',
  29. drawtype = "normal",
  30. tiles = { "default_grass.png",
  31. "earthbuild_compacted_dirt.png",
  32. "earthbuild_turf.png",
  33. "earthbuild_turf.png",
  34. "earthbuild_turf.png",
  35. "earthbuild_turf.png"},
  36. paramtype = "light",
  37. --drop = "default:dirt",
  38. groups = {crumbly = 2, falling_node = 1},
  39. sounds = default.node_sound_dirt_defaults(),
  40. })
  41. --------------
  42. --Turf with drystack.
  43. -- this is typically used at the bottom of walls.
  44. -- would make both materials go further (1/2 each).
  45. minetest.register_node('earthbuild:turf_and_drystack', {
  46. description = 'Turf and Drystack Wall',
  47. drawtype = "normal",
  48. tiles = { "default_grass.png",
  49. "earthbuild_compacted_dirt.png",
  50. "earthbuild_turf_and_drystack.png",
  51. "earthbuild_turf_and_drystack.png",
  52. "earthbuild_turf_and_drystack.png",
  53. "earthbuild_turf_and_drystack.png"},
  54. paramtype = "light",
  55. groups = {cracky = 3, crumbly = 1, oddly_breakable_by_hand = 1, falling_node = 1},
  56. sounds = default.node_sound_dirt_defaults(),
  57. })
  58. --craft turf and drystack
  59. minetest.register_craft({
  60. output = 'earthbuild:turf_and_drystack 2',
  61. recipe = {
  62. {'earthbuild:turf'},
  63. {'earthbuild:drystack'},
  64. }
  65. })
  66. ----------------------------------------------------------
  67. --EARTH, COB, and MUD BRICK NODES AND CRAFTS
  68. --Note on digging strenghts:
  69. -- Rammed earth is hard e.g. like default sandstone {crumbly = 1, cracky = 3}
  70. -- cob is stronger than dirt {crumbly = 3}, but softer than rammed earth (i.e. 2)
  71. -- all are easy with a pick axe {cracky = 3}
  72. --Note on falling:
  73. --all of these are massive lumps of mud... so need support.
  74. --apparently domes, arches etc can be made with cob and mudbrick but are difficult.
  75. -- limited this ability to mudbrick... to give some point to making it.
  76. --Note on merits of each block:
  77. --all are stronger/more aesthetic than dirt.
  78. --rammed earth: when have lots of/only dirt and want hard walls.
  79. -- cob: a precursor to mudbricks, or for wattle and daub. Use when don't need supports.
  80. -- mudbrick: more versatile than cob (no falling)
  81. ---------------------------
  82. --Rammed Earth
  83. minetest.register_node('earthbuild:rammed_earth', {
  84. description = 'Rammed Earth',
  85. drawtype = "normal",
  86. tiles = {
  87. "earthbuild_rammed_earth.png",
  88. "earthbuild_rammed_earth_side.png",
  89. "earthbuild_rammed_earth_side.png",
  90. "earthbuild_rammed_earth_side.png",
  91. "earthbuild_rammed_earth_side.png",
  92. "earthbuild_rammed_earth_side.png"
  93. },
  94. paramtype = "light",
  95. --drop = "default:dirt",
  96. groups = {crumbly = 1, cracky = 3, falling_node = 1},
  97. sounds = default.node_sound_dirt_defaults(),
  98. })
  99. -- adds rammed_earth recipes
  100. minetest.register_craft({
  101. output = 'earthbuild:rammed_earth 1',
  102. recipe = {
  103. {'default:dirt'},
  104. {'default:dirt'},
  105. {'default:dirt'},
  106. }
  107. })
  108. --only for rammed as cob is typically made with water
  109. minetest.register_craft({
  110. output = 'earthbuild:rammed_earth 1',
  111. recipe = {
  112. {'default:dry_dirt'},
  113. {'default:dry_dirt'},
  114. {'default:dry_dirt'},
  115. }
  116. })
  117. ------------------------------------------
  118. --Cob
  119. minetest.register_node('earthbuild:cob', {
  120. description = 'Cob',
  121. drawtype = "normal",
  122. tiles = {"earthbuild_cob.png"},
  123. paramtype = "light",
  124. --drop = "default:dirt",
  125. groups = {crumbly = 2, cracky = 3, falling_node = 1},
  126. sounds = default.node_sound_dirt_defaults(),
  127. })
  128. -- adds cob recipes
  129. minetest.register_craft({
  130. output = 'earthbuild:cob 2',
  131. recipe = {
  132. {'default:dirt', '', 'default:dirt'},
  133. {'', 'group:grass', ''},
  134. {'', '', ''},
  135. }
  136. })
  137. minetest.register_craft({
  138. output = 'earthbuild:cob 2',
  139. recipe = {
  140. {'default:dirt', '', 'default:dirt'},
  141. {'', 'group:dry_grass', ''},
  142. {'', '', ''},
  143. }
  144. })
  145. minetest.register_craft({
  146. output = 'earthbuild:cob 2',
  147. recipe = {
  148. {'default:dirt', '', 'default:dirt'},
  149. {'', 'default:junglegrass', ''},
  150. {'', '', ''},
  151. }
  152. })
  153. minetest.register_craft({
  154. output = 'earthbuild:cob 2',
  155. recipe = {
  156. {'default:dirt', '', 'default:dirt'},
  157. {'', 'default:dry_shrub', ''},
  158. {'', '', ''},
  159. }
  160. })
  161. minetest.register_craft({
  162. output = 'earthbuild:cob 2',
  163. recipe = {
  164. {'default:dirt', '', 'default:dirt'},
  165. {'', 'default:papyrus', ''},
  166. {'', '', ''},
  167. }
  168. })
  169. minetest.register_craft({
  170. output = 'earthbuild:cob 2',
  171. recipe = {
  172. {'default:dirt', '', 'default:dirt'},
  173. {'', 'farming:wheat', ''},
  174. {'', '', ''},
  175. }
  176. })
  177. minetest.register_craft({
  178. output = 'earthbuild:cob 2',
  179. recipe = {
  180. {'default:dirt', '', 'default:dirt'},
  181. {'', 'group:leaves', ''},
  182. {'', '', ''},
  183. }
  184. })
  185. -- craft the cob from mudbrick
  186. -- (they are the same stuff, just arranged differently)
  187. minetest.register_craft({
  188. output = 'earthbuild:cob',
  189. recipe = {{'earthbuild:mud_brick'}}
  190. })
  191. ---------------------------------------------------------
  192. --MUD BRICK NODES AND CRAFTS
  193. minetest.register_node('earthbuild:mud_brick', {
  194. description = 'Mud Brick',
  195. drawtype = "normal",
  196. tiles = {"earthbuild_mud_brick.png"},
  197. paramtype = "light",
  198. groups = {crumbly = 2, cracky = 3},
  199. sounds = default.node_sound_dirt_defaults(),
  200. })
  201. -- craft the mud brick from cob
  202. -- (they are the same stuff, just arranged differently)
  203. minetest.register_craft({
  204. output = 'earthbuild:mud_brick',
  205. recipe = {{'earthbuild:cob'}}
  206. })
  207. ----------------------------------------------------------
  208. --STAIRS AND SLABS NODES
  209. -- Stairs and slab for rammed earth
  210. stairs.register_stair_and_slab("rammed_earth", "earthbuild:rammed_earth",
  211. {crumbly = 1, cracky = 3, falling_node = 1},
  212. {"earthbuild_rammed_earth.png"},
  213. "Rammed Earth Stair",
  214. "Rammed Earth Slab",
  215. default.node_sound_dirt_defaults())
  216. -- Stairs and slab for cob
  217. stairs.register_stair_and_slab("cob", "earthbuild:cob",
  218. {crumbly = 2, cracky = 3, falling_node = 1},
  219. {"earthbuild_cob.png"},
  220. "Cob Stair",
  221. "Cob Slab",
  222. default.node_sound_dirt_defaults())
  223. -- Stairs and slab for mud brick
  224. stairs.register_stair_and_slab("mud_brick", "earthbuild:mud_brick",
  225. {crumbly = 2, cracky = 3},
  226. {"earthbuild_mud_brick.png"},
  227. "Mud Brick Stair",
  228. "Mud Brick Slab",
  229. default.node_sound_dirt_defaults())
  230. -- Stairs and slab for Turf
  231. stairs.register_stair_and_slab("turf", "earthbuild:turf",
  232. {crumbly = 2, falling_node = 1},
  233. { "default_grass.png",
  234. "earthbuild_compacted_dirt.png",
  235. "earthbuild_turf.png",
  236. "earthbuild_turf.png",
  237. "earthbuild_turf.png",
  238. "earthbuild_turf.png"},
  239. "Turf Stair",
  240. "Turf Slab",
  241. default.node_sound_dirt_defaults())