nodes.lua 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531
  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, puts_out_fire = 1, cools_lava = 1, slippery = 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. damage_per_second = 1,
  203. paramtype = "light",
  204. drawtype = "plantlike",
  205. walkable = false,
  206. buildable_to = true,
  207. visual_scale = 1.0,
  208. selection_box = {
  209. type = "fixed",
  210. fixed = {-0.5, -0.5, -0.5, 0.5, -7/16, 0.5},
  211. },
  212. })
  213. --downward pointing icicle
  214. minetest.register_node("caverealms:icicle_down", {
  215. description = "Icicle",
  216. tiles = {"caverealms_icicle_down.png"},
  217. inventory_image = "caverealms_icicle_down.png",
  218. wield_image = "caverealms_icicle_down.png",
  219. is_ground_content = true,
  220. groups = {cracky = 3, oddly_breakable_by_hand = 1},
  221. sounds = default.node_sound_glass_defaults(),
  222. light_source = 8,
  223. damage_per_second = 1,
  224. paramtype = "light",
  225. drawtype = "plantlike",
  226. walkable = false,
  227. buildable_to = true,
  228. visual_scale = 1.0,
  229. selection_box = {
  230. type = "fixed",
  231. fixed = {-0.5, 7/16, -0.5, 0.5, 0.5, 0.5},
  232. },
  233. })
  234. --cave mossy cobble - bluish?
  235. minetest.register_node("caverealms:stone_with_moss", {
  236. description = "Cave Stone with Moss",
  237. tiles = {
  238. "default_cobble.png^caverealms_moss.png", "default_cobble.png",
  239. "default_cobble.png^caverealms_moss_side.png"},
  240. is_ground_content = true,
  241. groups = {crumbly = 1, cracky = 3},
  242. drop = 'default:cobble',
  243. sounds = default.node_sound_dirt_defaults({
  244. footstep = {name="default_grass_footstep", gain = 0.25},
  245. }),
  246. })
  247. --cave lichen-covered cobble - purple-ish
  248. minetest.register_node("caverealms:stone_with_lichen", {
  249. description = "Cave Stone with Lichen",
  250. tiles = {
  251. "default_cobble.png^caverealms_lichen.png", "default_cobble.png",
  252. "default_cobble.png^caverealms_lichen_side.png"},
  253. is_ground_content = true,
  254. groups = {crumbly = 1, cracky = 3},
  255. drop = 'default:cobble',
  256. sounds = default.node_sound_dirt_defaults({
  257. footstep = {name="default_grass_footstep", gain = 0.25},
  258. }),
  259. })
  260. --cave algae-covered cobble - yellow-ish
  261. minetest.register_node("caverealms:stone_with_algae", {
  262. description = "Cave Stone with Algae",
  263. tiles = {
  264. "default_cobble.png^caverealms_algae.png", "default_cobble.png",
  265. "default_cobble.png^caverealms_algae_side.png"},
  266. is_ground_content = true,
  267. groups = {crumbly = 1, cracky = 3},
  268. drop = 'default:cobble',
  269. sounds = default.node_sound_dirt_defaults({
  270. footstep = {name="default_grass_footstep", gain = 0.25},
  271. }),
  272. })
  273. --tiny-salt-crystal-covered cobble - pink-ish
  274. minetest.register_node("caverealms:stone_with_salt", {
  275. description = "Salt Crystal",
  276. tiles = {"caverealms_salty2.png"},
  277. light_source = 9,
  278. paramtype = "light",
  279. use_texture_alpha = "blend",
  280. drawtype = "glasslike",
  281. sunlight_propagates = true,
  282. is_ground_content = true,
  283. groups = {cracky = 3},
  284. sounds = default.node_sound_glass_defaults(),
  285. })
  286. --Hot Cobble - cobble with lava instead of mortar XD
  287. minetest.register_node("caverealms:hot_cobble", {
  288. description = "Hot Cobble",
  289. tiles = {"caverealms_hot_cobble.png"},
  290. is_ground_content = true,
  291. groups = {cracky = 1, hot = 1, unbreakable = 1},
  292. light_source = 3,
  293. paramtype = "light",
  294. sounds = default.node_sound_stone_defaults(),
  295. })
  296. --Glow Obsidian
  297. minetest.register_node("caverealms:glow_obsidian", {
  298. description = "Hot Glowing Obsidian",
  299. tiles = {"caverealms_glow_obsidian.png"},
  300. is_ground_content = true,
  301. groups = {cracky = 1, level = 2},
  302. light_source = 7,
  303. paramtype = "light",
  304. sounds = default.node_sound_stone_defaults(),
  305. })
  306. --Glow Obsidian 2 - has traces of lava
  307. minetest.register_node("caverealms:glow_obsidian_2", {
  308. description = "Hot Glow Obsidian",
  309. tiles = {"caverealms_glow_obsidian2.png"},
  310. is_ground_content = true,
  311. groups = {cracky = 1, hot = 1, level = 2},
  312. damage_per_second = 1,
  313. light_source = 9,
  314. paramtype = "light",
  315. sounds = default.node_sound_stone_defaults(),
  316. })
  317. --Glow Obsidian Bricks
  318. minetest.register_node("caverealms:glow_obsidian_brick", {
  319. description = "Glow Obsidian Brick",
  320. tiles = {"caverealms_glow_obsidian_brick.png"},
  321. light_source = 7,
  322. groups = {cracky = 1, level = 2},
  323. sounds = default.node_sound_stone_defaults(),
  324. })
  325. minetest.register_node("caverealms:glow_obsidian_brick_2", {
  326. description = "Glow Obsidian Brick",
  327. tiles = {"caverealms_glow_obsidian_brick_2.png"},
  328. light_source = 9,
  329. groups = {cracky = 1, level = 2},
  330. sounds = default.node_sound_stone_defaults(),
  331. })
  332. if minetest.get_modpath("stairs") then
  333. --Glow Obsidian Stairs/Slabs
  334. stairs.register_stair_and_slab(
  335. "glow_obsidian_brick",
  336. "caverealms:glow_obsidian_brick",
  337. {cracky = 1, level = 2},
  338. {"caverealms_glow_obsidian_brick.png"},
  339. "Glow Obsidian Brick Stair",
  340. "Glow Obsidian Brick Slab",
  341. default.node_sound_stone_defaults())
  342. stairs.register_stair_and_slab(
  343. "glow_obsidian_brick_2",
  344. "caverealms:glow_obsidian_brick_2",
  345. {cracky = 1, level = 2},
  346. {"caverealms_glow_obsidian_brick_2.png"},
  347. "Glow Obsidian Brick Stair",
  348. "Glow Obsidian Brick Slab",
  349. default.node_sound_stone_defaults())
  350. end
  351. --Glow Obsidian Glass
  352. minetest.register_node("caverealms:glow_obsidian_glass", {
  353. description = "Glow Obsidian Glass",
  354. drawtype = "glasslike_framed_optional",
  355. tiles = {
  356. "caverealms_glow_obsidian_glass.png",
  357. "default_obsidian_glass_detail.png"},
  358. paramtype = "light",
  359. light_source = 13,
  360. sunlight_propagates = true,
  361. groups = {cracky = 3},
  362. sounds = default.node_sound_glass_defaults(),
  363. })
  364. --Coal Dust
  365. minetest.register_node("caverealms:coal_dust", {
  366. description = "Coal Dust",
  367. tiles = {"caverealms_coal_dust.png"},
  368. is_ground_content = true,
  369. groups = {crumbly = 3, falling_node = 2, sand = 1},
  370. sounds = default.node_sound_sand_defaults(),
  371. })
  372. --glow worms
  373. minetest.register_node("caverealms:glow_worm", {
  374. description = "Blue Glow Worms",
  375. tiles = {"caverealms_glow_worm.png"},
  376. inventory_image = "caverealms_glow_worm.png",
  377. wield_image = "caverealms_glow_worm.png",
  378. is_ground_content = true,
  379. groups = {oddly_breakable_by_hand = 3},
  380. light_source = 9,
  381. paramtype = "light",
  382. drawtype = "plantlike",
  383. walkable = false,
  384. buildable_to = true,
  385. selection_box = {
  386. type = "fixed",
  387. fixed = {-1/6, -1/2, -1/6, 1/6, 1/2, 1/6},
  388. },
  389. })
  390. minetest.register_node("caverealms:glow_worm_green", {
  391. description = "Green Glow Worms",
  392. tiles = {"caverealms_glow_worm_green.png"},
  393. inventory_image = "caverealms_glow_worm_green.png",
  394. wield_image = "caverealms_glow_worm_green.png",
  395. is_ground_content = true,
  396. groups = {oddly_breakable_by_hand = 3},
  397. light_source = 9,
  398. paramtype = "light",
  399. drawtype = "plantlike",
  400. walkable = false,
  401. buildable_to = true,
  402. visual_scale = 1.0,
  403. selection_box = {
  404. type = "fixed",
  405. fixed = {-1/6, -1/2, -1/6, 1/6, 1/2, 1/6},
  406. },
  407. })
  408. minetest.register_node("caverealms:fire_vine", {
  409. description = "Fire Vine",
  410. tiles = {"caverealms_fire_vine.png"},
  411. inventory_image = "caverealms_fire_vine.png",
  412. wield_image = "caverealms_fire_vine.png",
  413. is_ground_content = true,
  414. damage_per_second = 1,
  415. groups = {oddly_breakable_by_hand = 3},
  416. light_source = 9,
  417. paramtype = "light",
  418. drawtype = "plantlike",
  419. walkable = false,
  420. buildable_to = true,
  421. visual_scale = 1.0,
  422. selection_box = {
  423. type = "fixed",
  424. fixed = {-1/6, -1/2, -1/6, 1/6, 1/2, 1/6},
  425. },
  426. })
  427. --define special flame so that it does not expire
  428. if minetest.get_modpath("fire") then
  429. minetest.register_alias("caverealms:constant_flame", "fire:permanent_flame")
  430. else
  431. minetest.register_node("caverealms:constant_flame", {
  432. description = "Fire",
  433. drawtype = "plantlike",
  434. tiles = {{
  435. name="fire_basic_flame_animated.png",
  436. animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=1},
  437. }},
  438. inventory_image = "fire_basic_flame.png",
  439. light_source = 14,
  440. groups = {igniter=2, dig_immediate=3, hot=3, not_in_creative_inventory=1},
  441. paramtype = "light",
  442. drop = '',
  443. walkable = false,
  444. buildable_to = true,
  445. damage_per_second = 4,
  446. })
  447. end
  448. --dungeon master statue (nodebox)
  449. minetest.register_node("caverealms:dm_statue", {
  450. description = "Dungeon Master Statue",
  451. tiles = {
  452. "caverealms_dm_stone.png",
  453. "caverealms_dm_stone.png",
  454. "caverealms_dm_stone.png",
  455. "caverealms_dm_stone.png",
  456. "caverealms_dm_stone.png",
  457. "caverealms_stone_eyes.png"
  458. },
  459. drawtype = "nodebox",
  460. paramtype = "light",
  461. paramtype2 = "facedir",
  462. groups = {cracky = 2},
  463. node_box = {
  464. type = "fixed",
  465. fixed = {
  466. {-0.4375, -0.5, -0.4375, 0.4375, -0.3125, 0.4375}, -- NodeBox1
  467. {-0.25, -0.125, -0.1875, 0.25, 0.5, 0.1875}, -- NodeBox2
  468. {-0.375, 0, -0.125, -0.25, 0.4375, 0.125}, -- NodeBox3
  469. {0.25, 0.125, -0.4375, 0.375, 0.375, 0.1875}, -- NodeBox4
  470. {-0.25, -0.5, -0.125, -0.125, -0.125, 0.125}, -- NodeBox5
  471. {0.125, -0.3125, -0.125, 0.25, 0, 0.125}, -- NodeBox6
  472. }
  473. },
  474. selection_box = {
  475. type = "regular"
  476. }
  477. })
  478. -- Compatibility
  479. minetest.register_alias("caverealms:hanging_thin_ice", "caverealms:thin_ice")
  480. minetest.register_alias("caverealms:spike_2", "caverealms:spike")
  481. minetest.register_alias("caverealms:spike_3", "caverealms:spike")
  482. minetest.register_alias("caverealms:spike_4", "caverealms:spike")
  483. minetest.register_alias("caverealms:spike_5", "caverealms:spike")
  484. minetest.register_alias("caverealms:salt_gem_2", "caverealms:salt_gem")
  485. minetest.register_alias("caverealms:salt_gem_3", "caverealms:salt_gem")
  486. minetest.register_alias("caverealms:salt_gem_4", "caverealms:salt_gem")
  487. minetest.register_alias("caverealms:salt_gem_5", "caverealms:salt_gem")
  488. minetest.register_alias("caverealms:glow_gem_2", "caverealms:glow_gem")
  489. minetest.register_alias("caverealms:glow_gem_3", "caverealms:glow_gem")
  490. minetest.register_alias("caverealms:glow_gem_4", "caverealms:glow_gem")
  491. minetest.register_alias("caverealms:glow_gem_5", "caverealms:glow_gem")