nodes.lua 73 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435
  1. -- mods/default/nodes.lua
  2. --[[ Node name convention:
  3. Although many node names are in combined-word form, the required form for new
  4. node names is words separated by underscores. If both forms are used in written
  5. language (for example pinewood and pine wood) the underscore form should be used.
  6. --]]
  7. --[[ Index:
  8. Stone
  9. -----
  10. (1. Material 2. Cobble variant 3. Brick variant 4. Modified forms)
  11. default:stone
  12. default:cobble
  13. default:stonebrick
  14. default:stone_block
  15. default:mossycobble
  16. default:desert_stone
  17. default:desert_cobble
  18. default:desert_stonebrick
  19. default:desert_stone_block
  20. default:sandstone
  21. default:sandstonebrick
  22. default:sandstone_block
  23. default:obsidian
  24. default:obsidianbrick
  25. default:obsidian_block
  26. Soft / Non-Stone
  27. ----------------
  28. (1. Material 2. Modified forms)
  29. default:dirt
  30. default:dirt_with_grass
  31. default:dirt_with_grass_footsteps
  32. default:dirt_with_dry_grass
  33. default:dirt_with_snow
  34. default:sand
  35. default:desert_sand
  36. default:gravel
  37. default:clay
  38. default:snow
  39. default:snowblock
  40. default:ice
  41. Trees
  42. -----
  43. (1. Trunk 2. Fabricated trunk 3. Leaves 4. Sapling 5. Fruits)
  44. default:tree
  45. default:wood
  46. default:leaves
  47. default:sapling
  48. default:apple
  49. default:jungletree
  50. default:junglewood
  51. default:jungleleaves
  52. default:junglesapling
  53. default:pine_tree
  54. default:pine_wood
  55. default:pine_needles
  56. default:pine_sapling
  57. default:acacia_tree
  58. default:acacia_wood
  59. default:acacia_leaves
  60. default:acacia_sapling
  61. default:aspen_tree
  62. default:aspen_wood
  63. default:aspen_leaves
  64. default:aspen_sapling
  65. Ores
  66. ----
  67. (1. In stone 2. Blocks)
  68. default:stone_with_coal
  69. default:coalblock
  70. default:stone_with_iron
  71. default:steelblock
  72. default:stone_with_copper
  73. default:copperblock
  74. default:bronzeblock
  75. default:stone_with_gold
  76. default:goldblock
  77. default:stone_with_mese
  78. default:mese
  79. default:stone_with_diamond
  80. default:diamondblock
  81. Plantlife (non-cubic)
  82. ---------------------
  83. default:cactus
  84. default:papyrus
  85. default:dry_shrub
  86. default:junglegrass
  87. default:grass_1
  88. default:grass_2
  89. default:grass_3
  90. default:grass_4
  91. default:grass_5
  92. default:dry_grass_1
  93. default:dry_grass_2
  94. default:dry_grass_3
  95. default:dry_grass_4
  96. default:dry_grass_5
  97. Liquids
  98. -------
  99. (1. Source 2. Flowing)
  100. default:water_source
  101. default:water_flowing
  102. default:river_water_source
  103. default:river_water_flowing
  104. default:lava_source
  105. default:lava_flowing
  106. Tools / "Advanced" crafting / Non-"natural"
  107. -------------------------------------------
  108. default:sign_wall_wood
  109. default:sign_wall_steel
  110. default:ladder_wood
  111. default:ladder_steel
  112. default:fence_wood
  113. default:fence_acacia_wood
  114. default:fence_junglewood
  115. default:fence_pine_wood
  116. default:fence_aspen_wood
  117. default:glass
  118. default:obsidian_glass
  119. default:rail
  120. default:brick
  121. default:meselamp
  122. Misc
  123. ----
  124. default:cloud
  125. --]]
  126. --
  127. -- Stone
  128. --
  129. -- Localize for performance.
  130. local math_random = math.random
  131. local vector_add = vector.add
  132. minetest.register_node("default:stone", {
  133. description = "Stone",
  134. --[[
  135. drawtype = "airlike",
  136. paramtype = "light",
  137. sunlight_propagates = true,
  138. light_source = 15,
  139. pointable = false,
  140. --]]
  141. tiles = {{name="stone_macro.png", align_style="world", scale=8}},
  142. groups = utility.dig_groups("stone", {
  143. stone = 1, native_stone = 1,
  144. melts = 1, cobble_type = 1,
  145. }),
  146. drop = 'default:cobble',
  147. legacy_mineral = true,
  148. sounds = default.node_sound_stone_defaults(),
  149. _melts_to = "cavestuff:cobble_with_rockmelt",
  150. -- Common stone does not count toward tool's dig count.
  151. _toolranks = {
  152. ignore = true,
  153. },
  154. -- Collapsed stone breaks up into cobble.
  155. on_finish_collapse = function(pos, node)
  156. minetest.swap_node(pos, {name="default:cobble"})
  157. end,
  158. on_collapse_to_entity = function(pos, node)
  159. minetest.add_item(pos, {name="default:cobble"})
  160. end,
  161. })
  162. -- Name is very similar to default:stone to make it hard to detect even with F5 debug info.
  163. minetest.register_node(":defauIt:stone", {
  164. description = "Stone (Please Report To Admin)",
  165. tiles = {"default_stone.png"},
  166. groups = utility.dig_groups("softcobble", {
  167. melts = 1, falling_node = 1,
  168. }),
  169. drop = 'default:cobble',
  170. legacy_mineral = true,
  171. sounds = default.node_sound_stone_defaults(),
  172. _melts_to = "cavestuff:cobble_with_rockmelt",
  173. -- Collapsed stone breaks up into cobble.
  174. on_finish_collapse = function(pos, node)
  175. minetest.swap_node(pos, {name="default:cobble"})
  176. end,
  177. on_collapse_to_entity = function(pos, node)
  178. minetest.add_item(pos, {name="default:cobble"})
  179. end,
  180. -- Player walking on it causes collapse.
  181. on_player_walk_over = function(pos, player)
  182. minetest.check_for_falling(pos)
  183. end,
  184. })
  185. minetest.register_node("default:cobble", {
  186. description = "Cobblestone",
  187. tiles = {"default_cobble.png"},
  188. is_ground_content = false,
  189. groups = utility.dig_groups("cobble", {
  190. stone = 1, native_stone = 1,
  191. melts = 1, cobble_type = 1,
  192. }),
  193. sounds = default.node_sound_stone_defaults(),
  194. _melts_to = "cavestuff:cobble_with_rockmelt",
  195. -- Common stone does not count toward tool's dig count.
  196. _toolranks = {
  197. ignore = true,
  198. },
  199. _no_auto_pop = true,
  200. })
  201. minetest.register_node("default:stonebrick", {
  202. description = "Stone Brick",
  203. paramtype2 = "facedir",
  204. place_param2 = 0,
  205. tiles = {"default_stone_brick.png"},
  206. is_ground_content = false,
  207. groups = utility.dig_groups("brick", {brick = 1}),
  208. sounds = default.node_sound_stone_defaults(),
  209. })
  210. minetest.register_node("default:stone_block", {
  211. description = "Stone Block",
  212. tiles = {"default_stone_block.png"},
  213. is_ground_content = false,
  214. groups = utility.dig_groups("block", {stone=1, block = 1}),
  215. sounds = default.node_sound_stone_defaults(),
  216. })
  217. minetest.register_node("default:mossycobble", {
  218. description = "Mossy Cobblestone",
  219. tiles = {"default_mossycobble.png"},
  220. is_ground_content = false,
  221. groups = utility.dig_groups("cobble", {
  222. stone = 1, native_stone = 1,
  223. melts = 1,
  224. }),
  225. _melts_to = "cavestuff:cobble_with_rockmelt",
  226. sounds = default.node_sound_stone_defaults(),
  227. })
  228. minetest.register_node("default:desert_stone", {
  229. description = "Redstone",
  230. tiles = {{name="desert_stone_macro.png", align_style="world", scale=8}},
  231. groups = utility.dig_groups("stone", {stone = 1, native_stone = 1}),
  232. drop = 'default:desert_cobble2',
  233. legacy_mineral = true,
  234. sounds = default.node_sound_stone_defaults(),
  235. -- Common stone does not count toward tool's dig count.
  236. _toolranks = {
  237. ignore = true,
  238. },
  239. -- Made desert stone a road material on March 16, 2018.
  240. movement_speed_multiplier = default.ROAD_SPEED,
  241. -- Collapsed stone breaks up into cobble.
  242. on_finish_collapse = function(pos, node)
  243. minetest.swap_node(pos, {name="default:desert_cobble2"})
  244. end,
  245. on_collapse_to_entity = function(pos, node)
  246. minetest.add_item(pos, {name="default:desert_cobble2"})
  247. end,
  248. })
  249. minetest.register_node("default:desert_cobble", {
  250. description = "Chalked Redstone Cobble",
  251. tiles = {"default_desert_cobble.png"}, -- Original "chalked" image (pre 5.0.0).
  252. is_ground_content = false,
  253. groups = utility.dig_groups("cobble", {stone = 1, native_stone = 1}),
  254. sounds = default.node_sound_stone_defaults(),
  255. })
  256. minetest.register_node("default:desert_cobble2", {
  257. description = "Redstone Cobble",
  258. tiles = {"default_desert_cobble2.png"},
  259. is_ground_content = false,
  260. groups = utility.dig_groups("cobble"),
  261. sounds = default.node_sound_stone_defaults(),
  262. -- Common stone does not count toward tool's dig count.
  263. _toolranks = {
  264. ignore = true,
  265. },
  266. })
  267. minetest.register_node("default:desert_stonebrick", {
  268. description = "Redstone Brick",
  269. paramtype2 = "facedir",
  270. place_param2 = 0,
  271. tiles = {"default_desert_stone_brick.png"},
  272. is_ground_content = false,
  273. groups = utility.dig_groups("brick", {stone = 1, brick=1}),
  274. sounds = default.node_sound_stone_defaults(),
  275. })
  276. minetest.register_node("default:desert_stone_block", {
  277. description = "Redstone Block",
  278. tiles = {"default_desert_stone_block.png"},
  279. is_ground_content = false,
  280. groups = utility.dig_groups("block", {stone = 1, block=1}),
  281. sounds = default.node_sound_stone_defaults(),
  282. })
  283. minetest.register_node("default:sandstone", {
  284. description = "Sandstone",
  285. tiles = {"default_sandstone.png"},
  286. groups = utility.dig_groups("softstone", {stone=1}),
  287. sounds = default.node_sound_stone_defaults(),
  288. -- Added on March 16, 2018.
  289. movement_speed_multiplier = default.ROAD_SPEED,
  290. })
  291. minetest.register_node("default:sandstonebrick", {
  292. description = "Sandstone Brick",
  293. paramtype2 = "facedir",
  294. place_param2 = 0,
  295. tiles = {"default_sandstone_brick.png"},
  296. is_ground_content = false,
  297. groups = utility.dig_groups("brick", {brick=1}),
  298. sounds = default.node_sound_stone_defaults(),
  299. })
  300. minetest.register_node("default:sandstone_block", {
  301. description = "Sandstone Block",
  302. tiles = {"default_sandstone_block.png"},
  303. is_ground_content = false,
  304. groups = utility.dig_groups("block", {block=1}),
  305. sounds = default.node_sound_stone_defaults(),
  306. })
  307. minetest.register_node("default:desert_sandstone", {
  308. description = "Desert Sandstone",
  309. tiles = {"default_desert_sandstone.png"},
  310. groups = utility.dig_groups("softstone", {stone=1}),
  311. sounds = default.node_sound_stone_defaults(),
  312. movement_speed_multiplier = default.ROAD_SPEED,
  313. })
  314. minetest.register_node("default:desert_sandstone_brick", {
  315. description = "Desert Sandstone Brick",
  316. paramtype2 = "facedir",
  317. place_param2 = 0,
  318. tiles = {"default_desert_sandstone_brick.png"},
  319. is_ground_content = false,
  320. groups = utility.dig_groups("brick", {brick=1}),
  321. sounds = default.node_sound_stone_defaults(),
  322. })
  323. minetest.register_node("default:desert_sandstone_block", {
  324. description = "Desert Sandstone Block",
  325. tiles = {"default_desert_sandstone_block.png"},
  326. is_ground_content = false,
  327. groups = utility.dig_groups("block", {block=1}),
  328. sounds = default.node_sound_stone_defaults(),
  329. })
  330. minetest.register_node("default:silver_sandstone", {
  331. description = "Silver Sandstone",
  332. tiles = {"default_silver_sandstone.png"},
  333. groups = utility.dig_groups("softstone", {stone=1}),
  334. sounds = default.node_sound_stone_defaults(),
  335. movement_speed_multiplier = default.ROAD_SPEED,
  336. })
  337. minetest.register_node("default:silver_sandstone_brick", {
  338. description = "Silver Sandstone Brick",
  339. paramtype2 = "facedir",
  340. place_param2 = 0,
  341. tiles = {"default_silver_sandstone_brick.png"},
  342. is_ground_content = false,
  343. groups = utility.dig_groups("brick", {brick=1}),
  344. sounds = default.node_sound_stone_defaults(),
  345. })
  346. minetest.register_node("default:silver_sandstone_block", {
  347. description = "Silver Sandstone Block",
  348. tiles = {"default_silver_sandstone_block.png"},
  349. is_ground_content = false,
  350. groups = utility.dig_groups("block", {block=1}),
  351. sounds = default.node_sound_stone_defaults(),
  352. })
  353. minetest.register_node("default:obsidian", {
  354. description = "Obsidian",
  355. tiles = {"default_obsidian.png"},
  356. sounds = default.node_sound_stone_defaults(),
  357. groups = utility.dig_groups("obsidian", {stone=1}),
  358. on_blast = function(...) end, -- Blast resistant.
  359. movement_speed_multiplier = default.ROAD_SPEED_CAVERN,
  360. -- Callbacks are overridden in flameportal mod!
  361. })
  362. minetest.register_node("default:obsidianbrick", {
  363. description = "Obsidian Brick",
  364. paramtype2 = "facedir",
  365. place_param2 = 0,
  366. tiles = {"default_obsidian_brick.png"},
  367. is_ground_content = false,
  368. sounds = default.node_sound_stone_defaults(),
  369. groups = utility.dig_groups("brick", {stone=1, brick=1}),
  370. on_blast = function(...) end, -- Blast resistant.
  371. })
  372. minetest.register_node("default:obsidian_block", {
  373. description = "Obsidian Block",
  374. tiles = {"default_obsidian_block.png"},
  375. is_ground_content = false,
  376. sounds = default.node_sound_stone_defaults(),
  377. groups = utility.dig_groups("block", {stone=1, block=1}),
  378. on_blast = function(...) end, -- Blast resistant.
  379. })
  380. --
  381. -- Soft / Non-Stone
  382. --
  383. minetest.register_node("default:dirt", {
  384. description = "Dirt",
  385. tiles = {"default_dirt.png"},
  386. groups = utility.dig_groups("dirt", {falling_node = 1, dirt_type = 1, non_sterile_dirt_type = 1, raw_dirt_type = 1, soil = 1}),
  387. post_effect_color = {a=255, r=0, g=0, b=0},
  388. sounds = default.node_sound_dirt_defaults(),
  389. movement_speed_multiplier = default.SLOW_SPEED,
  390. })
  391. minetest.register_node("default:dirt_with_grass", {
  392. description = "Dirt With Grass",
  393. tiles = {
  394. "default_grass.png",
  395. "default_dirt.png",
  396. {name = "default_dirt.png^default_grass_side.png", tileable_vertical = false},
  397. },
  398. groups = utility.dig_groups("dirt", {falling_node = 1, dirt_type = 1, non_raw_dirt_type = 1, non_sterile_dirt_type = 1, grassy_dirt_type = 1, soil = 1}),
  399. drop = 'default:dirt',
  400. post_effect_color = {a=255, r=0, g=0, b=0},
  401. sounds = default.node_sound_dirt_defaults({
  402. footstep = {name = "default_grass_footstep", gain = 0.25},
  403. }),
  404. -- Depreciated.
  405. --on_timer = function(...)
  406. -- return dirtspread.dirt_on_timer(...)
  407. --end,
  408. on_finish_collapse = function(pos, node)
  409. minetest.swap_node(pos, {name="default:dirt"})
  410. end,
  411. movement_speed_multiplier = default.SLOW_SPEED_GRASS,
  412. })
  413. -- Does this node even exist in the world?
  414. minetest.register_node("default:dirt_with_grass_footsteps", {
  415. description = "Dirt With Grass And Footsteps",
  416. tiles = {
  417. "default_grass.png^default_footprint.png",
  418. "default_dirt.png",
  419. {name = "default_dirt.png^default_grass_side.png", tileable_vertical = false},
  420. },
  421. groups = utility.dig_groups("dirt", {falling_node = 1, dirt_type = 1, non_raw_dirt_type = 1, non_sterile_dirt_type = 1, grassy_dirt_type = 1, soil = 1, not_in_creative_inventory = 1}),
  422. drop = 'default:dirt',
  423. post_effect_color = {a=255, r=0, g=0, b=0},
  424. sounds = default.node_sound_dirt_defaults({
  425. footstep = {name = "default_grass_footstep", gain = 0.25},
  426. }),
  427. -- Depreciated.
  428. --on_timer = function(...)
  429. -- return dirtspread.dirt_on_timer(...)
  430. --end,
  431. on_finish_collapse = function(pos, node)
  432. minetest.swap_node(pos, {name="default:dirt"})
  433. end,
  434. movement_speed_multiplier = default.SLOW_SPEED_GRASS,
  435. })
  436. minetest.register_node("default:dirt_with_dry_grass", {
  437. description = "Dirt With Dry Grass",
  438. tiles = {
  439. "default_dry_grass.png",
  440. "default_dirt.png",
  441. {name = "default_dirt.png^default_dry_grass_side.png", tileable_vertical = false},
  442. },
  443. groups = utility.dig_groups("dirt", {falling_node = 1, dirt_type = 1, non_raw_dirt_type = 1, non_sterile_dirt_type = 1, grassy_dirt_type = 1, soil = 1}),
  444. drop = 'default:dirt',
  445. post_effect_color = {a=255, r=0, g=0, b=0},
  446. sounds = default.node_sound_dirt_defaults({
  447. footstep = {name = "default_grass_footstep", gain = 0.4},
  448. }),
  449. -- Depreciated.
  450. --on_timer = function(...)
  451. -- return dirtspread.dirt_on_timer(...)
  452. --end,
  453. on_finish_collapse = function(pos, node)
  454. minetest.swap_node(pos, {name="default:dirt"})
  455. end,
  456. movement_speed_multiplier = default.SLOW_SPEED_GRASS,
  457. })
  458. minetest.register_node("default:dirt_with_snow", {
  459. description = "Dirt With Snow",
  460. tiles = {
  461. "default_snow.png",
  462. "default_dirt.png",
  463. {name = "default_dirt.png^default_snow_side.png", tileable_vertical = false},
  464. },
  465. groups = utility.dig_groups("dirt", {falling_node = 1, dirt_type = 1, non_raw_dirt_type = 1, non_sterile_dirt_type = 1, snowy_dirt_type = 1, snowy = 1, cold = 1}),
  466. drop = 'default:dirt',
  467. post_effect_color = {a=255, r=0, g=0, b=0},
  468. sounds = default.node_sound_dirt_defaults({
  469. footstep = {name = "default_snow_footstep", gain = 0.2},
  470. }),
  471. -- Depreciated.
  472. --on_timer = function(...)
  473. -- return dirtspread.dirt_on_timer(...)
  474. --end,
  475. -- Dirt with snow does not need to turn back to dirt if it falls. After all, snow does not have roots that would be broken, unlike grass.
  476. --[[
  477. on_finish_collapse = function(pos, node)
  478. minetest.swap_node(pos, {name="default:dirt"})
  479. end,
  480. --]]
  481. movement_speed_multiplier = default.SLOW_SPEED,
  482. })
  483. minetest.register_node("default:dark_dirt_with_snow", {
  484. description = "Sterile Dirt With Snow",
  485. tiles = {
  486. "default_snow.png",
  487. "darkage_darkdirt.png",
  488. {name = "darkage_darkdirt.png^default_snow_side.png", tileable_vertical = false},
  489. },
  490. groups = utility.dig_groups("dirt", {falling_node = 1, dirt_type = 1, non_raw_dirt_type = 1, sterile_dirt_type = 1, snowy_dirt_type = 1, snowy = 1, cold = 1}),
  491. drop = 'darkage:darkdirt',
  492. post_effect_color = {a=255, r=0, g=0, b=0},
  493. sounds = default.node_sound_dirt_defaults({
  494. footstep = {name = "default_snow_footstep", gain = 0.2},
  495. }),
  496. -- Depreciated.
  497. --on_timer = function(...)
  498. -- return dirtspread.dirt_on_timer(...)
  499. --end,
  500. -- Dirt with snow does not need to turn back to dirt if it falls. After all, snow does not have roots that would be broken, unlike grass.
  501. --[[
  502. on_finish_collapse = function(pos, node)
  503. minetest.swap_node(pos, {name="darkage:darkdirt"})
  504. end,
  505. --]]
  506. movement_speed_multiplier = default.SLOW_SPEED,
  507. })
  508. minetest.register_node("default:dry_dirt_with_snow", {
  509. description = "Dry Dirt With Snow",
  510. tiles = {
  511. "default_snow.png",
  512. "default_dry_dirt.png",
  513. {name = "default_dry_dirt.png^default_snow_side.png", tileable_vertical = false},
  514. },
  515. groups = utility.dig_groups("dirt", {falling_node = 1, dirt_type = 1, non_raw_dirt_type = 1, non_sterile_dirt_type = 1, dry_dirt_type = 1, snowy_dirt_type = 1, snowy = 1, cold = 1}),
  516. drop = 'default:dry_dirt',
  517. post_effect_color = {a=255, r=0, g=0, b=0},
  518. sounds = default.node_sound_dirt_defaults({
  519. footstep = {name = "default_snow_footstep", gain = 0.2},
  520. }),
  521. -- Depreciated.
  522. --on_timer = function(...)
  523. -- return dirtspread.dirt_on_timer(...)
  524. --end,
  525. -- Dirt with snow does not need to turn back to dirt if it falls. After all, snow does not have roots that would be broken, unlike grass.
  526. --[[
  527. on_finish_collapse = function(pos, node)
  528. minetest.swap_node(pos, {name="default:dry_dirt"})
  529. end,
  530. --]]
  531. movement_speed_multiplier = default.SLOW_SPEED,
  532. })
  533. minetest.register_node("default:dirt_with_rainforest_litter", {
  534. description = "Dirt With Leaf Litter",
  535. tiles = {
  536. "default_rainforest_litter.png",
  537. "default_dirt.png",
  538. {name = "default_dirt.png^default_rainforest_litter_side.png", tileable_vertical = false},
  539. },
  540. groups = utility.dig_groups("dirt", {falling_node = 1, dirt_type = 1, non_raw_dirt_type = 1, leafy_dirt_type = 1, non_sterile_dirt_type = 1, soil = 1}),
  541. drop = "default:dirt",
  542. post_effect_color = {a=255, r=0, g=0, b=0},
  543. sounds = default.node_sound_dirt_defaults({
  544. footstep = {name = "default_grass_footstep", gain = 0.4},
  545. }),
  546. on_finish_collapse = function(pos, node)
  547. minetest.swap_node(pos, {name="default:dirt"})
  548. end,
  549. movement_speed_multiplier = default.SLOW_SPEED,
  550. })
  551. minetest.register_node("default:dark_dirt_with_rainforest_litter", {
  552. description = "Sterile Dirt With Leaf Litter",
  553. tiles = {
  554. "default_rainforest_litter.png",
  555. "darkage_darkdirt.png",
  556. {name = "darkage_darkdirt.png^default_rainforest_litter_side.png", tileable_vertical = false},
  557. },
  558. groups = utility.dig_groups("dirt", {dirt_type = 1, leafy_dirt_type = 1, non_raw_dirt_type = 1, sterile_dirt_type = 1, falling_node = 1}),
  559. drop = "darkage:darkdirt",
  560. post_effect_color = {a=255, r=0, g=0, b=0},
  561. sounds = default.node_sound_dirt_defaults({
  562. footstep = {name = "default_grass_footstep", gain = 0.4},
  563. }),
  564. on_finish_collapse = function(pos, node)
  565. minetest.swap_node(pos, {name="darkage:darkdirt"})
  566. end,
  567. movement_speed_multiplier = default.SLOW_SPEED,
  568. })
  569. minetest.register_node("default:dry_dirt_with_rainforest_litter", {
  570. description = "Dry Dirt With Leaf Litter",
  571. tiles = {
  572. "default_rainforest_litter.png",
  573. "default_dry_dirt.png",
  574. {name = "default_dry_dirt.png^default_rainforest_litter_side.png", tileable_vertical = false},
  575. },
  576. groups = utility.dig_groups("dirt", {dirt_type = 1, non_sterile_dirt_type = 1, non_raw_dirt_type = 1, leafy_dirt_type = 1, dry_dirt_type = 1, falling_node = 1}),
  577. drop = "default:dry_dirt",
  578. post_effect_color = {a=255, r=0, g=0, b=0},
  579. sounds = default.node_sound_dirt_defaults(),
  580. on_finish_collapse = function(pos, node)
  581. minetest.swap_node(pos, {name="default:dry_dirt"})
  582. end,
  583. movement_speed_multiplier = default.SLOW_SPEED,
  584. })
  585. minetest.register_node("default:dirt_with_coniferous_litter", {
  586. description = "Dirt With Acidic Litter",
  587. tiles = {
  588. "default_coniferous_litter.png",
  589. "default_dirt.png",
  590. {name = "default_dirt.png^default_coniferous_litter_side.png", tileable_vertical = false},
  591. },
  592. groups = utility.dig_groups("dirt", {falling_node = 1, non_sterile_dirt_type = 1, non_raw_dirt_type = 1, leafy_dirt_type = 1, dirt_type = 1, soil = 1}),
  593. drop = "default:dirt",
  594. post_effect_color = {a=255, r=0, g=0, b=0},
  595. sounds = default.node_sound_dirt_defaults({
  596. footstep = {name = "default_grass_footstep", gain = 0.4},
  597. }),
  598. on_finish_collapse = function(pos, node)
  599. minetest.swap_node(pos, {name="default:dirt"})
  600. end,
  601. movement_speed_multiplier = default.SLOW_SPEED,
  602. })
  603. minetest.register_node("default:dark_dirt_with_coniferous_litter", {
  604. description = "Sterile Dirt With Acidic Litter",
  605. tiles = {
  606. "default_coniferous_litter.png",
  607. "darkage_darkdirt.png",
  608. {name = "darkage_darkdirt.png^default_coniferous_litter_side.png", tileable_vertical = false},
  609. },
  610. groups = utility.dig_groups("dirt", {dirt_type = 1, sterile_dirt_type = 1, non_raw_dirt_type = 1, leafy_dirt_type = 1, falling_node = 1}),
  611. drop = "darkage:darkdirt",
  612. post_effect_color = {a=255, r=0, g=0, b=0},
  613. sounds = default.node_sound_dirt_defaults({
  614. footstep = {name = "default_grass_footstep", gain = 0.4},
  615. }),
  616. on_finish_collapse = function(pos, node)
  617. minetest.swap_node(pos, {name="darkage:darkdirt"})
  618. end,
  619. movement_speed_multiplier = default.SLOW_SPEED,
  620. })
  621. minetest.register_node("default:dry_dirt_with_coniferous_litter", {
  622. description = "Dry Dirt With Acidic Litter",
  623. tiles = {
  624. "default_coniferous_litter.png",
  625. "default_dry_dirt.png",
  626. {name = "default_dry_dirt.png^default_coniferous_litter_side.png", tileable_vertical = false},
  627. },
  628. groups = utility.dig_groups("dirt", {dirt_type = 1, non_sterile_dirt_type = 1, non_raw_dirt_type = 1, leafy_dirt_type = 1, dry_dirt_type = 1, falling_node = 1}),
  629. drop = "default:dry_dirt",
  630. post_effect_color = {a=255, r=0, g=0, b=0},
  631. sounds = default.node_sound_dirt_defaults(),
  632. on_finish_collapse = function(pos, node)
  633. minetest.swap_node(pos, {name="default:dry_dirt"})
  634. end,
  635. movement_speed_multiplier = default.SLOW_SPEED,
  636. })
  637. minetest.register_node("default:dry_dirt", {
  638. description = "Dry Dirt",
  639. tiles = {"default_dry_dirt.png"},
  640. groups = utility.dig_groups("dirt", {dirt_type = 1, dry_dirt_type = 1, non_sterile_dirt_type = 1, raw_dirt_type = 1, falling_node = 1}),
  641. post_effect_color = {a=255, r=0, g=0, b=0},
  642. sounds = default.node_sound_dirt_defaults(),
  643. movement_speed_multiplier = default.SLOW_SPEED,
  644. })
  645. minetest.register_node("default:dry_dirt_with_dry_grass", {
  646. description = "Dry Dirt With Dry Grass",
  647. tiles = {
  648. "default_dry_grass.png",
  649. "default_dry_dirt.png",
  650. {name = "default_dry_dirt.png^default_dry_grass_side.png", tileable_vertical = false},
  651. },
  652. groups = utility.dig_groups("dirt", {dirt_type = 1, dry_dirt_type = 1, non_raw_dirt_type = 1, non_sterile_dirt_type = 1, grassy_dirt_type = 1, falling_node = 1}),
  653. drop = "default:dry_dirt",
  654. post_effect_color = {a=255, r=0, g=0, b=0},
  655. sounds = default.node_sound_dirt_defaults({
  656. footstep = {name = "default_grass_footstep", gain = 0.4},
  657. }),
  658. on_finish_collapse = function(pos, node)
  659. minetest.swap_node(pos, {name="default:dry_dirt"})
  660. end,
  661. movement_speed_multiplier = default.SLOW_SPEED,
  662. })
  663. minetest.register_node("default:permafrost", {
  664. description = "Permafrost",
  665. tiles = {"default_permafrost.png"},
  666. groups = utility.dig_groups("cobble", {permafrost_type = 1, falling_node = 1, cold = 1}),
  667. sounds = default.node_sound_dirt_defaults(),
  668. movement_speed_multiplier = default.SLOW_SPEED,
  669. })
  670. minetest.register_node("default:permafrost_with_snow", {
  671. description = "Permafrost With Snow",
  672. tiles = {
  673. "default_snow.png",
  674. "default_permafrost.png",
  675. {name = "default_permafrost.png^default_snow_side.png", tileable_vertical = false},
  676. },
  677. groups = utility.dig_groups("cobble", {permafrost_type = 1, falling_node = 1, cold = 1, snowy = 1}),
  678. sounds = default.node_sound_dirt_defaults(),
  679. movement_speed_multiplier = default.SLOW_SPEED,
  680. })
  681. minetest.register_node("default:permafrost_with_stones", {
  682. description = "Permafrost With Stones",
  683. tiles = {
  684. "default_permafrost.png^default_stones.png",
  685. "default_permafrost.png",
  686. "default_permafrost.png^default_stones_side.png",
  687. },
  688. groups = utility.dig_groups("cobble", {permafrost_type = 1, falling_node = 1, cold = 1}),
  689. sounds = default.node_sound_gravel_defaults(),
  690. movement_speed_multiplier = default.SLOW_SPEED,
  691. })
  692. minetest.register_node("default:permafrost_with_snow_and_stones", {
  693. description = "Permafrost With Snow And Stones",
  694. tiles = {
  695. "default_permafrost.png^default_snow.png^default_stones.png",
  696. "default_permafrost.png",
  697. "default_permafrost.png^default_snow_side.png^default_stones_side.png",
  698. },
  699. groups = utility.dig_groups("cobble", {permafrost_type = 1, falling_node = 1, cold = 1, snowy = 1}),
  700. sounds = default.node_sound_gravel_defaults(),
  701. movement_speed_multiplier = default.SLOW_SPEED,
  702. })
  703. minetest.register_node("default:permafrost_with_moss", {
  704. description = "Permafrost With Moss",
  705. tiles = {
  706. "default_moss.png",
  707. "default_permafrost.png",
  708. {name = "default_permafrost.png^default_moss_side.png", tileable_vertical = false},
  709. },
  710. drop = "default:permafrost",
  711. groups = utility.dig_groups("cobble", {permafrost_type = 1, falling_node = 1, cold = 1}),
  712. sounds = default.node_sound_dirt_defaults({
  713. footstep = {name = "default_grass_footstep", gain = 0.25},
  714. }),
  715. on_finish_collapse = function(pos, node)
  716. minetest.swap_node(pos, {name="default:permafrost"})
  717. end,
  718. movement_speed_multiplier = default.SLOW_SPEED,
  719. })
  720. minetest.register_node("default:permafrost_with_moss_and_stones", {
  721. description = "Permafrost With Moss And Stones",
  722. tiles = {
  723. "default_moss.png^default_stones.png",
  724. "default_permafrost.png",
  725. {name = "default_permafrost.png^default_moss_side.png^default_stones_side.png", tileable_vertical = false},
  726. },
  727. drop = "default:permafrost_with_stones",
  728. groups = utility.dig_groups("cobble", {permafrost_type = 1, falling_node = 1, cold = 1}),
  729. sounds = default.node_sound_dirt_defaults({
  730. footstep = {name = "default_grass_footstep", gain = 0.25},
  731. }),
  732. on_finish_collapse = function(pos, node)
  733. minetest.swap_node(pos, {name="default:permafrost_with_stones"})
  734. end,
  735. movement_speed_multiplier = default.SLOW_SPEED,
  736. })
  737. minetest.register_node("default:sand", {
  738. description = "Sand",
  739. tiles = {"default_sand.png"},
  740. groups = utility.dig_groups("sand", {falling_node = 1, sand = 1, fall_damage_add_percent = -20}),
  741. post_effect_color = {a=255, r=0, g=0, b=0},
  742. sounds = default.node_sound_sand_defaults(),
  743. movement_speed_multiplier = default.SLOW_SPEED,
  744. })
  745. minetest.register_node("default:desert_sand", {
  746. description = "Desert Sand",
  747. tiles = {"default_desert_sand.png"},
  748. groups = utility.dig_groups("sand", {falling_node = 1, sand = 1, fall_damage_add_percent = -20}),
  749. sounds = default.node_sound_sand_defaults(),
  750. movement_speed_multiplier = default.SLOW_SPEED,
  751. })
  752. minetest.register_node("default:gravel", {
  753. description = "Gravel",
  754. tiles = {"default_gravel.png"},
  755. groups = utility.dig_groups("gravel", {falling_node = 1, gravel = 1}),
  756. sounds = default.node_sound_gravel_defaults(),
  757. drop = {
  758. max_items = 1,
  759. items = {
  760. {items = {'default:flint'}, rarity = 16},
  761. {items = {'default:gravel'}}
  762. }
  763. },
  764. post_effect_color = {a=255, r=0, g=0, b=0},
  765. -- Gravel is a component of wisp nests in Jarkati.
  766. after_destruct = function(pos, oldnode)
  767. local a = vector_add(pos, {x=0, y=1, z=0})
  768. local n = minetest.get_node(a)
  769. if n.name == "pm:spawner" then
  770. minetest.remove_node(a)
  771. end
  772. end,
  773. })
  774. minetest.register_node("default:clay", {
  775. description = "Clay",
  776. tiles = {"default_clay.png"},
  777. groups = utility.dig_groups("clay"),
  778. drop = 'default:clay_lump 4',
  779. sounds = default.node_sound_dirt_defaults(),
  780. movement_speed_multiplier = default.SLOW_SPEED,
  781. })
  782. minetest.register_node("default:snowblock", {
  783. description = "Snow Block",
  784. tiles = {"default_snow.png"},
  785. groups = utility.dig_groups("sand", {
  786. puts_out_fire = 1,
  787. snow = 1,
  788. snowy = 1,
  789. cold = 1,
  790. falling_node = 1,
  791. melts = 1,
  792. fall_damage_add_percent = -20,
  793. -- Currently used to notify ice nodes.
  794. notify_construct = 1,
  795. want_notify = 1,
  796. }),
  797. movement_speed_multiplier = default.SLOW_SPEED,
  798. _melts_to = "default:water_flowing",
  799. --damage_per_second = 2,
  800. post_effect_color = {a=255, r=255, g=255, b=255},
  801. sounds = default.node_sound_snow_defaults(),
  802. -- Hack to notify self.
  803. on_construct = function(pos)
  804. minetest.get_node_timer(pos):start(math_random(ice.minmax_time()))
  805. end,
  806. on_notify = function(...)
  807. return ice.on_ice_notify(...)
  808. end,
  809. on_timer = function(pos, elapsed)
  810. if rc.ice_melts_at_pos(pos) then
  811. minetest.add_node(pos, {name="default:water_flowing"})
  812. return
  813. end
  814. return ice.on_ice_timer(pos, elapsed)
  815. end,
  816. })
  817. minetest.register_node("default:ice", {
  818. description = "Ice",
  819. tiles = {"default_ice.png"},
  820. is_ground_content = false,
  821. paramtype = "light",
  822. groups = utility.dig_groups("ice", {
  823. ice = 1,
  824. cold = 1,
  825. --puts_out_fire = 1,
  826. melts = 1,
  827. want_notify = 1,
  828. slippery = 3,
  829. }),
  830. _melts_to = "default:water_flowing",
  831. sounds = default.node_sound_glass_defaults(),
  832. movement_speed_multiplier = default.SLOW_SPEED_ICE,
  833. -- Common ice does not count toward tool's dig count.
  834. _toolranks = {
  835. ignore = true,
  836. },
  837. _no_auto_pop = true,
  838. -- Hack to notify self.
  839. on_construct = function(pos)
  840. minetest.get_node_timer(pos):start(math_random(ice.minmax_time()))
  841. end,
  842. on_notify = function(...)
  843. return ice.on_ice_notify(...)
  844. end,
  845. on_timer = function(pos, elapsed)
  846. if rc.ice_melts_at_pos(pos) then
  847. minetest.add_node(pos, {name="default:water_flowing"})
  848. return
  849. end
  850. return ice.on_ice_timer(pos, elapsed)
  851. end,
  852. })
  853. --
  854. -- Trees
  855. --
  856. --
  857. -- Ores
  858. --
  859. minetest.register_node("default:stone_with_coal", {
  860. description = "Coal Deposit",
  861. tiles = {"default_stone.png^default_mineral_coal.png"},
  862. -- Cannot be flammable (although I would like it to be)
  863. -- because that interferes with TNT mining (the TNT replaces
  864. -- all coal with flame instead of dropping it).
  865. groups = utility.dig_groups("mineral"),
  866. drop = 'default:coal_lump',
  867. silverpick_drop = true,
  868. sounds = default.node_sound_stone_defaults(),
  869. place_param2 = 10,
  870. -- Digging coal ore has a chance to release poison gas.
  871. after_dig_node = function(pos, oldnode, oldmetadata, digger)
  872. if pos.y < -1024 then
  873. if math_random(1, 300) == 1 then
  874. breath.spawn_gas(pos)
  875. end
  876. end
  877. end,
  878. })
  879. minetest.register_node("default:desert_stone_with_coal", {
  880. description = "Redstone Coal Deposit",
  881. tiles = {"default_desert_stone.png^default_mineral_coal2.png"},
  882. -- Cannot be flammable (although I would like it to be)
  883. -- because that interferes with TNT mining (the TNT replaces
  884. -- all coal with flame instead of dropping it).
  885. groups = utility.dig_groups("mineral"),
  886. drop = 'default:coal_lump',
  887. silverpick_drop = true,
  888. sounds = default.node_sound_stone_defaults(),
  889. place_param2 = 10,
  890. })
  891. minetest.register_node("default:coalblock", {
  892. description = "Coal Block",
  893. tiles = {"default_coal_block.png"},
  894. is_ground_content = false,
  895. groups = utility.dig_groups("cobble", {flammable = 3}),
  896. sounds = default.node_sound_stone_defaults(),
  897. })
  898. minetest.register_node("default:stone_with_iron", {
  899. description = "Iron Ore",
  900. tiles = {"default_stone.png^default_mineral_iron.png"},
  901. groups = utility.dig_groups("mineral", {ore = 1}),
  902. drop = 'default:iron_lump',
  903. silverpick_drop = true,
  904. sounds = default.node_sound_stone_defaults(),
  905. place_param2 = 10,
  906. })
  907. minetest.register_node("default:steelblock", {
  908. description = "Wrought Iron Block",
  909. tiles = {"default_steel_block.png"},
  910. is_ground_content = false,
  911. groups = utility.dig_groups("block", {conductor = 1, block = 1}),
  912. sounds = default.node_sound_metal_defaults(),
  913. })
  914. minetest.register_node("default:stone_with_copper", {
  915. description = "Copper Ore",
  916. tiles = {"default_stone.png^default_mineral_copper.png"},
  917. groups = utility.dig_groups("mineral", {ore = 1}),
  918. drop = 'default:copper_lump',
  919. silverpick_drop = true,
  920. sounds = default.node_sound_stone_defaults(),
  921. place_param2 = 10,
  922. })
  923. minetest.register_node("default:desert_stone_with_copper", {
  924. description = "Redstone Copper Ore",
  925. -- Use old copper image, the pattern looks nicer.
  926. tiles = {"default_desert_stone.png^default_mineral_copper2.png"},
  927. groups = utility.dig_groups("mineral", {ore = 1}),
  928. drop = 'default:copper_lump',
  929. silverpick_drop = true,
  930. sounds = default.node_sound_stone_defaults(),
  931. place_param2 = 10,
  932. })
  933. minetest.register_node("default:desert_stone_with_iron", {
  934. description = "Redstone Iron Ore",
  935. -- Use old iron image, the pattern looks nicer.
  936. tiles = {"default_desert_stone.png^default_mineral_iron2.png"},
  937. groups = utility.dig_groups("mineral", {ore = 1}),
  938. drop = 'default:iron_lump',
  939. silverpick_drop = true,
  940. sounds = default.node_sound_stone_defaults(),
  941. place_param2 = 10,
  942. })
  943. minetest.register_node("default:desert_stone_with_diamond", {
  944. description = "Redstone Diamond Deposit",
  945. -- Use old diamond image, the pattern looks nicer.
  946. tiles = {"default_desert_stone.png^default_mineral_diamond2.png"},
  947. groups = utility.dig_groups("hardmineral"),
  948. drop = 'default:diamond',
  949. silverpick_drop = true,
  950. sounds = default.node_sound_stone_defaults(),
  951. place_param2 = 10,
  952. })
  953. minetest.register_node("default:copperblock", {
  954. description = "Copper Block",
  955. tiles = {"default_copper_block.png"},
  956. is_ground_content = false,
  957. groups = utility.dig_groups("block", {conductor = 1, block = 1}),
  958. sounds = default.node_sound_metal_defaults(),
  959. })
  960. minetest.register_node("default:bronzeblock", {
  961. description = "Bronze Block",
  962. tiles = {"default_bronze_block.png"},
  963. is_ground_content = false,
  964. groups = utility.dig_groups("block", {conductor = 1, block = 1}),
  965. sounds = default.node_sound_metal_defaults(),
  966. })
  967. minetest.register_node("default:stone_with_mese", {
  968. description = "Mese Ore",
  969. tiles = {"default_stone.png^default_mineral_mese.png"},
  970. groups = utility.dig_groups("hardmineral", {melts = 1}),
  971. drop = "default:mese_crystal",
  972. silverpick_drop = true,
  973. sounds = default.node_sound_stone_defaults(),
  974. -- Mese in stone reacts badly to lava.
  975. on_melt = function(pos, other)
  976. minetest.after(0, function()
  977. tnt.boom(pos, {
  978. radius = 4,
  979. ignore_protection = false,
  980. ignore_on_blast = false,
  981. damage_radius = 6,
  982. disable_drops = true,
  983. })
  984. end)
  985. end,
  986. })
  987. minetest.register_node("default:mese", {
  988. description = "Mese Block",
  989. tiles = {"default_mese_block.png"},
  990. paramtype = "light",
  991. groups = utility.dig_groups("hardstone", {melts = 1}),
  992. sounds = default.node_sound_stone_defaults(),
  993. light_source = 3,
  994. -- Mese in stone reacts badly to lava.
  995. -- Meseblock makes a much larger blast.
  996. on_melt = function(pos, other)
  997. minetest.after(0, function()
  998. tnt.boom(pos, {
  999. radius = 10,
  1000. ignore_protection = false,
  1001. ignore_on_blast = false,
  1002. damage_radius = 20,
  1003. disable_drops = true,
  1004. })
  1005. end)
  1006. end,
  1007. })
  1008. minetest.register_node("default:stone_with_gold", {
  1009. description = "Gold Ore",
  1010. tiles = {"default_stone.png^default_mineral_gold.png"},
  1011. groups = utility.dig_groups("mineral", {ore = 1}),
  1012. drop = "default:gold_lump",
  1013. silverpick_drop = true,
  1014. sounds = default.node_sound_stone_defaults(),
  1015. place_param2 = 10,
  1016. })
  1017. minetest.register_node("default:goldblock", {
  1018. description = "Gold Block",
  1019. tiles = {"default_gold_block.png"},
  1020. is_ground_content = false,
  1021. groups = utility.dig_groups("block", {conductor = 1, block = 1}),
  1022. sounds = default.node_sound_metal_defaults(),
  1023. })
  1024. minetest.register_node("default:stone_with_diamond", {
  1025. description = "Diamond Deposit",
  1026. tiles = {"default_stone.png^default_mineral_diamond.png"},
  1027. -- Player has to get mese pick or similar before they can get diamond.
  1028. groups = utility.dig_groups("hardmineral"),
  1029. drop = "default:diamond",
  1030. silverpick_drop = true,
  1031. sounds = default.node_sound_stone_defaults(),
  1032. place_param2 = 10,
  1033. })
  1034. minetest.register_node("default:diamondblock", {
  1035. description = "Diamond Block",
  1036. tiles = {"default_diamond_block.png"},
  1037. is_ground_content = false,
  1038. groups = utility.dig_groups("obsidian"),
  1039. sounds = default.node_sound_stone_defaults(),
  1040. })
  1041. --
  1042. -- Plantlife (non-cubic)
  1043. --
  1044. do
  1045. local nodebox = {
  1046. -- Spine strips.
  1047. {0, 1, 1, 16, 15, 1},
  1048. {0, 1, 15, 16, 15, 15},
  1049. {1, 1, 0, 1, 15, 16},
  1050. {15, 1, 0, 15, 15, 16},
  1051. -- Meat.
  1052. {1, 0, 1, 15, 16, 15},
  1053. -- Side skin.
  1054. {4, 0, 0, 12, 16, 16},
  1055. {0, 0, 4, 16, 16, 12},
  1056. }
  1057. local selectionbox = {
  1058. {1, 0, 1, 15, 16, 15},
  1059. }
  1060. utility.transform_nodebox(nodebox)
  1061. utility.transform_nodebox(selectionbox)
  1062. minetest.register_node("default:cactus", {
  1063. description = "Cactus",
  1064. tiles = {
  1065. "default_cactus_top.png",
  1066. "default_cactus_top.png",
  1067. "default_cactus_side.png"
  1068. },
  1069. paramtype = "light",
  1070. drawtype = "nodebox",
  1071. node_box = {
  1072. type = "fixed",
  1073. fixed = nodebox,
  1074. },
  1075. selection_box = {
  1076. type = "fixed",
  1077. fixed = selectionbox,
  1078. },
  1079. paramtype2 = "facedir",
  1080. groups = utility.dig_groups("softwood", {flammable = 1, fall_damage_add_percent = 100}),
  1081. sounds = default.node_sound_wood_defaults(),
  1082. on_place = minetest.rotate_node,
  1083. damage_per_second = 1,
  1084. on_punch = function(pos, node, puncher, pt)
  1085. if not puncher or not puncher:is_player() then return end
  1086. local stack = puncher:get_wielded_item()
  1087. local name = stack:get_name() or ""
  1088. if not string.find(name, "axe") then
  1089. puncher:set_hp(puncher:get_hp() - 1)
  1090. end
  1091. end,
  1092. on_player_walk_over = function(pos, player)
  1093. player:set_hp(player:get_hp() - 1)
  1094. if player:get_hp() == 0 then
  1095. minetest.chat_send_all("# Server: <" .. rename.gpn(player:get_player_name()) .. "> stepped on cactus. Noob!")
  1096. end
  1097. end,
  1098. on_construct = function(...)
  1099. return cactus.on_construct(...)
  1100. end,
  1101. on_destruct = function(...)
  1102. return cactus.on_destruct(...)
  1103. end,
  1104. on_timer = function(...)
  1105. return cactus.on_timer(...)
  1106. end,
  1107. after_dig_node = function(...)
  1108. return cactus.after_dig_node(...)
  1109. end,
  1110. })
  1111. end
  1112. --[[
  1113. --= Tests of Tools Against Default Groups =--
  1114. result_of {snappy = 1, choppy = 3} + tool=default:axe_stone : digsound=success
  1115. result_of {snappy = 1, choppy = 3} + tool=default:axe_diamond : digsound=success
  1116. result_of {snappy = 1, choppy = 3} + tool=default:axe_steel : digsound=success
  1117. result_of {snappy = 1, choppy = 3} + tool=default:axe_mese : digsound=success
  1118. result_of {snappy = 1, choppy = 3} + tool=default:sword_steel : digsound=failure
  1119. result_of {snappy = 1, choppy = 3} + tool=default:sword_stone : digsound=N/A (could not dig)
  1120. result_of {snappy = 1, choppy = 3} + tool=default:sword_diamond : digsound=failure
  1121. result_of {snappy = 1, choppy = 3} + tool=default:sword_mese : digsound=failure
  1122. result_of {snappy = 1, choppy = 3} + tool=default:shovel_stone : digsound=N/A (could not dig)
  1123. result_of {snappy = 1, choppy = 3} + tool=default:shovel_steel : digsound=N/A (could not dig)
  1124. result_of {snappy = 1, choppy = 3} + tool=default:shovel_diamond : digsound=N/A (could not dig)
  1125. result_of {snappy = 1, choppy = 3} + tool=default:shovel_mese : digsound=N/A (could not dig)
  1126. result_of {snappy = 1, choppy = 3} + tool=default:pick_stone : digsound=N/A (could not dig)
  1127. result_of {snappy = 1, choppy = 3} + tool=default:pick_steel : digsound=N/A (could not dig)
  1128. result_of {snappy = 1, choppy = 3} + tool=default:pick_diamond : digsound=N/A (could not dig)
  1129. result_of {snappy = 1, choppy = 3} + tool=default:pick_mese : digsound=N/A (could not dig)
  1130. --= Tests of Tools Against Modified Groups (A) =--
  1131. result_of {snappy = 1, choppy = 3, cracky = 1} + tool=default:pick_stone : digsound=N/A (could not dig)
  1132. result_of {snappy = 1, choppy = 3, cracky = 1} + tool=default:pick_steel : digsound=success
  1133. result_of {snappy = 1, choppy = 3, cracky = 1} + tool=default:pick_diamond : digsound=success
  1134. result_of {snappy = 1, choppy = 3, cracky = 1} + tool=default:pick_mese : digsound=success
  1135. result_of {snappy = 1, choppy = 3, cracky = 1} + tool=default:axe_stone : digsound=success
  1136. result_of {snappy = 1, choppy = 3, cracky = 1} + tool=default:axe_steel : digsound=success
  1137. result_of {snappy = 1, choppy = 3, cracky = 1} + tool=default:axe_diamond : digsound=success
  1138. result_of {snappy = 1, choppy = 3, cracky = 1} + tool=default:axe_mese : digsound=success
  1139. result_of {snappy = 1, choppy = 3, cracky = 1} + tool=default:shovel_stone : digsound=N/A (could not dig)
  1140. result_of {snappy = 1, choppy = 3, cracky = 1} + tool=default:shovel_steel : digsound=N/A (could not dig)
  1141. result_of {snappy = 1, choppy = 3, cracky = 1} + tool=default:shovel_diamond : digsound=N/A (could not dig)
  1142. result_of {snappy = 1, choppy = 3, cracky = 1} + tool=default:shovel_mese : digsound=N/A (could not dig)
  1143. result_of {snappy = 1, choppy = 3, cracky = 1} + tool=default:sword_stone : digsound=N/A (could not dig)
  1144. result_of {snappy = 1, choppy = 3, cracky = 1} + tool=default:sword_steel : digsound=failure
  1145. result_of {snappy = 1, choppy = 3, cracky = 1} + tool=default:sword_diamond : digsound=failure
  1146. result_of {snappy = 1, choppy = 3, cracky = 1} + tool=default:sword_mese : digsound=failure
  1147. --= Tests of Tools Against Modified Groups (B) =--
  1148. result_of {snappy = 1, choppy = 3, cracky = 1, crumbly = 1} + tool=default:pick_stone : digsound=N/A (could not dig)
  1149. result_of {snappy = 1, choppy = 3, cracky = 1, crumbly = 1} + tool=default:pick_steel : digsound=success
  1150. result_of {snappy = 1, choppy = 3, cracky = 1, crumbly = 1} + tool=default:pick_diamond : digsound=success
  1151. result_of {snappy = 1, choppy = 3, cracky = 1, crumbly = 1} + tool=default:pick_mese : digsound=success
  1152. result_of {snappy = 1, choppy = 3, cracky = 1, crumbly = 1} + tool=default:axe_stone : digsound=success
  1153. result_of {snappy = 1, choppy = 3, cracky = 1, crumbly = 1} + tool=default:axe_steel : digsound=success
  1154. result_of {snappy = 1, choppy = 3, cracky = 1, crumbly = 1} + tool=default:axe_diamond : digsound=success
  1155. result_of {snappy = 1, choppy = 3, cracky = 1, crumbly = 1} + tool=default:axe_mese : digsound=success
  1156. result_of {snappy = 1, choppy = 3, cracky = 1, crumbly = 1} + tool=default:shovel_stone : digsound=success
  1157. result_of {snappy = 1, choppy = 3, cracky = 1, crumbly = 1} + tool=default:shovel_steel : digsound=success
  1158. result_of {snappy = 1, choppy = 3, cracky = 1, crumbly = 1} + tool=default:shovel_diamond : digsound=success
  1159. result_of {snappy = 1, choppy = 3, cracky = 1, crumbly = 1} + tool=default:shovel_mese : digsound=success
  1160. result_of {snappy = 1, choppy = 3, cracky = 1, crumbly = 1} + tool=default:sword_stone : digsound=N/A (could not dig)
  1161. result_of {snappy = 1, choppy = 3, cracky = 1, crumbly = 1} + tool=default:sword_steel : digsound=failure
  1162. result_of {snappy = 1, choppy = 3, cracky = 1, crumbly = 1} + tool=default:sword_diamond : digsound=failure
  1163. result_of {snappy = 1, choppy = 3, cracky = 1, crumbly = 1} + tool=default:sword_mese : digsound=failure
  1164. --= Tests of Swords Against Modified Groups (C) =--
  1165. result_of {snappy = 1} + tool=default:sword_stone : digsound=N/A (could not dig)
  1166. result_of {snappy = 1} + tool=default:sword_steel : digsound=failure
  1167. result_of {snappy = 1} + tool=default:sword_diamond : digsound=failure
  1168. result_of {snappy = 1} + tool=default:sword_mese : digsound=failure
  1169. --]]
  1170. minetest.register_node("default:papyrus", {
  1171. description = "Papyrus",
  1172. drawtype = "plantlike",
  1173. tiles = {"default_papyrus.png"},
  1174. inventory_image = "default_papyrus.png",
  1175. wield_image = "default_papyrus.png",
  1176. paramtype = "light",
  1177. sunlight_propagates = true,
  1178. walkable = false,
  1179. selection_box = {
  1180. type = "fixed",
  1181. fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
  1182. },
  1183. groups = utility.dig_groups("plant", {flammable = 2}),
  1184. sounds = default.node_sound_leaves_defaults(),
  1185. movement_speed_multiplier = default.SLOW_SPEED_PLANTS,
  1186. on_construct = function(...)
  1187. return papyrus.on_construct(...)
  1188. end,
  1189. on_destruct = function(...)
  1190. return papyrus.on_destruct(...)
  1191. end,
  1192. on_timer = function(...)
  1193. return papyrus.on_timer(...)
  1194. end,
  1195. after_dig_node = function(...)
  1196. return papyrus.after_dig_node(...)
  1197. end,
  1198. })
  1199. minetest.register_node("default:dry_shrub", {
  1200. description = "Dry Shrub",
  1201. drawtype = "plantlike",
  1202. waving = 1,
  1203. tiles = {"default_dry_shrub.png"},
  1204. inventory_image = "default_dry_shrub.png",
  1205. wield_image = "default_dry_shrub.png",
  1206. paramtype = "light",
  1207. sunlight_propagates = true,
  1208. walkable = false,
  1209. buildable_to = true,
  1210. groups = utility.dig_groups("plant", {
  1211. flammable = 3, attached_node = 1, dry_grass = 1, dry_shrub = 1,
  1212. }),
  1213. sounds = default.node_sound_leaves_defaults(),
  1214. selection_box = {
  1215. type = "fixed",
  1216. fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
  1217. },
  1218. movement_speed_multiplier = default.SLOW_SPEED_PLANTS,
  1219. -- Drop 1 or 2 sticks.
  1220. drop = {
  1221. max_items = 1,
  1222. items = {
  1223. {items = {'default:stick 2'}, rarity = 2},
  1224. {items = {'default:stick'}},
  1225. }
  1226. },
  1227. shears_drop = true,
  1228. flowerpot_drop = "default:dry_shrub",
  1229. })
  1230. minetest.register_node("default:dry_shrub2", {
  1231. description = "Dead Bush",
  1232. drawtype = "plantlike",
  1233. waving = 1,
  1234. tiles = {"default_dry_shrub2.png"},
  1235. inventory_image = "default_dry_shrub2.png",
  1236. wield_image = "default_dry_shrub2.png",
  1237. paramtype = "light",
  1238. paramtype2 = "meshoptions",
  1239. place_param2 = 4,
  1240. sunlight_propagates = true,
  1241. walkable = false,
  1242. buildable_to = true,
  1243. groups = utility.dig_groups("plant", {
  1244. flammable = 3, attached_node = 1, dry_grass = 1, dry_shrub = 1,
  1245. }),
  1246. sounds = default.node_sound_leaves_defaults(),
  1247. selection_box = {
  1248. type = "fixed",
  1249. fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, 4 / 16, 6 / 16},
  1250. },
  1251. movement_speed_multiplier = default.SLOW_SPEED_PLANTS,
  1252. drop = {
  1253. max_items = 1,
  1254. items = {
  1255. {items = {'default:stick 2'}, rarity = 2},
  1256. {items = {'default:stick'}},
  1257. }
  1258. },
  1259. shears_drop = true,
  1260. flowerpot_drop = "default:dry_shrub2",
  1261. })
  1262. minetest.register_node("default:junglegrass", {
  1263. description = "Jungle Grass",
  1264. drawtype = "plantlike",
  1265. waving = 1,
  1266. visual_scale = 1.69,
  1267. tiles = {"default_junglegrass.png"},
  1268. inventory_image = "default_junglegrass.png",
  1269. wield_image = "default_junglegrass.png",
  1270. paramtype = "light",
  1271. paramtype2 = "meshoptions",
  1272. place_param2 = 2,
  1273. sunlight_propagates = true,
  1274. walkable = false,
  1275. buildable_to = true,
  1276. -- Default drops are defined in farming mod.
  1277. flowerpot_drop = "default:junglegrass",
  1278. groups = utility.dig_groups("plant", {flora = 1, attached_node = 1, grass = 1, junglegrass = 1, flammable = 1}),
  1279. sounds = default.node_sound_leaves_defaults(),
  1280. selection_box = {
  1281. type = "fixed",
  1282. fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
  1283. },
  1284. movement_speed_multiplier = default.SLOW_SPEED_PLANTS,
  1285. on_construct = function(...)
  1286. return flowers.on_flora_construct(...)
  1287. end,
  1288. on_destruct = function(...)
  1289. return flowers.on_flora_destruct(...)
  1290. end,
  1291. on_timer = function(...)
  1292. return flowers.on_flora_timer(...)
  1293. end,
  1294. on_punch = function(...)
  1295. return flowers.on_flora_punch(...)
  1296. end,
  1297. })
  1298. minetest.register_node("default:coarsegrass", {
  1299. description = "Coarse Grass",
  1300. drawtype = "plantlike",
  1301. waving = 1,
  1302. tiles = {"default_junglegrass_newstyle.png"},
  1303. inventory_image = "default_junglegrass_newstyle.png",
  1304. wield_image = "default_junglegrass_newstyle.png",
  1305. paramtype = "light",
  1306. paramtype2 = "meshoptions",
  1307. place_param2 = 2,
  1308. sunlight_propagates = true,
  1309. walkable = false,
  1310. buildable_to = true,
  1311. drop = "default:stick",
  1312. shears_drop = true,
  1313. flowerpot_drop = "default:coarsegrass",
  1314. groups = utility.dig_groups("plant", {flora = 1, attached_node = 1, grass = 1, junglegrass = 1, flammable = 1}),
  1315. sounds = default.node_sound_leaves_defaults(),
  1316. selection_box = {
  1317. type = "fixed",
  1318. fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
  1319. },
  1320. movement_speed_multiplier = default.SLOW_SPEED_PLANTS,
  1321. on_construct = function(...)
  1322. return flowers.on_flora_construct(...)
  1323. end,
  1324. on_destruct = function(...)
  1325. return flowers.on_flora_destruct(...)
  1326. end,
  1327. on_timer = function(...)
  1328. return flowers.on_flora_timer(...)
  1329. end,
  1330. on_punch = function(...)
  1331. return flowers.on_flora_punch(...)
  1332. end,
  1333. })
  1334. -- This node is not meant to be placed in the world.
  1335. -- Instead, placing it causes 1 of several other nodetypes to be placed instead.
  1336. minetest.register_node("default:grass_dummy", {
  1337. description = "Wild Grass\n\nA common field plant, sometimes containing seeds.\nCan be hung upside down like some herbs.",
  1338. drawtype = "plantlike",
  1339. waving = 1,
  1340. tiles = {"default_grass_1.png"},
  1341. -- Use texture of a taller grass stage in inventory
  1342. inventory_image = "default_grass_3.png",
  1343. wield_image = "default_grass_3.png",
  1344. paramtype = "light",
  1345. paramtype2 = "meshoptions",
  1346. place_param2 = 2,
  1347. sounds = default.node_sound_leaves_defaults(),
  1348. movement_speed_multiplier = default.SLOW_SPEED_PLANTS,
  1349. flowerpot_insert = {"default:grass_1", "default:grass_2", "default:grass_3", "default:grass_4", "default:grass_5"},
  1350. -- Zero-width selection box.
  1351. selection_box = {
  1352. type = "fixed",
  1353. fixed = {-0.5, -0.5, -0.5, 0.5, -0.5, 0.5},
  1354. },
  1355. on_place = function(itemstack, placer, pt)
  1356. -- place a random grass node
  1357. -- If pointing to the ceiling place hanging grass.
  1358. --minetest.chat_send_all(dump(pt))
  1359. if pt.type == "node" then
  1360. --minetest.chat_send_all("1: " .. minetest.pos_to_string(pt.under) .. ".")
  1361. --minetest.chat_send_all("2: " .. minetest.pos_to_string(pt.above) .. ".")
  1362. if pt.under.y-1 == pt.above.y then
  1363. --minetest.chat_send_all("hanging!")
  1364. local stack = ItemStack("default:grass_" .. math_random(1,5) .. "_hanging")
  1365. local ret = minetest.item_place(stack, placer, pt)
  1366. return ItemStack("default:grass_dummy " .. itemstack:get_count() - (1 - ret:get_count()))
  1367. end
  1368. end
  1369. local stack = ItemStack("default:grass_" .. math_random(1,5))
  1370. local ret = minetest.item_place(stack, placer, pt)
  1371. return ItemStack("default:grass_dummy " .. itemstack:get_count() - (1 - ret:get_count()))
  1372. end,
  1373. })
  1374. for i = 1, 5 do
  1375. minetest.register_node("default:grass_" .. i, {
  1376. description = "Grass",
  1377. drawtype = "plantlike",
  1378. waving = 1,
  1379. tiles = {"default_grass_" .. i .. ".png"},
  1380. inventory_image = "default_grass_3.png",
  1381. wield_image = "default_grass_3.png",
  1382. paramtype = "light",
  1383. paramtype2 = "meshoptions",
  1384. place_param2 = 2,
  1385. sunlight_propagates = true,
  1386. walkable = false,
  1387. buildable_to = true,
  1388. -- Default drops are defined in farming mod.
  1389. flowerpot_drop = "default:grass_dummy",
  1390. groups = utility.dig_groups("plant", {flora = 1, attached_node = 1, not_in_creative_inventory = 1, grass = 1, flammable = 1}),
  1391. sounds = default.node_sound_leaves_defaults(),
  1392. selection_box = {
  1393. type = "fixed",
  1394. fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
  1395. },
  1396. movement_speed_multiplier = default.SLOW_SPEED_PLANTS,
  1397. on_construct = function(...)
  1398. return flowers.on_flora_construct(...)
  1399. end,
  1400. on_destruct = function(...)
  1401. return flowers.on_flora_destruct(...)
  1402. end,
  1403. on_timer = function(...)
  1404. return flowers.on_flora_timer(...)
  1405. end,
  1406. on_punch = function(...)
  1407. return flowers.on_flora_punch(...)
  1408. end,
  1409. })
  1410. end
  1411. for i = 1, 5 do
  1412. minetest.register_node("default:grass_" .. i .. "_hanging", {
  1413. description = "Hanging Grass",
  1414. drawtype = "plantlike",
  1415. -- Waving hanging nodes look ugly.
  1416. --waving = 1,
  1417. tiles = {"default_grass_" .. i .. ".png^[transformFY"},
  1418. inventory_image = "default_grass_3.png",
  1419. wield_image = "default_grass_3.png",
  1420. paramtype = "light",
  1421. paramtype2 = "meshoptions",
  1422. place_param2 = 2,
  1423. sunlight_propagates = true,
  1424. walkable = false,
  1425. buildable_to = true,
  1426. -- Default drops are defined in farming mod.
  1427. flowerpot_drop = "default:grass_dummy",
  1428. groups = utility.dig_groups("plant", {hanging_node = 1, not_in_creative_inventory = 1, grass = 1, flammable = 1}),
  1429. sounds = default.node_sound_leaves_defaults(),
  1430. selection_box = {
  1431. type = "fixed",
  1432. fixed = {-0.5, 0.5, -0.5, 0.5, 5/16, 0.5},
  1433. },
  1434. movement_speed_multiplier = default.SLOW_SPEED_PLANTS,
  1435. })
  1436. end
  1437. minetest.register_node("default:dry_grass_dummy", {
  1438. description = "Dry Grass",
  1439. drawtype = "plantlike",
  1440. waving = 1,
  1441. tiles = {"default_dry_grass_1.png"},
  1442. inventory_image = "default_dry_grass_3.png",
  1443. wield_image = "default_dry_grass_3.png",
  1444. paramtype = "light",
  1445. paramtype2 = "meshoptions",
  1446. place_param2 = 2,
  1447. sounds = default.node_sound_leaves_defaults(),
  1448. movement_speed_multiplier = default.SLOW_SPEED_PLANTS,
  1449. flowerpot_insert = {"default:dry_grass_1", "default:dry_grass_2", "default:dry_grass_3", "default:dry_grass_4", "default:dry_grass_5"},
  1450. -- Zero-width selection box.
  1451. selection_box = {
  1452. type = "fixed",
  1453. fixed = {-0.5, -0.5, -0.5, 0.5, -0.5, 0.5},
  1454. },
  1455. on_place = function(itemstack, placer, pt)
  1456. -- place a random dry grass node
  1457. -- If pointing to the ceiling place hanging grass.
  1458. --minetest.chat_send_all(dump(pt))
  1459. if pt.type == "node" then
  1460. --minetest.chat_send_all("1: " .. minetest.pos_to_string(pt.under) .. ".")
  1461. --minetest.chat_send_all("2: " .. minetest.pos_to_string(pt.above) .. ".")
  1462. if pt.under.y-1 == pt.above.y then
  1463. --minetest.chat_send_all("hanging!")
  1464. local stack = ItemStack("default:dry_grass_" .. math_random(1,5) .. "_hanging")
  1465. local ret = minetest.item_place(stack, placer, pt)
  1466. return ItemStack("default:dry_grass_dummy " .. itemstack:get_count() - (1 - ret:get_count()))
  1467. end
  1468. end
  1469. local stack = ItemStack("default:dry_grass_" .. math_random(1, 5))
  1470. local ret = minetest.item_place(stack, placer, pt)
  1471. return ItemStack("default:dry_grass_dummy " .. itemstack:get_count() - (1 - ret:get_count()))
  1472. end,
  1473. })
  1474. for i = 1, 5 do
  1475. minetest.register_node("default:dry_grass_" .. i, {
  1476. description = "Dry Grass",
  1477. drawtype = "plantlike",
  1478. waving = 1,
  1479. tiles = {"default_dry_grass_" .. i .. ".png"},
  1480. inventory_image = "default_dry_grass_3.png",
  1481. wield_image = "default_dry_grass_3.png",
  1482. paramtype = "light",
  1483. paramtype2 = "meshoptions",
  1484. place_param2 = 2,
  1485. sunlight_propagates = true,
  1486. walkable = false,
  1487. buildable_to = true,
  1488. groups = utility.dig_groups("plant", {flammable = 3, flora = 1, attached_node = 1,
  1489. not_in_creative_inventory=1, dry_grass = 1}),
  1490. drop = "",
  1491. shears_drop = "default:dry_grass_dummy",
  1492. flowerpot_drop = "default:dry_grass_dummy",
  1493. sounds = default.node_sound_leaves_defaults(),
  1494. selection_box = {
  1495. type = "fixed",
  1496. fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
  1497. },
  1498. movement_speed_multiplier = default.SLOW_SPEED_PLANTS,
  1499. on_construct = function(...)
  1500. return flowers.on_flora_construct(...)
  1501. end,
  1502. on_destruct = function(...)
  1503. return flowers.on_flora_destruct(...)
  1504. end,
  1505. on_timer = function(...)
  1506. return flowers.on_flora_timer(...)
  1507. end,
  1508. on_punch = function(...)
  1509. return flowers.on_flora_punch(...)
  1510. end,
  1511. })
  1512. end
  1513. for i = 1, 5 do
  1514. minetest.register_node("default:dry_grass_" .. i .. "_hanging", {
  1515. description = "Dry Grass",
  1516. drawtype = "plantlike",
  1517. -- Waving hanging grass looks silly.
  1518. --waving = 1,
  1519. tiles = {"default_dry_grass_" .. i .. ".png^[transformFY"},
  1520. inventory_image = "default_dry_grass_3.png",
  1521. wield_image = "default_dry_grass_3.png",
  1522. paramtype = "light",
  1523. paramtype2 = "meshoptions",
  1524. place_param2 = 2,
  1525. sunlight_propagates = true,
  1526. walkable = false,
  1527. buildable_to = true,
  1528. -- Not in flora group, since it does not need to spread.
  1529. groups = utility.dig_groups("plant", {flammable = 3, hanging_node = 1,
  1530. not_in_creative_inventory=1, dry_grass = 1}),
  1531. drop = "",
  1532. shears_drop = "default:dry_grass_dummy",
  1533. flowerpot_drop = "default:dry_grass_dummy",
  1534. sounds = default.node_sound_leaves_defaults(),
  1535. selection_box = {
  1536. type = "fixed",
  1537. fixed = {-0.5, 0.5, -0.5, 0.5, 5/16, 0.5},
  1538. },
  1539. movement_speed_multiplier = default.SLOW_SPEED_PLANTS,
  1540. })
  1541. end
  1542. minetest.register_node("default:dry_grass2_dummy", {
  1543. description = "Dry Grass",
  1544. drawtype = "plantlike",
  1545. waving = 1,
  1546. tiles = {"default_dry_grass2_1.png"},
  1547. inventory_image = "default_dry_grass2_3.png",
  1548. wield_image = "default_dry_grass2_3.png",
  1549. paramtype = "light",
  1550. paramtype2 = "meshoptions",
  1551. place_param2 = 2,
  1552. sounds = default.node_sound_leaves_defaults(),
  1553. movement_speed_multiplier = default.SLOW_SPEED_PLANTS,
  1554. flowerpot_insert = {"default:dry_grass2_1", "default:dry_grass2_2", "default:dry_grass2_3", "default:dry_grass2_4", "default:dry_grass2_5"},
  1555. -- Zero-width selection box.
  1556. selection_box = {
  1557. type = "fixed",
  1558. fixed = {-0.5, -0.5, -0.5, 0.5, -0.5, 0.5},
  1559. },
  1560. on_place = function(itemstack, placer, pt)
  1561. -- place a random dry grass node
  1562. -- If pointing to the ceiling place hanging grass.
  1563. --minetest.chat_send_all(dump(pt))
  1564. if pt.type == "node" then
  1565. --minetest.chat_send_all("1: " .. minetest.pos_to_string(pt.under) .. ".")
  1566. --minetest.chat_send_all("2: " .. minetest.pos_to_string(pt.above) .. ".")
  1567. if pt.under.y-1 == pt.above.y then
  1568. --minetest.chat_send_all("hanging!")
  1569. local stack = ItemStack("default:dry_grass2_" .. math_random(1,5) .. "_hanging")
  1570. local ret = minetest.item_place(stack, placer, pt)
  1571. return ItemStack("default:dry_grass2_dummy " .. itemstack:get_count() - (1 - ret:get_count()))
  1572. end
  1573. end
  1574. local stack = ItemStack("default:dry_grass2_" .. math_random(1, 5))
  1575. local ret = minetest.item_place(stack, placer, pt)
  1576. return ItemStack("default:dry_grass2_dummy " .. itemstack:get_count() - (1 - ret:get_count()))
  1577. end,
  1578. })
  1579. for i = 1, 5 do
  1580. minetest.register_node("default:dry_grass2_" .. i, {
  1581. description = "Dry Grass",
  1582. drawtype = "plantlike",
  1583. waving = 1,
  1584. tiles = {"default_dry_grass2_" .. i .. ".png"},
  1585. inventory_image = "default_dry_grass2_3.png",
  1586. wield_image = "default_dry_grass2_3.png",
  1587. paramtype = "light",
  1588. paramtype2 = "meshoptions",
  1589. place_param2 = 2,
  1590. sunlight_propagates = true,
  1591. walkable = false,
  1592. buildable_to = true,
  1593. groups = utility.dig_groups("plant", {flammable = 3, flora = 1, attached_node = 1,
  1594. not_in_creative_inventory=1, dry_grass = 1}),
  1595. drop = "",
  1596. shears_drop = "default:dry_grass2_dummy",
  1597. flowerpot_drop = "default:dry_grass2_dummy",
  1598. sounds = default.node_sound_leaves_defaults(),
  1599. selection_box = {
  1600. type = "fixed",
  1601. fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
  1602. },
  1603. movement_speed_multiplier = default.SLOW_SPEED_PLANTS,
  1604. on_construct = function(...)
  1605. return flowers.on_flora_construct(...)
  1606. end,
  1607. on_destruct = function(...)
  1608. return flowers.on_flora_destruct(...)
  1609. end,
  1610. on_timer = function(...)
  1611. return flowers.on_flora_timer(...)
  1612. end,
  1613. on_punch = function(...)
  1614. return flowers.on_flora_punch(...)
  1615. end,
  1616. })
  1617. end
  1618. for i = 1, 5 do
  1619. minetest.register_node("default:dry_grass2_" .. i .. "_hanging", {
  1620. description = "Dry Grass",
  1621. drawtype = "plantlike",
  1622. -- Waving hanging grass looks silly.
  1623. --waving = 1,
  1624. tiles = {"default_dry_grass2_" .. i .. ".png^[transformFY"},
  1625. inventory_image = "default_dry_grass2_3.png",
  1626. wield_image = "default_dry_grass2_3.png",
  1627. paramtype = "light",
  1628. paramtype2 = "meshoptions",
  1629. place_param2 = 2,
  1630. sunlight_propagates = true,
  1631. walkable = false,
  1632. buildable_to = true,
  1633. -- Not in flora group, since it does not need to spread.
  1634. groups = utility.dig_groups("plant", {flammable = 3, hanging_node = 1,
  1635. not_in_creative_inventory=1, dry_grass = 1}),
  1636. drop = "",
  1637. shears_drop = "default:dry_grass2_dummy",
  1638. flowerpot_drop = "default:dry_grass2_dummy",
  1639. sounds = default.node_sound_leaves_defaults(),
  1640. selection_box = {
  1641. type = "fixed",
  1642. fixed = {-0.5, 0.5, -0.5, 0.5, 5/16, 0.5},
  1643. },
  1644. movement_speed_multiplier = default.SLOW_SPEED_PLANTS,
  1645. })
  1646. end
  1647. --
  1648. -- Liquids
  1649. --
  1650. minetest.register_node("default:water_source", {
  1651. description = "Water Source",
  1652. drawtype = "liquid",
  1653. tiles = {
  1654. {
  1655. name = "default_water_source_animated.png",
  1656. animation = {
  1657. type = "vertical_frames",
  1658. aspect_w = 16,
  1659. aspect_h = 16,
  1660. length = 2.0,
  1661. },
  1662. },
  1663. },
  1664. special_tiles = {
  1665. -- New-style water source material (mostly unused)
  1666. {
  1667. name = "default_water_source_animated.png",
  1668. animation = {
  1669. type = "vertical_frames",
  1670. aspect_w = 16,
  1671. aspect_h = 16,
  1672. length = 2.0,
  1673. },
  1674. backface_culling = false,
  1675. },
  1676. },
  1677. alpha = 160,
  1678. paramtype = "light",
  1679. walkable = false,
  1680. pointable = false,
  1681. diggable = false,
  1682. buildable_to = true,
  1683. is_ground_content = false,
  1684. drop = "",
  1685. drowning = 4,
  1686. liquidtype = "source",
  1687. liquid_alternative_flowing = "default:water_flowing",
  1688. liquid_alternative_source = "default:water_source",
  1689. liquid_viscosity = 1,
  1690. post_effect_color = {a = 103, r = 30, g = 60, b = 90},
  1691. groups = {water = 3, liquid = 3, puts_out_fire = 1},
  1692. sounds = default.node_sound_water_defaults(),
  1693. -- Water turns to fire in the nether.
  1694. -- Note: this is not called if water-source is created by the engine due to liquid-flow mechanic.
  1695. on_construct = function(pos)
  1696. farming.notify_soil(pos)
  1697. if minetest.find_node_near(pos, 10, "griefer:grieferstone") then
  1698. minetest.add_node(pos, {name="fire:basic_flame"})
  1699. return
  1700. end
  1701. if rc.current_realm_at_pos(pos) == "channelwood" then
  1702. minetest.swap_node(pos, {name="cw:water_source"})
  1703. return
  1704. end
  1705. if pos.y < -25000 then
  1706. minetest.add_node(pos, {name="fire:basic_flame"})
  1707. end
  1708. end,
  1709. on_destruct = function(pos)
  1710. farming.notify_soil(pos)
  1711. end,
  1712. on_collapse_to_entity = function(pos, node)
  1713. -- Do not allow player to obtain the node itself.
  1714. end,
  1715. })
  1716. minetest.register_node("default:water_flowing", {
  1717. description = "Flowing Water",
  1718. drawtype = "flowingliquid",
  1719. tiles = {"default_water.png"},
  1720. special_tiles = {
  1721. {
  1722. name = "default_water_flowing_animated.png",
  1723. backface_culling = false,
  1724. animation = {
  1725. type = "vertical_frames",
  1726. aspect_w = 16,
  1727. aspect_h = 16,
  1728. length = 0.8,
  1729. },
  1730. },
  1731. {
  1732. name = "default_water_flowing_animated.png",
  1733. backface_culling = true,
  1734. animation = {
  1735. type = "vertical_frames",
  1736. aspect_w = 16,
  1737. aspect_h = 16,
  1738. length = 0.8,
  1739. },
  1740. },
  1741. },
  1742. alpha = 160,
  1743. paramtype = "light",
  1744. paramtype2 = "flowingliquid",
  1745. walkable = false,
  1746. pointable = false,
  1747. diggable = false,
  1748. buildable_to = true,
  1749. is_ground_content = false,
  1750. drop = "",
  1751. drowning = 4,
  1752. liquidtype = "flowing",
  1753. liquid_alternative_flowing = "default:water_flowing",
  1754. liquid_alternative_source = "default:water_source",
  1755. liquid_viscosity = 1,
  1756. post_effect_color = {a = 103, r = 30, g = 60, b = 90},
  1757. groups = {water = 3, liquid = 3, puts_out_fire = 1, not_in_creative_inventory = 1},
  1758. sounds = default.node_sound_water_defaults(),
  1759. on_collapse_to_entity = function(pos, node)
  1760. -- Do not allow player to obtain the node itself.
  1761. end,
  1762. on_construct = function(pos)
  1763. if minetest.find_node_near(pos, 10, "griefer:grieferstone") then
  1764. minetest.add_node(pos, {name="fire:basic_flame"})
  1765. return
  1766. end
  1767. if rc.current_realm_at_pos(pos) == "channelwood" then
  1768. minetest.swap_node(pos, {name="cw:water_flowing"})
  1769. return
  1770. end
  1771. if pos.y < -25000 then
  1772. minetest.add_node(pos, {name="fire:basic_flame"})
  1773. end
  1774. end,
  1775. })
  1776. minetest.register_node("default:river_water_source", {
  1777. description = "Salt Water Source",
  1778. drawtype = "liquid",
  1779. tiles = {
  1780. {
  1781. name = "default_river_water_source_animated.png",
  1782. animation = {
  1783. type = "vertical_frames",
  1784. aspect_w = 16,
  1785. aspect_h = 16,
  1786. length = 2.0,
  1787. },
  1788. },
  1789. },
  1790. special_tiles = {
  1791. {
  1792. name = "default_river_water_source_animated.png",
  1793. animation = {
  1794. type = "vertical_frames",
  1795. aspect_w = 16,
  1796. aspect_h = 16,
  1797. length = 2.0,
  1798. },
  1799. backface_culling = false,
  1800. },
  1801. },
  1802. alpha = 160,
  1803. paramtype = "light",
  1804. walkable = false,
  1805. pointable = false,
  1806. diggable = false,
  1807. buildable_to = true,
  1808. is_ground_content = false,
  1809. drop = "",
  1810. drowning = 4,
  1811. liquidtype = "source",
  1812. liquid_alternative_flowing = "default:river_water_flowing",
  1813. liquid_alternative_source = "default:river_water_source",
  1814. liquid_viscosity = 1,
  1815. -- River water can be placed above ground, so liquid must NOT be renewable!
  1816. liquid_renewable = false,
  1817. liquid_range = 2,
  1818. post_effect_color = {a = 103, r = 30, g = 76, b = 90},
  1819. groups = {water = 3, liquid = 3, puts_out_fire = 1},
  1820. sounds = default.node_sound_water_defaults(),
  1821. -- Water turns to fire in the nether.
  1822. -- Note: this is not called if water-source is created by the engine due to liquid-flow mechanic.
  1823. on_construct = function(pos)
  1824. farming.notify_soil(pos)
  1825. if minetest.find_node_near(pos, 10, "griefer:grieferstone") then
  1826. minetest.add_node(pos, {name="fire:basic_flame"})
  1827. return
  1828. end
  1829. if pos.y < -25000 then
  1830. minetest.add_node(pos, {name="fire:basic_flame"})
  1831. end
  1832. end,
  1833. on_destruct = function(pos)
  1834. farming.notify_soil(pos)
  1835. end,
  1836. on_collapse_to_entity = function(pos, node)
  1837. -- Do not allow player to obtain the node itself.
  1838. end,
  1839. })
  1840. minetest.register_node("default:river_water_flowing", {
  1841. description = "Flowing Salt Water",
  1842. drawtype = "flowingliquid",
  1843. tiles = {"default_river_water.png"},
  1844. special_tiles = {
  1845. {
  1846. name = "default_river_water_flowing_animated.png",
  1847. backface_culling = false,
  1848. animation = {
  1849. type = "vertical_frames",
  1850. aspect_w = 16,
  1851. aspect_h = 16,
  1852. length = 0.8,
  1853. },
  1854. },
  1855. {
  1856. name = "default_river_water_flowing_animated.png",
  1857. backface_culling = true,
  1858. animation = {
  1859. type = "vertical_frames",
  1860. aspect_w = 16,
  1861. aspect_h = 16,
  1862. length = 0.8,
  1863. },
  1864. },
  1865. },
  1866. alpha = 160,
  1867. paramtype = "light",
  1868. paramtype2 = "flowingliquid",
  1869. walkable = false,
  1870. pointable = false,
  1871. diggable = false,
  1872. buildable_to = true,
  1873. is_ground_content = false,
  1874. drop = "",
  1875. drowning = 4,
  1876. liquidtype = "flowing",
  1877. liquid_alternative_flowing = "default:river_water_flowing",
  1878. liquid_alternative_source = "default:river_water_source",
  1879. liquid_viscosity = 1,
  1880. -- River water can be placed above ground, so liquid must NOT be renewable!
  1881. liquid_renewable = false,
  1882. liquid_range = 2,
  1883. post_effect_color = {a = 103, r = 30, g = 76, b = 90},
  1884. groups = {water = 3, liquid = 3, puts_out_fire = 1, not_in_creative_inventory = 1},
  1885. sounds = default.node_sound_water_defaults(),
  1886. on_collapse_to_entity = function(pos, node)
  1887. -- Do not allow player to obtain the node itself.
  1888. end,
  1889. on_construct = function(pos)
  1890. if minetest.find_node_near(pos, 10, "griefer:grieferstone") then
  1891. minetest.set_node(pos, {name="fire:basic_flame"})
  1892. return
  1893. end
  1894. if pos.y < -25000 then
  1895. minetest.set_node(pos, {name="fire:basic_flame"})
  1896. end
  1897. end,
  1898. })
  1899. --
  1900. -- Tools / "Advanced" crafting / Non-"natural"
  1901. --
  1902. minetest.register_node("default:ladder_wood", {
  1903. description = "Wooden Ladder",
  1904. drawtype = "signlike",
  1905. tiles = {"default_ladder_wood.png"},
  1906. inventory_image = "default_ladder_wood.png",
  1907. wield_image = "default_ladder_wood.png",
  1908. paramtype = "light",
  1909. paramtype2 = "wallmounted",
  1910. sunlight_propagates = true,
  1911. walkable = false,
  1912. climbable = true,
  1913. is_ground_content = false,
  1914. selection_box = {
  1915. type = "wallmounted",
  1916. --wall_top = = <default>
  1917. --wall_bottom = = <default>
  1918. --wall_side = = <default>
  1919. },
  1920. groups = utility.dig_groups("bigitem", {flammable = 2, ladder=1}),
  1921. legacy_wallmounted = true,
  1922. sounds = default.node_sound_wood_defaults(),
  1923. -- Lava burns wood ladders instantly.
  1924. -- Water rots wood (instantly too, I guess).
  1925. -- Gameplay rational: make it important to use trapdoors, etc. to block flow.
  1926. floodable = true,
  1927. })
  1928. minetest.register_node("default:ladder_steel", {
  1929. description = "Wrought Iron Ladder",
  1930. drawtype = "signlike",
  1931. tiles = {"default_ladder_steel.png"},
  1932. inventory_image = "default_ladder_steel.png",
  1933. wield_image = "default_ladder_steel.png",
  1934. paramtype = "light",
  1935. paramtype2 = "wallmounted",
  1936. sunlight_propagates = true,
  1937. walkable = false,
  1938. climbable = true,
  1939. is_ground_content = false,
  1940. selection_box = {
  1941. type = "wallmounted",
  1942. --wall_top = = <default>
  1943. --wall_bottom = = <default>
  1944. --wall_side = = <default>
  1945. },
  1946. groups = utility.dig_groups("bigitem", {ladder=1}),
  1947. sounds = default.node_sound_metal_defaults(),
  1948. -- Lava melts metal ladders quickly.
  1949. -- Water rusts them (quickly too, I guess).
  1950. -- Gameplay rational: make it important to use trapdoors, etc. to block flow.
  1951. floodable = true,
  1952. })
  1953. minetest.register_node(":defauIt:ladder_wood", {
  1954. description = "Wooden Trap Ladder",
  1955. drawtype = "signlike",
  1956. tiles = {"default_ladder_wood.png"},
  1957. inventory_image = "default_ladder_wood.png",
  1958. wield_image = "default_ladder_wood.png",
  1959. paramtype = "light",
  1960. paramtype2 = "wallmounted",
  1961. sunlight_propagates = true,
  1962. walkable = false,
  1963. climbable = false, -- Player drops through.
  1964. is_ground_content = false,
  1965. selection_box = {
  1966. type = "wallmounted",
  1967. --wall_top = = <default>
  1968. --wall_bottom = = <default>
  1969. --wall_side = = <default>
  1970. },
  1971. groups = utility.dig_groups("bigitem", {flammable = 2}),
  1972. sounds = default.node_sound_wood_defaults(),
  1973. -- Lava burns wood ladders instantly.
  1974. -- Water rots wood (instantly too, I guess).
  1975. -- Gameplay rational: make it important to use trapdoors, etc. to block flow.
  1976. floodable = true,
  1977. })
  1978. minetest.register_node(":defauIt:ladder_steel", {
  1979. description = "Wrought Iron Trap Ladder",
  1980. drawtype = "signlike",
  1981. tiles = {"default_ladder_steel.png"},
  1982. inventory_image = "default_ladder_steel.png",
  1983. wield_image = "default_ladder_steel.png",
  1984. paramtype = "light",
  1985. paramtype2 = "wallmounted",
  1986. sunlight_propagates = true,
  1987. walkable = false,
  1988. climbable = false, -- Player drops through.
  1989. is_ground_content = false,
  1990. selection_box = {
  1991. type = "wallmounted",
  1992. --wall_top = = <default>
  1993. --wall_bottom = = <default>
  1994. --wall_side = = <default>
  1995. },
  1996. groups = utility.dig_groups("bigitem"),
  1997. sounds = default.node_sound_metal_defaults(),
  1998. -- Lava melts metal ladders quickly.
  1999. -- Water rusts them (quickly too, I guess).
  2000. -- Gameplay rational: make it important to use trapdoors, etc. to block flow.
  2001. floodable = true,
  2002. })
  2003. default.register_fence("default:fence_iron", {
  2004. description = "Wrought Iron Fence",
  2005. texture = "default_fence_iron.png",
  2006. inventory_image = "default_fence_overlay.png^default_fence_iron.png^default_fence_overlay.png^[makealpha:255,126,126",
  2007. wield_image = "default_fence_overlay.png^default_fence_iron.png^default_fence_overlay.png^[makealpha:255,126,126",
  2008. material = "default:steel_ingot",
  2009. groups = utility.dig_groups("fence_metal", {fence = 1}),
  2010. sounds = default.node_sound_metal_defaults()
  2011. })
  2012. default.register_fence("default:fence_bronze", {
  2013. description = "Bronze Fence",
  2014. texture = "default_fence_bronze.png",
  2015. inventory_image = "default_fence_overlay.png^default_fence_bronze.png^default_fence_overlay.png^[makealpha:255,126,126",
  2016. wield_image = "default_fence_overlay.png^default_fence_bronze.png^default_fence_overlay.png^[makealpha:255,126,126",
  2017. material = "default:bronze_ingot",
  2018. groups = utility.dig_groups("fence_metal", {fence = 1}),
  2019. sounds = default.node_sound_metal_defaults()
  2020. })
  2021. default.register_fence("default:fence_wood", {
  2022. description = "Wooden Fence",
  2023. texture = "default_fence_wood.png",
  2024. inventory_image = "default_fence_overlay.png^default_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
  2025. wield_image = "default_fence_overlay.png^default_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
  2026. material = "default:wood",
  2027. groups = utility.dig_groups("fence_wood", {flammable = 2, fence = 1}),
  2028. sounds = default.node_sound_wood_defaults()
  2029. })
  2030. default.register_fence("default:fence_acacia_wood", {
  2031. description = "Acacia Wood Fence",
  2032. texture = "default_fence_acacia_wood.png",
  2033. inventory_image = "default_fence_overlay.png^default_acacia_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
  2034. wield_image = "default_fence_overlay.png^default_acacia_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
  2035. material = "default:acacia_wood",
  2036. groups = utility.dig_groups("fence_wood", {flammable = 2, fence = 1}),
  2037. sounds = default.node_sound_wood_defaults()
  2038. })
  2039. default.register_fence("default:fence_junglewood", {
  2040. description = "Jungle Wood Fence",
  2041. texture = "default_fence_junglewood.png",
  2042. inventory_image = "default_fence_overlay.png^default_junglewood.png^default_fence_overlay.png^[makealpha:255,126,126",
  2043. wield_image = "default_fence_overlay.png^default_junglewood.png^default_fence_overlay.png^[makealpha:255,126,126",
  2044. material = "default:junglewood",
  2045. groups = utility.dig_groups("fence_wood", {flammable = 2, fence = 1}),
  2046. sounds = default.node_sound_wood_defaults()
  2047. })
  2048. default.register_fence("default:fence_pine_wood", {
  2049. description = "Pine Wood Fence",
  2050. texture = "default_fence_pine_wood.png",
  2051. inventory_image = "default_fence_overlay.png^default_pine_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
  2052. wield_image = "default_fence_overlay.png^default_pine_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
  2053. material = "default:pine_wood",
  2054. groups = utility.dig_groups("fence_wood", {flammable = 2, fence = 1}),
  2055. sounds = default.node_sound_wood_defaults()
  2056. })
  2057. default.register_fence("default:fence_aspen_wood", {
  2058. description = "Aspen Wood Fence",
  2059. texture = "default_fence_aspen_wood.png",
  2060. inventory_image = "default_fence_overlay.png^default_aspen_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
  2061. wield_image = "default_fence_overlay.png^default_aspen_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
  2062. material = "default:aspen_wood",
  2063. groups = utility.dig_groups("fence_wood", {flammable = 2, fence = 1}),
  2064. sounds = default.node_sound_wood_defaults()
  2065. })
  2066. minetest.register_node("default:glass", {
  2067. description = "Glass",
  2068. drawtype = "glasslike_framed_optional",
  2069. tiles = {"default_glass.png", "default_glass_detail.png"},
  2070. paramtype = "light",
  2071. sunlight_propagates = true,
  2072. is_ground_content = false,
  2073. groups = utility.dig_groups("glass", {glass=1}),
  2074. sounds = default.node_sound_glass_defaults(),
  2075. drop = "vessels:glass_fragments",
  2076. silverpick_drop = true,
  2077. })
  2078. minetest.register_node("default:obsidian_glass", {
  2079. description = "Obsidian Glass",
  2080. drawtype = "glasslike_framed_optional",
  2081. tiles = {"default_obsidian_glass.png", "default_obsidian_glass_detail.png"},
  2082. paramtype = "light",
  2083. is_ground_content = false,
  2084. sunlight_propagates = true,
  2085. sounds = default.node_sound_glass_defaults(),
  2086. groups = utility.dig_groups("glass", {glass=1}),
  2087. drop = "default:obsidian_shard",
  2088. silverpick_drop = true,
  2089. })
  2090. minetest.register_node("default:brick", {
  2091. description = "Brick Block",
  2092. paramtype2 = "facedir",
  2093. place_param2 = 0,
  2094. tiles = {"default_brick.png"},
  2095. is_ground_content = false,
  2096. groups = utility.dig_groups("brick", {brick = 1}),
  2097. sounds = default.node_sound_stone_defaults(),
  2098. })
  2099. minetest.register_node("default:meselamp", {
  2100. description = "Mese Lamp",
  2101. drawtype = "glasslike",
  2102. tiles = {"default_meselamp.png"},
  2103. paramtype = "light",
  2104. sunlight_propagates = true,
  2105. is_ground_content = false,
  2106. groups = utility.dig_groups("glass"),
  2107. sounds = default.node_sound_glass_defaults(),
  2108. light_source = default.LIGHT_MAX-1,
  2109. })
  2110. minetest.register_node("default:lightbox", {
  2111. description = "Light Box",
  2112. drawtype = "glasslike",
  2113. tiles = {"default_lightbox.png"},
  2114. paramtype = "light",
  2115. sunlight_propagates = true,
  2116. is_ground_content = false,
  2117. groups = utility.dig_groups("glass"),
  2118. sounds = default.node_sound_glass_defaults(),
  2119. light_source = default.LIGHT_MAX - 2,
  2120. })