nodes.lua 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524
  1. --glowing crystal
  2. minetest.register_node('caverealms:glow_crystal', {
  3. description = 'Glow Sapphire',
  4. tiles = {'caverealms_glow_crystal.png'},
  5. is_ground_content = true,
  6. groups = {cracky=3},
  7. sounds = default.node_sound_glass_defaults(),
  8. light_source = 13,
  9. paramtype = 'light',
  10. use_texture_alpha = 'blend',
  11. drawtype = 'glasslike',
  12. sunlight_propagates = true,
  13. })
  14. --glowing emerald
  15. minetest.register_node('caverealms:glow_emerald', {
  16. description = 'Glow Emerald',
  17. tiles = {'caverealms_glow_emerald.png'},
  18. is_ground_content = true,
  19. groups = {cracky=3},
  20. sounds = default.node_sound_glass_defaults(),
  21. light_source = 13,
  22. paramtype = 'light',
  23. use_texture_alpha = 'blend',
  24. drawtype = 'glasslike',
  25. sunlight_propagates = true,
  26. })
  27. --glowing mese crystal blocks
  28. minetest.register_node('caverealms:glow_mese', {
  29. description = 'Glow Mese Crystal',
  30. tiles = {'caverealms_glow_mese.png'},
  31. is_ground_content = true,
  32. groups = {cracky=3},
  33. sounds = default.node_sound_glass_defaults(),
  34. light_source = 13,
  35. paramtype = 'light',
  36. use_texture_alpha = 'blend',
  37. drawtype = 'glasslike',
  38. sunlight_propagates = true,
  39. })
  40. --glowing ruby
  41. minetest.register_node('caverealms:glow_ruby', {
  42. description = 'Glow Ruby',
  43. tiles = {'caverealms_glow_ruby.png'},
  44. is_ground_content = true,
  45. groups = {cracky=3},
  46. sounds = default.node_sound_glass_defaults(),
  47. light_source = 13,
  48. paramtype = 'light',
  49. use_texture_alpha = 'blend',
  50. drawtype = 'glasslike',
  51. sunlight_propagates = true,
  52. })
  53. --glowing amethyst
  54. minetest.register_node('caverealms:glow_amethyst', {
  55. description = 'Glow Amethyst',
  56. tiles = {'caverealms_glow_amethyst.png'},
  57. is_ground_content = true,
  58. groups = {cracky=3},
  59. sounds = default.node_sound_glass_defaults(),
  60. light_source = 13,
  61. paramtype = 'light',
  62. use_texture_alpha = 'blend',
  63. drawtype = 'glasslike',
  64. sunlight_propagates = true,
  65. })
  66. --embedded crystal
  67. minetest.register_node('caverealms:glow_ore', {
  68. description = 'Glow Crystal Ore',
  69. tiles = {'caverealms_glow_ore.png'},
  70. is_ground_content = true,
  71. groups = {cracky=2},
  72. sounds = default.node_sound_glass_defaults(),
  73. light_source = 10,
  74. paramtype = 'light',
  75. })
  76. --embedded emerald
  77. minetest.register_node('caverealms:glow_emerald_ore', {
  78. description = 'Glow Emerald Ore',
  79. tiles = {'caverealms_glow_emerald_ore.png'},
  80. is_ground_content = true,
  81. groups = {cracky=2},
  82. sounds = default.node_sound_glass_defaults(),
  83. light_source = 10,
  84. paramtype = 'light',
  85. })
  86. --embedded ruby
  87. minetest.register_node('caverealms:glow_ruby_ore', {
  88. description = 'Glow Ruby Ore',
  89. tiles = {'caverealms_glow_ruby_ore.png'},
  90. is_ground_content = true,
  91. groups = {cracky=2},
  92. sounds = default.node_sound_glass_defaults(),
  93. light_source = 10,
  94. paramtype = 'light',
  95. })
  96. --embedded amethyst
  97. minetest.register_node('caverealms:glow_amethyst_ore', {
  98. description = 'Glow Amethyst Ore',
  99. tiles = {'caverealms_glow_amethyst_ore.png'},
  100. is_ground_content = true,
  101. groups = {cracky=2},
  102. sounds = default.node_sound_glass_defaults(),
  103. light_source = 10,
  104. paramtype = 'light',
  105. })
  106. --thin (transparent) ice
  107. minetest.register_node('caverealms:thin_ice', {
  108. description = 'Thin Ice',
  109. tiles = {'caverealms_thin_ice.png'},
  110. is_ground_content = true,
  111. groups = {cracky=3},
  112. sounds = default.node_sound_glass_defaults(),
  113. use_texture_alpha = 'blend',
  114. drawtype = 'glasslike',
  115. sunlight_propagates = true,
  116. freezemelt = 'default:water_source',
  117. paramtype = 'light',
  118. })
  119. --salt crystal
  120. minetest.register_node('caverealms:salt_crystal', {
  121. description = 'Salt Crystal',
  122. tiles = {'caverealms_salt_crystal.png'},
  123. is_ground_content = true,
  124. groups = {cracky=2},
  125. sounds = default.node_sound_glass_defaults(),
  126. light_source = 11,
  127. paramtype = 'light',
  128. use_texture_alpha = 'blend',
  129. drawtype = 'glasslike',
  130. sunlight_propagates = true,
  131. })
  132. --glowing crystal gem
  133. minetest.register_node('caverealms:glow_gem', {
  134. description = 'Glow Gem',
  135. tiles = {'caverealms_glow_gem.png'},
  136. inventory_image = 'caverealms_glow_gem.png',
  137. wield_image = 'caverealms_glow_gem.png',
  138. is_ground_content = true,
  139. groups = {cracky = 3, oddly_breakable_by_hand = 1, attached_node = 1},
  140. sounds = default.node_sound_glass_defaults(),
  141. light_source = 11,
  142. paramtype = 'light',
  143. drawtype = 'plantlike',
  144. walkable = false,
  145. buildable_to = true,
  146. visual_scale = 0.75,
  147. selection_box = {
  148. type = 'fixed',
  149. fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
  150. }
  151. })
  152. --glowing salt gem
  153. minetest.register_node('caverealms:salt_gem', {
  154. description = 'Salt Gem',
  155. tiles = {'caverealms_salt_gem.png'},
  156. inventory_image = 'caverealms_salt_gem.png',
  157. wield_image = 'caverealms_salt_gem.png',
  158. is_ground_content = true,
  159. groups = {cracky = 3, oddly_breakable_by_hand = 1, attached_node = 1},
  160. sounds = default.node_sound_glass_defaults(),
  161. light_source = 11,
  162. paramtype = 'light',
  163. drawtype = 'plantlike',
  164. walkable = false,
  165. buildable_to = true,
  166. visual_scale = 0.75,
  167. selection_box = {
  168. type = 'fixed',
  169. fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
  170. }
  171. })
  172. --stone spike
  173. minetest.register_node('caverealms:spike', {
  174. description = 'Stone Spike',
  175. tiles = {'caverealms_spike.png'},
  176. inventory_image = 'caverealms_spike.png',
  177. wield_image = 'caverealms_spike.png',
  178. is_ground_content = true,
  179. groups = {cracky = 3, oddly_breakable_by_hand = 1, attached_node = 1},
  180. sounds = default.node_sound_stone_defaults(),
  181. light_source = 3,
  182. paramtype = 'light',
  183. drawtype = 'plantlike',
  184. walkable = false,
  185. buildable_to = true,
  186. visual_scale = 0.75,
  187. selection_box = {
  188. type = 'fixed',
  189. fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
  190. }
  191. })
  192. --upward pointing icicle
  193. minetest.register_node('caverealms:icicle_up', {
  194. description = 'Icicle',
  195. tiles = {'caverealms_icicle_up.png'},
  196. inventory_image = 'caverealms_icicle_up.png',
  197. wield_image = 'caverealms_icicle_up.png',
  198. is_ground_content = true,
  199. groups = {cracky=3, oddly_breakable_by_hand=1},
  200. sounds = default.node_sound_glass_defaults(),
  201. light_source = 8,
  202. paramtype = 'light',
  203. drawtype = 'plantlike',
  204. walkable = false,
  205. buildable_to = true,
  206. visual_scale = 1.0,
  207. selection_box = {
  208. type = 'fixed',
  209. fixed = {-0.5, -0.5, -0.5, 0.5, -7/16, 0.5},
  210. },
  211. })
  212. --downward pointing icicle
  213. minetest.register_node('caverealms:icicle_down', {
  214. description = 'Icicle',
  215. tiles = {'caverealms_icicle_down.png'},
  216. inventory_image = 'caverealms_icicle_down.png',
  217. wield_image = 'caverealms_icicle_down.png',
  218. is_ground_content = true,
  219. groups = {cracky=3, oddly_breakable_by_hand=1},
  220. sounds = default.node_sound_glass_defaults(),
  221. light_source = 8,
  222. paramtype = 'light',
  223. drawtype = 'plantlike',
  224. walkable = false,
  225. buildable_to = true,
  226. visual_scale = 1.0,
  227. selection_box = {
  228. type = 'fixed',
  229. fixed = {-0.5, 7/16, -0.5, 0.5, 0.5, 0.5},
  230. },
  231. })
  232. --cave mossy cobble - bluish?
  233. minetest.register_node('caverealms:stone_with_moss', {
  234. description = 'Cave Stone with Moss',
  235. tiles = {'default_cobble.png^caverealms_moss.png', 'default_cobble.png', 'default_cobble.png^caverealms_moss_side.png'},
  236. is_ground_content = true,
  237. groups = {crumbly=1, cracky=3},
  238. drop = 'default:cobble',
  239. sounds = default.node_sound_dirt_defaults({
  240. footstep = {name='default_grass_footstep', gain=0.25},
  241. }),
  242. })
  243. --cave lichen-covered cobble - purple-ish
  244. minetest.register_node('caverealms:stone_with_lichen', {
  245. description = 'Cave Stone with Lichen',
  246. tiles = {'default_cobble.png^caverealms_lichen.png', 'default_cobble.png', 'default_cobble.png^caverealms_lichen_side.png'},
  247. is_ground_content = true,
  248. groups = {crumbly=1, cracky=3},
  249. drop = 'default:cobble',
  250. sounds = default.node_sound_dirt_defaults({
  251. footstep = {name='default_grass_footstep', gain=0.25},
  252. }),
  253. })
  254. --cave algae-covered cobble - yellow-ish
  255. minetest.register_node('caverealms:stone_with_algae', {
  256. description = 'Cave Stone with Algae',
  257. tiles = {'default_cobble.png^caverealms_algae.png', 'default_cobble.png', 'default_cobble.png^caverealms_algae_side.png'},
  258. is_ground_content = true,
  259. groups = {crumbly=1, cracky=3},
  260. drop = 'default:cobble',
  261. sounds = default.node_sound_dirt_defaults({
  262. footstep = {name='default_grass_footstep', gain=0.25},
  263. }),
  264. })
  265. --tiny-salt-crystal-covered cobble - pink-ish
  266. minetest.register_node('caverealms:stone_with_salt', {
  267. description = 'Salt Crystal',
  268. tiles = {'caverealms_salty2.png'},
  269. light_source = 9,
  270. paramtype = 'light',
  271. use_texture_alpha = 'blend',
  272. drawtype = 'glasslike',
  273. sunlight_propagates = true,
  274. is_ground_content = true,
  275. groups = {cracky=3},
  276. sounds = default.node_sound_glass_defaults(),
  277. })
  278. --Hot Cobble - cobble with lava instead of mortar XD
  279. minetest.register_node('caverealms:hot_cobble', {
  280. description = 'Hot Cobble',
  281. tiles = {'caverealms_hot_cobble.png'},
  282. is_ground_content = true,
  283. groups = {cracky=1, hot=1, unbreakable = 1},
  284. damage_per_second = 1,
  285. light_source = 3,
  286. paramtype = 'light',
  287. sounds = default.node_sound_stone_defaults({
  288. footstep = {name='default_stone_footstep', gain=0.25},
  289. }),
  290. })
  291. --Glow Obsidian
  292. minetest.register_node('caverealms:glow_obsidian', {
  293. description = 'Glowing Obsidian',
  294. tiles = {'caverealms_glow_obsidian.png'},
  295. is_ground_content = true,
  296. groups = {cracky=1, level=2},
  297. light_source = 7,
  298. paramtype = 'light',
  299. sounds = default.node_sound_stone_defaults({
  300. footstep = {name='default_stone_footstep', gain=0.25},
  301. }),
  302. })
  303. --Glow Obsidian 2 - has traces of lava
  304. minetest.register_node('caverealms:glow_obsidian_2', {
  305. description = 'Hot Glowing Obsidian',
  306. tiles = {'caverealms_glow_obsidian2.png'},
  307. is_ground_content = true,
  308. groups = {cracky=1, hot=1, level=2},
  309. light_source = 9,
  310. paramtype = 'light',
  311. sounds = default.node_sound_stone_defaults({
  312. footstep = {name='default_stone_footstep', gain=0.25},
  313. }),
  314. })
  315. --Glow Obsidian Bricks
  316. minetest.register_node('caverealms:glow_obsidian_brick', {
  317. description = 'Glow Obsidian Brick',
  318. tiles = {'caverealms_glow_obsidian_brick.png'},
  319. light_source = 7,
  320. groups = {cracky = 1, level = 2},
  321. sounds = default.node_sound_stone_defaults(),
  322. })
  323. minetest.register_node('caverealms:glow_obsidian_brick_2', {
  324. description = 'Glow Obsidian Brick',
  325. tiles = {'caverealms_glow_obsidian_brick_2.png'},
  326. light_source = 9,
  327. groups = {cracky = 1, level = 2},
  328. sounds = default.node_sound_stone_defaults(),
  329. })
  330. --Glow Obsidian Stairs/Slabs
  331. stairs.register_stair_and_slab(
  332. 'glow_obsidian_brick',
  333. 'caverealms:glow_obsidian_brick',
  334. {cracky = 1, level = 2},
  335. {'caverealms_glow_obsidian_brick.png'},
  336. 'Glow Obsidian Brick Stair',
  337. 'Glow Obsidian Brick Slab',
  338. default.node_sound_stone_defaults())
  339. stairs.register_stair_and_slab(
  340. 'glow_obsidian_brick_2',
  341. 'caverealms:glow_obsidian_brick_2',
  342. {cracky = 1, level = 2},
  343. {'caverealms_glow_obsidian_brick_2.png'},
  344. 'Glow Obsidian Brick Stair',
  345. 'Glow Obsidian Brick Slab',
  346. default.node_sound_stone_defaults())
  347. --Glow Obsidian Glass
  348. minetest.register_node('caverealms:glow_obsidian_glass', {
  349. description = 'Glow Obsidian Glass',
  350. drawtype = 'glasslike_framed_optional',
  351. tiles = {'caverealms_glow_obsidian_glass.png', 'default_obsidian_glass_detail.png'},
  352. paramtype = 'light',
  353. light_source = 13,
  354. sunlight_propagates = true,
  355. groups = {cracky = 3},
  356. sounds = default.node_sound_glass_defaults(),
  357. })
  358. --Coal Dust
  359. minetest.register_node('caverealms:coal_dust', {
  360. description = 'Coal Dust',
  361. tiles = {'caverealms_coal_dust.png'},
  362. is_ground_content = true,
  363. groups = {crumbly=3, falling_node=1, sand=1},
  364. sounds = default.node_sound_sand_defaults(),
  365. })
  366. --glow worms
  367. minetest.register_node('caverealms:glow_worm', {
  368. description = 'Blue Glow Worms',
  369. tiles = {'caverealms_glow_worm.png'},
  370. inventory_image = 'caverealms_glow_worm.png',
  371. wield_image = 'caverealms_glow_worm.png',
  372. is_ground_content = true,
  373. groups = {oddly_breakable_by_hand=3},
  374. light_source = 9,
  375. paramtype = 'light',
  376. drawtype = 'plantlike',
  377. walkable = false,
  378. buildable_to = true,
  379. visual_scale = 1.0,
  380. selection_box = {
  381. type = 'fixed',
  382. fixed = {-1/6, -1/2, -1/6, 1/6, 1/2, 1/6},
  383. },
  384. })
  385. minetest.register_node('caverealms:glow_worm_green', {
  386. description = 'Green Glow Worms',
  387. tiles = {'caverealms_glow_worm_green.png'},
  388. inventory_image = 'caverealms_glow_worm_green.png',
  389. wield_image = 'caverealms_glow_worm_green.png',
  390. is_ground_content = true,
  391. groups = {oddly_breakable_by_hand=3},
  392. light_source = 9,
  393. paramtype = 'light',
  394. drawtype = 'plantlike',
  395. walkable = false,
  396. buildable_to = true,
  397. visual_scale = 1.0,
  398. selection_box = {
  399. type = 'fixed',
  400. fixed = {-1/6, -1/2, -1/6, 1/6, 1/2, 1/6},
  401. },
  402. })
  403. minetest.register_node('caverealms:fire_vine', {
  404. _doc_items_longdesc = 'A highly invasive species, that should not be planted.',
  405. description = 'Fire Vine',
  406. tiles = {'caverealms_fire_vine.png'},
  407. inventory_image = 'caverealms_fire_vine.png',
  408. wield_image = 'caverealms_fire_vine.png',
  409. is_ground_content = true,
  410. damage_per_second = 1,
  411. groups = {oddly_breakable_by_hand=3, snappy = 3},
  412. light_source = 9,
  413. paramtype = 'light',
  414. drawtype = 'plantlike',
  415. walkable = false,
  416. buildable_to = true,
  417. visual_scale = 1.0,
  418. climbable = true,
  419. selection_box = {
  420. type = 'fixed',
  421. fixed = {-1/6, -1/2, -1/6, 1/6, 1/2, 1/6},
  422. },
  423. })
  424. --define special flame so that it does not expire
  425. minetest.register_node('caverealms:constant_flame', {
  426. description = 'Fire',
  427. drawtype = 'plantlike',
  428. tiles = {{
  429. name='fire_basic_flame_animated.png',
  430. animation={type='vertical_frames', aspect_w=16, aspect_h=16, length=1},
  431. }},
  432. inventory_image = 'fire_basic_flame.png',
  433. light_source = 14,
  434. groups = {igniter=2, dig_immediate=3, hot=3, not_in_creative_inventory=1},
  435. paramtype = 'light',
  436. drop = '',
  437. walkable = false,
  438. buildable_to = true,
  439. damage_per_second = 4,
  440. })
  441. --dungeon master statue (nodebox)
  442. minetest.register_node('caverealms:dm_statue', {
  443. description = 'Dungeon Master Statue',
  444. tiles = {
  445. 'caverealms_dm_stone.png',
  446. 'caverealms_dm_stone.png',
  447. 'caverealms_dm_stone.png',
  448. 'caverealms_dm_stone.png',
  449. 'caverealms_dm_stone.png',
  450. 'caverealms_stone_eyes.png'
  451. },
  452. drawtype = 'nodebox',
  453. paramtype = 'light',
  454. paramtype2 = 'facedir',
  455. groups = {cracky=2},
  456. node_box = {
  457. type = 'fixed',
  458. fixed = {
  459. {-0.4375, -0.5, -0.4375, 0.4375, -0.3125, 0.4375}, -- NodeBox1
  460. {-0.25, -0.125, -0.1875, 0.25, 0.5, 0.1875}, -- NodeBox2
  461. {-0.375, 0, -0.125, -0.25, 0.4375, 0.125}, -- NodeBox3
  462. {0.25, 0.125, -0.4375, 0.375, 0.375, 0.1875}, -- NodeBox4
  463. {-0.25, -0.5, -0.125, -0.125, -0.125, 0.125}, -- NodeBox5
  464. {0.125, -0.3125, -0.125, 0.25, 0, 0.125}, -- NodeBox6
  465. }
  466. },
  467. selection_box = {
  468. type = 'regular'
  469. }
  470. })
  471. -- Compatibility
  472. minetest.register_alias("caverealms:hanging_thin_ice", "caverealms:thin_ice")
  473. minetest.register_alias("caverealms:spike_2", "caverealms:spike")
  474. minetest.register_alias("caverealms:spike_3", "caverealms:spike")
  475. minetest.register_alias("caverealms:spike_4", "caverealms:spike")
  476. minetest.register_alias("caverealms:spike_5", "caverealms:spike")
  477. minetest.register_alias("caverealms:salt_gem_2", "caverealms:salt_gem")
  478. minetest.register_alias("caverealms:salt_gem_3", "caverealms:salt_gem")
  479. minetest.register_alias("caverealms:salt_gem_4", "caverealms:salt_gem")
  480. minetest.register_alias("caverealms:salt_gem_5", "caverealms:salt_gem")
  481. minetest.register_alias("caverealms:glow_gem_2", "caverealms:glow_gem")
  482. minetest.register_alias("caverealms:glow_gem_3", "caverealms:glow_gem")
  483. minetest.register_alias("caverealms:glow_gem_4", "caverealms:glow_gem")
  484. minetest.register_alias("caverealms:glow_gem_5", "caverealms:glow_gem")