init.lua 52 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880
  1. minetest.register_node("xocean:ocean_cobble", {
  2. description = "Ocean Cobblestone",
  3. tile_images = {"xocean_cobble.png"},
  4. groups = {cracky=3},
  5. })
  6. minetest.register_node("xocean:ocean_stone", {
  7. description = "Ocean Stone",
  8. tile_images = {"xocean_stone.png"},
  9. groups = {cracky=3},
  10. drop= "xocean:ocean_cobble",
  11. })
  12. minetest.register_craft({
  13. type = "cooking",
  14. output = "xocean:ocean_stone",
  15. recipe = "xocean:ocean_cobble",
  16. })
  17. ---Spawn the stone
  18. minetest.register_ore({
  19. ore_type = "blob",
  20. ore = "xocean:ocean_stone",
  21. wherein = {"default:sand"},
  22. clust_scarcity = 32 * 32 * 32,
  23. clust_size = 8,
  24. y_min = -15,
  25. y_max = 0,
  26. noise_threshold = 0.0,
  27. noise_params = {
  28. offset = 0.5,
  29. scale = 0.2,
  30. spread = {x = 8, y = 5, z = 8},
  31. seed = -316,
  32. octaves = 1,
  33. persist = 0.0
  34. },
  35. })
  36. minetest.register_node("xocean:ocean_carved", {
  37. description = "Carved Ocean Stone",
  38. tile_images = {"xocean_carved.png"},
  39. groups = {cracky=2},
  40. })
  41. minetest.register_craft({
  42. output = '"xocean:ocean_carved" 4',
  43. recipe = {
  44. {'xocean:ocean_stone', 'xocean:ocean_stone',},
  45. {'xocean:ocean_stone', 'xocean:ocean_stone',},
  46. },
  47. })
  48. minetest.register_node("xocean:ocean_circular", {
  49. description = "Circular Ocean Stone",
  50. tile_images = {"xocean_circular.png"},
  51. groups = {cracky=2},
  52. })
  53. minetest.register_craft({
  54. output = '"xocean:ocean_circular" 4',
  55. recipe = {
  56. {'xocean:ocean_carved', 'xocean:ocean_carved',},
  57. {'xocean:ocean_carved', 'xocean:ocean_carved',},
  58. },
  59. })
  60. minetest.register_node("xocean:ocean_pillar", {
  61. description = "Ocean Pillar",
  62. tile_images = {"xocean_pillar.png"},
  63. groups = {cracky=2},
  64. })
  65. minetest.register_craft({
  66. output = '"xocean:ocean_pillar" 4',
  67. recipe = {
  68. {'xocean:ocean_brick', 'xocean:ocean_brick',},
  69. {'xocean:ocean_brick', 'xocean:ocean_brick',},
  70. },
  71. })
  72. minetest.register_node("xocean:ocean_brick", {
  73. description = "Ocean Brick",
  74. tile_images = {"xocean_brick.png"},
  75. groups = {cracky=2},
  76. })
  77. minetest.register_craft({
  78. output = '"xocean:ocean_brick" 4',
  79. recipe = {
  80. {'xocean:ocean_cobble', 'xocean:ocean_cobble',},
  81. {'xocean:ocean_cobble', 'xocean:ocean_cobble',},
  82. },
  83. })
  84. minetest.register_node("xocean:sea_lantern", {
  85. description = "Sea Lantern",
  86. drawtype = "glasslike",
  87. light_source = 30,
  88. tiles = {"xocean_lantern.png"},
  89. paramtype = "light",
  90. is_ground_content = true,
  91. sunlight_propagates = true,
  92. sounds = default.node_sound_glass_defaults(),
  93. groups = {cracky=3,oddly_breakable_by_hand=3},
  94. })
  95. minetest.register_craft({
  96. output = '"xocean:sea_lantern" 4',
  97. recipe = {
  98. {'default:torch', 'default:glass', 'default:torch', },
  99. {'default:glass', 'bucket:bucket_water', 'default:glass', },
  100. {'default:torch', 'default:glass', 'default:torch', },
  101. },
  102. replacements = {{ "bucket:bucket_water", "bucket:bucket_empty"}}
  103. })
  104. ---Sea stuff
  105. minetest.register_node("xocean:kelp_block", {
  106. description = "Dried Kelp Block",
  107. tile_images = {"xocean_kelp_block.png"},
  108. groups = {snappy=3},
  109. drop= "xocean:kelp 9",
  110. })
  111. minetest.register_craft({
  112. output = '"xocean:kelp_block" 1',
  113. recipe = {
  114. {'xocean:kelp', 'xocean:kelp', 'xocean:kelp', },
  115. {'xocean:kelp', 'xocean:kelp', 'xocean:kelp', },
  116. {'xocean:kelp', 'xocean:kelp', 'xocean:kelp', },
  117. },
  118. })
  119. minetest.override_item("default:sand_with_kelp", {
  120. description = "Kelp",
  121. drawtype = "plantlike_rooted",
  122. waving = 1,
  123. tiles = {"default_sand.png"},
  124. special_tiles = {{name = "default_kelp.png", tileable_vertical = true}},
  125. inventory_image = "xocean_kelp.png",
  126. wield_image = "xocean_kelp.png",
  127. paramtype = "light",
  128. paramtype2 = "leveled",
  129. groups = {snappy = 3},
  130. selection_box = {
  131. type = "fixed",
  132. fixed = {
  133. {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
  134. {-2/16, 0.5, -2/16, 2/16, 3.5, 2/16},
  135. },
  136. },
  137. node_dig_prediction = "default:sand",
  138. node_placement_prediction = "",
  139. sounds = default.node_sound_sand_defaults({
  140. dig = {name = "default_dig_snappy", gain = 0.2},
  141. dug = {name = "default_grass_footstep", gain = 0.25},
  142. }),
  143. on_place = function(itemstack, placer, pointed_thing)
  144. -- Call on_rightclick if the pointed node defines it
  145. if pointed_thing.type == "node" and placer and
  146. not placer:get_player_control().sneak then
  147. local node_ptu = minetest.get_node(pointed_thing.under)
  148. local def_ptu = minetest.registered_nodes[node_ptu.name]
  149. if def_ptu and def_ptu.on_rightclick then
  150. return def_ptu.on_rightclick(pointed_thing.under, node_ptu, placer,
  151. itemstack, pointed_thing)
  152. end
  153. end
  154. local pos = pointed_thing.under
  155. if minetest.get_node(pos).name ~= "default:sand" then
  156. return itemstack
  157. end
  158. local height = math.random(4, 6)
  159. local pos_top = {x = pos.x, y = pos.y + height, z = pos.z}
  160. local node_top = minetest.get_node(pos_top)
  161. local def_top = minetest.registered_nodes[node_top.name]
  162. local player_name = placer:get_player_name()
  163. if def_top and def_top.liquidtype == "source" and
  164. minetest.get_item_group(node_top.name, "water") > 0 then
  165. if not minetest.is_protected(pos, player_name) and
  166. not minetest.is_protected(pos_top, player_name) then
  167. minetest.set_node(pos, {name = "default:sand_with_kelp",
  168. param2 = height * 16})
  169. if not (creative and creative.is_enabled_for
  170. and creative.is_enabled_for(player_name)) then
  171. itemstack:take_item()
  172. end
  173. else
  174. minetest.chat_send_player(player_name, "Node is protected")
  175. minetest.record_protection_violation(pos, player_name)
  176. end
  177. end
  178. return itemstack
  179. end,
  180. after_destruct = function(pos, oldnode)
  181. minetest.set_node(pos, {name = "default:sand"})
  182. end
  183. })
  184. minetest.register_craft({
  185. type = "cooking",
  186. output = "xocean:kelp",
  187. recipe = "default:sand_with_kelp",
  188. })
  189. minetest.register_craftitem("xocean:kelp", {
  190. description = "Dried Kelp",
  191. on_use = minetest.item_eat(1),
  192. inventory_image = "xocean_dried_kelp.png",
  193. })
  194. minetest.register_craftitem("xocean:sushi", {
  195. description = "Sushi",
  196. on_use = minetest.item_eat(6),
  197. inventory_image = "xocean_sushi.png",
  198. })
  199. minetest.register_craft({
  200. output = '"xocean:sushi" 1',
  201. recipe = {
  202. {'xocean:fish_edible'},
  203. {'xocean:kelp' },
  204. },
  205. })
  206. minetest.register_node("xocean:seagrass", {
  207. description = "Seagrass",
  208. drawtype = "plantlike_rooted",
  209. waving = 1,
  210. paramtype = "light",
  211. tiles = {"default_sand.png"},
  212. special_tiles = {{name = "xocean_grass.png", tileable_vertical = true}},
  213. inventory_image = "xocean_grass.png",
  214. groups = {snappy = 3},
  215. selection_box = {
  216. type = "fixed",
  217. fixed = {
  218. {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
  219. {-4/16, 0.5, -4/16, 4/16, 1.5, 4/16},
  220. },
  221. },
  222. node_dig_prediction = "default:sand",
  223. node_placement_prediction = "",
  224. sounds = default.node_sound_stone_defaults({
  225. dig = {name = "default_dig_snappy", gain = 0.2},
  226. dug = {name = "default_grass_footstep", gain = 0.25},
  227. }),
  228. on_place = function(itemstack, placer, pointed_thing)
  229. if pointed_thing.type ~= "node" or not placer then
  230. return itemstack
  231. end
  232. local player_name = placer:get_player_name()
  233. local pos_under = pointed_thing.under
  234. local pos_above = pointed_thing.above
  235. if minetest.get_node(pos_under).name ~= "default:sand" or
  236. minetest.get_node(pos_above).name ~= "default:water_source" then
  237. return itemstack
  238. end
  239. if minetest.is_protected(pos_under, player_name) or
  240. minetest.is_protected(pos_above, player_name) then
  241. minetest.chat_send_player(player_name, "Node is protected")
  242. minetest.record_protection_violation(pos_under, player_name)
  243. return itemstack
  244. end
  245. minetest.set_node(pos_under, {name = "xocean:seagrass"})
  246. if not (creative and creative.is_enabled_for(player_name)) then
  247. itemstack:take_item()
  248. end
  249. return itemstack
  250. end,
  251. after_destruct = function(pos, oldnode)
  252. minetest.set_node(pos, {name = "default:sand"})
  253. end,
  254. })
  255. minetest.register_craftitem("xocean:fish_edible", {
  256. description = "Tropical Fish",
  257. on_use = minetest.item_eat(3),
  258. inventory_image = "xocean_fish_edible.png",
  259. })
  260. minetest.register_node("xocean:pickle", {
  261. description = "Sea Pickle",
  262. drawtype = "plantlike_rooted",
  263. waving = 1,
  264. paramtype = "light",
  265. tiles = {"default_sand.png"},
  266. special_tiles = {{name = "xocean_pickle.png", tileable_vertical = true}},
  267. inventory_image = "xocean_pickle.png",
  268. groups = {snappy = 3},
  269. selection_box = {
  270. type = "fixed",
  271. fixed = {
  272. {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
  273. {-4/16, 0.5, -4/16, 4/16, 1.5, 4/16},
  274. },
  275. },
  276. light_source = 3,
  277. node_dig_prediction = "default:sand",
  278. node_placement_prediction = "",
  279. sounds = default.node_sound_stone_defaults({
  280. dig = {name = "default_dig_snappy", gain = 0.2},
  281. dug = {name = "default_grass_footstep", gain = 0.25},
  282. }),
  283. on_place = function(itemstack, placer, pointed_thing)
  284. if pointed_thing.type ~= "node" or not placer then
  285. return itemstack
  286. end
  287. local player_name = placer:get_player_name()
  288. local pos_under = pointed_thing.under
  289. local pos_above = pointed_thing.above
  290. if minetest.get_node(pos_under).name ~= "default:sand" or
  291. minetest.get_node(pos_above).name ~= "default:water_source" then
  292. return itemstack
  293. end
  294. if minetest.is_protected(pos_under, player_name) or
  295. minetest.is_protected(pos_above, player_name) then
  296. minetest.chat_send_player(player_name, "Node is protected")
  297. minetest.record_protection_violation(pos_under, player_name)
  298. return itemstack
  299. end
  300. minetest.set_node(pos_under, {name = "xocean:pickle"})
  301. if not (creative and creative.is_enabled_for(player_name)) then
  302. itemstack:take_item()
  303. end
  304. return itemstack
  305. end,
  306. after_destruct = function(pos, oldnode)
  307. minetest.set_node(pos, {name = "default:sand"})
  308. end,
  309. })
  310. ---Corals
  311. minetest.register_node("xocean:brain_block", {
  312. description = "Brain Coral Block",
  313. tiles = {"xocean_coral_brain.png"},
  314. groups = {cracky = 3},
  315. drop = "xocean:brain_skeleton",
  316. sounds = default.node_sound_stone_defaults(),
  317. })
  318. minetest.override_item("default:coral_pink", {
  319. description = "Brain Coral",
  320. drawtype = "plantlike_rooted",
  321. waving = 1,
  322. paramtype = "light",
  323. tiles = {"xocean_coral_brain.png"},
  324. special_tiles = {{name = "xocean_brain.png", tileable_vertical = true}},
  325. inventory_image = "xocean_brain.png",
  326. groups = {snappy = 3},
  327. selection_box = {
  328. type = "fixed",
  329. fixed = {
  330. {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
  331. {-4/16, 0.5, -4/16, 4/16, 1.5, 4/16},
  332. },
  333. },
  334. node_dig_prediction = "xocean:brain_block",
  335. node_placement_prediction = "",
  336. sounds = default.node_sound_stone_defaults({
  337. dig = {name = "default_dig_snappy", gain = 0.2},
  338. dug = {name = "default_grass_footstep", gain = 0.25},
  339. }),
  340. on_place = function(itemstack, placer, pointed_thing)
  341. if pointed_thing.type ~= "node" or not placer then
  342. return itemstack
  343. end
  344. local player_name = placer:get_player_name()
  345. local pos_under = pointed_thing.under
  346. local pos_above = pointed_thing.above
  347. if minetest.get_node(pos_under).name ~= "xocean:brain_block" or
  348. minetest.get_node(pos_above).name ~= "default:water_source" then
  349. return itemstack
  350. end
  351. if minetest.is_protected(pos_under, player_name) or
  352. minetest.is_protected(pos_above, player_name) then
  353. minetest.chat_send_player(player_name, "Node is protected")
  354. minetest.record_protection_violation(pos_under, player_name)
  355. return itemstack
  356. end
  357. minetest.set_node(pos_under, {name = "default:coral_pink"})
  358. if not (creative and creative.is_enabled_for(player_name)) then
  359. itemstack:take_item()
  360. end
  361. return itemstack
  362. end,
  363. after_destruct = function(pos, oldnode)
  364. minetest.set_node(pos, {name = "xocean:brain_block"})
  365. end,
  366. })
  367. minetest.register_node("xocean:brain_skeleton", {
  368. description = "Brain Coral Skeleton Block",
  369. tiles = {"xocean_coral_brain_skeleton.png"},
  370. groups = {cracky = 3},
  371. sounds = default.node_sound_stone_defaults(),
  372. })
  373. minetest.register_node("xocean:skeleton_brain", {
  374. description = "Brain Coral Skeleton",
  375. drawtype = "plantlike_rooted",
  376. waving = 1,
  377. paramtype = "light",
  378. tiles = {"xocean_coral_brain_skeleton.png"},
  379. special_tiles = {{name = "xocean_brain_skeleton.png", tileable_vertical = true}},
  380. inventory_image = "xocean_brain_skeleton.png",
  381. groups = {snappy = 3},
  382. selection_box = {
  383. type = "fixed",
  384. fixed = {
  385. {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
  386. {-4/16, 0.5, -4/16, 4/16, 1.5, 4/16},
  387. },
  388. },
  389. node_dig_prediction = "xocean:brain_skeleton",
  390. node_placement_prediction = "",
  391. sounds = default.node_sound_stone_defaults({
  392. dig = {name = "default_dig_snappy", gain = 0.2},
  393. dug = {name = "default_grass_footstep", gain = 0.25},
  394. }),
  395. on_place = function(itemstack, placer, pointed_thing)
  396. if pointed_thing.type ~= "node" or not placer then
  397. return itemstack
  398. end
  399. local player_name = placer:get_player_name()
  400. local pos_under = pointed_thing.under
  401. local pos_above = pointed_thing.above
  402. if minetest.get_node(pos_under).name ~= "xocean:brain_skeleton" or
  403. minetest.get_node(pos_above).name ~= "default:water_source" then
  404. return itemstack
  405. end
  406. if minetest.is_protected(pos_under, player_name) or
  407. minetest.is_protected(pos_above, player_name) then
  408. minetest.chat_send_player(player_name, "Node is protected")
  409. minetest.record_protection_violation(pos_under, player_name)
  410. return itemstack
  411. end
  412. minetest.set_node(pos_under, {name = "xocean:skeleton_brain"})
  413. if not (creative and creative.is_enabled_for(player_name)) then
  414. itemstack:take_item()
  415. end
  416. return itemstack
  417. end,
  418. after_destruct = function(pos, oldnode)
  419. minetest.set_node(pos, {name = "xocean:brain_skeleton"})
  420. end,
  421. })
  422. minetest.register_node("xocean:tube_block", {
  423. description = "Tube Coral Block",
  424. tiles = {"xocean_coral_tube.png"},
  425. groups = {cracky = 3},
  426. drop = "xocean:tube_skeleton",
  427. sounds = default.node_sound_stone_defaults(),
  428. })
  429. minetest.override_item("default:coral_cyan", {
  430. description = "Tube Coral",
  431. drawtype = "plantlike_rooted",
  432. waving = 1,
  433. paramtype = "light",
  434. tiles = {"xocean_coral_tube.png"},
  435. special_tiles = {{name = "xocean_tube.png", tileable_vertical = true}},
  436. inventory_image = "xocean_tube.png",
  437. groups = {snappy = 3},
  438. selection_box = {
  439. type = "fixed",
  440. fixed = {
  441. {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
  442. {-4/16, 0.5, -4/16, 4/16, 1.5, 4/16},
  443. },
  444. },
  445. drop = "xocean:skeleton_tube",
  446. node_dig_prediction = "xocean:tube_block",
  447. node_placement_prediction = "",
  448. sounds = default.node_sound_stone_defaults({
  449. dig = {name = "default_dig_snappy", gain = 0.2},
  450. dug = {name = "default_grass_footstep", gain = 0.25},
  451. }),
  452. on_place = function(itemstack, placer, pointed_thing)
  453. if pointed_thing.type ~= "node" or not placer then
  454. return itemstack
  455. end
  456. local player_name = placer:get_player_name()
  457. local pos_under = pointed_thing.under
  458. local pos_above = pointed_thing.above
  459. if minetest.get_node(pos_under).name ~= "xocean:tube_block" or
  460. minetest.get_node(pos_above).name ~= "default:water_source" then
  461. return itemstack
  462. end
  463. if minetest.is_protected(pos_under, player_name) or
  464. minetest.is_protected(pos_above, player_name) then
  465. minetest.chat_send_player(player_name, "Node is protected")
  466. minetest.record_protection_violation(pos_under, player_name)
  467. return itemstack
  468. end
  469. minetest.set_node(pos_under, {name = "default:coral_cyan"})
  470. if not (creative and creative.is_enabled_for(player_name)) then
  471. itemstack:take_item()
  472. end
  473. return itemstack
  474. end,
  475. after_destruct = function(pos, oldnode)
  476. minetest.set_node(pos, {name = "xocean:tube_block"})
  477. end,
  478. })
  479. minetest.register_node("xocean:tube_skeleton", {
  480. description = "Tube Coral Skeleton Block",
  481. tiles = {"xocean_coral_tube_skeleton.png"},
  482. groups = {cracky = 3},
  483. sounds = default.node_sound_stone_defaults(),
  484. })
  485. minetest.register_node("xocean:skeleton_tube", {
  486. description = "Tube Coral Skeleton",
  487. drawtype = "plantlike_rooted",
  488. waving = 1,
  489. paramtype = "light",
  490. tiles = {"xocean_coral_tube_skeleton.png"},
  491. special_tiles = {{name = "xocean_tube_skeleton.png", tileable_vertical = true}},
  492. inventory_image = "xocean_tube_skeleton.png",
  493. groups = {snappy = 3},
  494. selection_box = {
  495. type = "fixed",
  496. fixed = {
  497. {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
  498. {-4/16, 0.5, -4/16, 4/16, 1.5, 4/16},
  499. },
  500. },
  501. node_dig_prediction = "xocean:tube_skeleton",
  502. node_placement_prediction = "",
  503. sounds = default.node_sound_stone_defaults({
  504. dig = {name = "default_dig_snappy", gain = 0.2},
  505. dug = {name = "default_grass_footstep", gain = 0.25},
  506. }),
  507. on_place = function(itemstack, placer, pointed_thing)
  508. if pointed_thing.type ~= "node" or not placer then
  509. return itemstack
  510. end
  511. local player_name = placer:get_player_name()
  512. local pos_under = pointed_thing.under
  513. local pos_above = pointed_thing.above
  514. if minetest.get_node(pos_under).name ~= "xocean:tube_skeleton" or
  515. minetest.get_node(pos_above).name ~= "default:water_source" then
  516. return itemstack
  517. end
  518. if minetest.is_protected(pos_under, player_name) or
  519. minetest.is_protected(pos_above, player_name) then
  520. minetest.chat_send_player(player_name, "Node is protected")
  521. minetest.record_protection_violation(pos_under, player_name)
  522. return itemstack
  523. end
  524. minetest.set_node(pos_under, {name = "xocean:skeleton_tube"})
  525. if not (creative and creative.is_enabled_for(player_name)) then
  526. itemstack:take_item()
  527. end
  528. return itemstack
  529. end,
  530. after_destruct = function(pos, oldnode)
  531. minetest.set_node(pos, {name = "xocean:tube_skeleton"})
  532. end,
  533. })
  534. minetest.register_node("xocean:bubble_block", {
  535. description = "Bubble Coral Block",
  536. tiles = {"xocean_coral_bubble.png"},
  537. groups = {cracky = 3},
  538. drop = "xocean:bubble_skeleton",
  539. sounds = default.node_sound_stone_defaults(),
  540. })
  541. minetest.register_node("xocean:bubble", {
  542. description = "Bubble Coral",
  543. drawtype = "plantlike_rooted",
  544. waving = 1,
  545. drop = "xocean:skeleton_bubble",
  546. paramtype = "light",
  547. tiles = {"xocean_coral_bubble.png"},
  548. special_tiles = {{name = "xocean_bubble.png", tileable_vertical = true}},
  549. inventory_image = "xocean_bubble.png",
  550. groups = {snappy = 3},
  551. selection_box = {
  552. type = "fixed",
  553. fixed = {
  554. {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
  555. {-4/16, 0.5, -4/16, 4/16, 1.5, 4/16},
  556. },
  557. },
  558. node_dig_prediction = "xocean:bubble_block",
  559. node_placement_prediction = "",
  560. sounds = default.node_sound_stone_defaults({
  561. dig = {name = "default_dig_snappy", gain = 0.2},
  562. dug = {name = "default_grass_footstep", gain = 0.25},
  563. }),
  564. on_place = function(itemstack, placer, pointed_thing)
  565. if pointed_thing.type ~= "node" or not placer then
  566. return itemstack
  567. end
  568. local player_name = placer:get_player_name()
  569. local pos_under = pointed_thing.under
  570. local pos_above = pointed_thing.above
  571. if minetest.get_node(pos_under).name ~= "xocean:bubble_block" or
  572. minetest.get_node(pos_above).name ~= "default:water_source" then
  573. return itemstack
  574. end
  575. if minetest.is_protected(pos_under, player_name) or
  576. minetest.is_protected(pos_above, player_name) then
  577. minetest.chat_send_player(player_name, "Node is protected")
  578. minetest.record_protection_violation(pos_under, player_name)
  579. return itemstack
  580. end
  581. minetest.set_node(pos_under, {name = "xocean:bubble"})
  582. if not (creative and creative.is_enabled_for(player_name)) then
  583. itemstack:take_item()
  584. end
  585. return itemstack
  586. end,
  587. after_destruct = function(pos, oldnode)
  588. minetest.set_node(pos, {name = "xocean:bubble_block"})
  589. end,
  590. })
  591. minetest.register_node("xocean:bubble_skeleton", {
  592. description = "Bubble Coral Skeleton Block",
  593. tiles = {"xocean_coral_bubble_skeleton.png"},
  594. groups = {cracky = 3},
  595. sounds = default.node_sound_stone_defaults(),
  596. })
  597. minetest.register_node("xocean:skeleton_bubble", {
  598. description = "Bubble Coral Skeleton",
  599. drawtype = "plantlike_rooted",
  600. waving = 1,
  601. paramtype = "light",
  602. tiles = {"xocean_coral_bubble_skeleton.png"},
  603. special_tiles = {{name = "xocean_bubble_skeleton.png", tileable_vertical = true}},
  604. inventory_image = "xocean_bubble_skeleton.png",
  605. groups = {snappy = 3},
  606. selection_box = {
  607. type = "fixed",
  608. fixed = {
  609. {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
  610. {-4/16, 0.5, -4/16, 4/16, 1.5, 4/16},
  611. },
  612. },
  613. drop = "xocean:skeleton_bubble",
  614. node_dig_prediction = "xocean:bubble_skeleton",
  615. node_placement_prediction = "",
  616. sounds = default.node_sound_stone_defaults({
  617. dig = {name = "default_dig_snappy", gain = 0.2},
  618. dug = {name = "default_grass_footstep", gain = 0.25},
  619. }),
  620. on_place = function(itemstack, placer, pointed_thing)
  621. if pointed_thing.type ~= "node" or not placer then
  622. return itemstack
  623. end
  624. local player_name = placer:get_player_name()
  625. local pos_under = pointed_thing.under
  626. local pos_above = pointed_thing.above
  627. if minetest.get_node(pos_under).name ~= "xocean:bubble_skeleton" or
  628. minetest.get_node(pos_above).name ~= "default:water_source" then
  629. return itemstack
  630. end
  631. if minetest.is_protected(pos_under, player_name) or
  632. minetest.is_protected(pos_above, player_name) then
  633. minetest.chat_send_player(player_name, "Node is protected")
  634. minetest.record_protection_violation(pos_under, player_name)
  635. return itemstack
  636. end
  637. minetest.set_node(pos_under, {name = "xocean:skeleton_bubble"})
  638. if not (creative and creative.is_enabled_for(player_name)) then
  639. itemstack:take_item()
  640. end
  641. return itemstack
  642. end,
  643. after_destruct = function(pos, oldnode)
  644. minetest.set_node(pos, {name = "xocean:bubble_skeleton"})
  645. end,
  646. })
  647. minetest.override_item("default:coral_brown", {
  648. description = "Horn Coral Block",
  649. tiles = {"xocean_coral_horn.png"},
  650. groups = {cracky = 3},
  651. drop = "default:coral_skeleton",
  652. sounds = default.node_sound_stone_defaults(),
  653. })
  654. minetest.register_node("xocean:horn", {
  655. description = "Horn Coral",
  656. drawtype = "plantlike_rooted",
  657. waving = 1,
  658. paramtype = "light",
  659. tiles = {"xocean_coral_horn.png"},
  660. special_tiles = {{name = "xocean_horn.png", tileable_vertical = true}},
  661. inventory_image = "xocean_horn.png",
  662. groups = {snappy = 3},
  663. drop = "xocean:skeleton_horn",
  664. selection_box = {
  665. type = "fixed",
  666. fixed = {
  667. {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
  668. {-4/16, 0.5, -4/16, 4/16, 1.5, 4/16},
  669. },
  670. },
  671. node_dig_prediction = "default:coral_brown",
  672. node_placement_prediction = "",
  673. sounds = default.node_sound_stone_defaults({
  674. dig = {name = "default_dig_snappy", gain = 0.2},
  675. dug = {name = "default_grass_footstep", gain = 0.25},
  676. }),
  677. on_place = function(itemstack, placer, pointed_thing)
  678. if pointed_thing.type ~= "node" or not placer then
  679. return itemstack
  680. end
  681. local player_name = placer:get_player_name()
  682. local pos_under = pointed_thing.under
  683. local pos_above = pointed_thing.above
  684. if minetest.get_node(pos_under).name ~= "default:coral_brown" or
  685. minetest.get_node(pos_above).name ~= "default:water_source" then
  686. return itemstack
  687. end
  688. if minetest.is_protected(pos_under, player_name) or
  689. minetest.is_protected(pos_above, player_name) then
  690. minetest.chat_send_player(player_name, "Node is protected")
  691. minetest.record_protection_violation(pos_under, player_name)
  692. return itemstack
  693. end
  694. minetest.set_node(pos_under, {name = "xocean:horn"})
  695. if not (creative and creative.is_enabled_for(player_name)) then
  696. itemstack:take_item()
  697. end
  698. return itemstack
  699. end,
  700. after_destruct = function(pos, oldnode)
  701. minetest.set_node(pos, {name = "default:coral_brown"})
  702. end,
  703. })
  704. minetest.override_item("default:coral_skeleton", {
  705. description = "Horn Coral Skeleton Block",
  706. tiles = {"xocean_coral_horn_skeleton.png"},
  707. groups = {cracky = 3},
  708. sounds = default.node_sound_stone_defaults(),
  709. })
  710. minetest.register_node("xocean:skeleton_horn", {
  711. description = "Horn Coral Skeleton",
  712. drawtype = "plantlike_rooted",
  713. waving = 1,
  714. paramtype = "light",
  715. tiles = {"xocean_coral_horn_skeleton.png"},
  716. special_tiles = {{name = "xocean_horn_skeleton.png", tileable_vertical = true}},
  717. inventory_image = "xocean_horn_skeleton.png",
  718. groups = {snappy = 3},
  719. selection_box = {
  720. type = "fixed",
  721. fixed = {
  722. {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
  723. {-4/16, 0.5, -4/16, 4/16, 1.5, 4/16},
  724. },
  725. },
  726. drop = "xocean:skeleton:horn",
  727. node_dig_prediction = "xocean:horn_skeleton",
  728. node_placement_prediction = "",
  729. sounds = default.node_sound_stone_defaults({
  730. dig = {name = "default_dig_snappy", gain = 0.2},
  731. dug = {name = "default_grass_footstep", gain = 0.25},
  732. }),
  733. on_place = function(itemstack, placer, pointed_thing)
  734. if pointed_thing.type ~= "node" or not placer then
  735. return itemstack
  736. end
  737. local player_name = placer:get_player_name()
  738. local pos_under = pointed_thing.under
  739. local pos_above = pointed_thing.above
  740. if minetest.get_node(pos_under).name ~= "xocean:horn_skeleton" or
  741. minetest.get_node(pos_above).name ~= "default:water_source" then
  742. return itemstack
  743. end
  744. if minetest.is_protected(pos_under, player_name) or
  745. minetest.is_protected(pos_above, player_name) then
  746. minetest.chat_send_player(player_name, "Node is protected")
  747. minetest.record_protection_violation(pos_under, player_name)
  748. return itemstack
  749. end
  750. minetest.set_node(pos_under, {name = "xocean:skeleton_horn"})
  751. if not (creative and creative.is_enabled_for(player_name)) then
  752. itemstack:take_item()
  753. end
  754. return itemstack
  755. end,
  756. after_destruct = function(pos, oldnode)
  757. minetest.set_node(pos, {name = "xocean:horn_skeleton"})
  758. end,
  759. })
  760. minetest.override_item("default:coral_orange", {
  761. description = "Fire Coral Block",
  762. tiles = {"xocean_coral_fire.png"},
  763. groups = {cracky = 3},
  764. drop = "xocean:fire_skeleton",
  765. sounds = default.node_sound_stone_defaults(),
  766. })
  767. minetest.register_node("xocean:fire", {
  768. description = "Fire Coral",
  769. drawtype = "plantlike_rooted",
  770. waving = 1,
  771. paramtype = "light",
  772. tiles = {"xocean_coral_fire.png"},
  773. special_tiles = {{name = "xocean_fire.png", tileable_vertical = true}},
  774. inventory_image = "xocean_fire.png",
  775. groups = {snappy = 3},
  776. selection_box = {
  777. type = "fixed",
  778. fixed = {
  779. {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
  780. {-4/16, 0.5, -4/16, 4/16, 1.5, 4/16},
  781. },
  782. },
  783. drop = "xocean:skeleton_fire",
  784. node_dig_prediction = "xocean:default:coral_orange",
  785. node_placement_prediction = "",
  786. sounds = default.node_sound_stone_defaults({
  787. dig = {name = "default_dig_snappy", gain = 0.2},
  788. dug = {name = "default_grass_footstep", gain = 0.25},
  789. }),
  790. on_place = function(itemstack, placer, pointed_thing)
  791. if pointed_thing.type ~= "node" or not placer then
  792. return itemstack
  793. end
  794. local player_name = placer:get_player_name()
  795. local pos_under = pointed_thing.under
  796. local pos_above = pointed_thing.above
  797. if minetest.get_node(pos_under).name ~= "default:coral_orange" or
  798. minetest.get_node(pos_above).name ~= "default:water_source" then
  799. return itemstack
  800. end
  801. if minetest.is_protected(pos_under, player_name) or
  802. minetest.is_protected(pos_above, player_name) then
  803. minetest.chat_send_player(player_name, "Node is protected")
  804. minetest.record_protection_violation(pos_under, player_name)
  805. return itemstack
  806. end
  807. minetest.set_node(pos_under, {name = "xocean:fire"})
  808. if not (creative and creative.is_enabled_for(player_name)) then
  809. itemstack:take_item()
  810. end
  811. return itemstack
  812. end,
  813. after_destruct = function(pos, oldnode)
  814. minetest.set_node(pos, {name = "default:coral_orange"})
  815. end,
  816. })
  817. minetest.register_node("xocean:fire_skeleton", {
  818. description = "Fire Coral Skeleton Block",
  819. tiles = {"xocean_coral_fire_skeleton.png"},
  820. groups = {cracky = 3},
  821. sounds = default.node_sound_stone_defaults(),
  822. })
  823. minetest.register_node("xocean:skeleton_fire", {
  824. description = "Fire Coral Skeleton",
  825. drawtype = "plantlike_rooted",
  826. waving = 1,
  827. paramtype = "light",
  828. tiles = {"xocean_coral_fire_skeleton.png"},
  829. special_tiles = {{name = "xocean_fire_skeleton.png", tileable_vertical = true}},
  830. inventory_image = "xocean_fire_skeleton.png",
  831. groups = {snappy = 3},
  832. selection_box = {
  833. type = "fixed",
  834. fixed = {
  835. {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
  836. {-4/16, 0.5, -4/16, 4/16, 1.5, 4/16},
  837. },
  838. },
  839. node_dig_prediction = "xocean:fire_skeleton",
  840. node_placement_prediction = "",
  841. sounds = default.node_sound_stone_defaults({
  842. dig = {name = "default_dig_snappy", gain = 0.2},
  843. dug = {name = "default_grass_footstep", gain = 0.25},
  844. }),
  845. on_place = function(itemstack, placer, pointed_thing)
  846. if pointed_thing.type ~= "node" or not placer then
  847. return itemstack
  848. end
  849. local player_name = placer:get_player_name()
  850. local pos_under = pointed_thing.under
  851. local pos_above = pointed_thing.above
  852. if minetest.get_node(pos_under).name ~= "xocean:fire_skeleton" or
  853. minetest.get_node(pos_above).name ~= "default:water_source" then
  854. return itemstack
  855. end
  856. if minetest.is_protected(pos_under, player_name) or
  857. minetest.is_protected(pos_above, player_name) then
  858. minetest.chat_send_player(player_name, "Node is protected")
  859. minetest.record_protection_violation(pos_under, player_name)
  860. return itemstack
  861. end
  862. minetest.set_node(pos_under, {name = "xocean:skeleton_fire"})
  863. if not (creative and creative.is_enabled_for(player_name)) then
  864. itemstack:take_item()
  865. end
  866. return itemstack
  867. end,
  868. after_destruct = function(pos, oldnode)
  869. minetest.set_node(pos, {name = "xocean:fire_skeleton"})
  870. end,
  871. })
  872. ---Mapgen
  873. minetest.register_decoration({
  874. name = "xocean:brain",
  875. deco_type = "schematic",
  876. place_on = {"default:sand"},
  877. place_offset_y = -1,
  878. sidelen = 2,
  879. noise_params = {
  880. offset = 0.0001,
  881. scale = 0.0001,
  882. spread = {x = 100000, y = 100000, z = 100000},
  883. seed = 87112,
  884. octaves = 20,
  885. persist = 0.7
  886. },
  887. biomes = {
  888. "taiga_ocean",
  889. "snowy_grassland_ocean",
  890. "grassland_ocean",
  891. "coniferous_forest_ocean",
  892. "deciduous_forest_ocean",
  893. "sandstone_desert_ocean",
  894. "cold_desert_ocean"},
  895. y_max = -6,
  896. y_min = -16,
  897. flags = "force_placement",
  898. schematic = minetest.get_modpath("xocean") .. "/schems/brain.mts",
  899. param2 = 48,
  900. param2_max = 96,
  901. })
  902. minetest.register_decoration({
  903. name = "xocean:horn",
  904. deco_type = "schematic",
  905. place_on = {"default:sand"},
  906. place_offset_y = -1,
  907. sidelen = 2,
  908. noise_params = {
  909. offset = 0.0001,
  910. scale = 0.0001,
  911. spread = {x = 100000, y = 100000, z = 100000},
  912. seed = 87112,
  913. octaves = 20,
  914. persist = 0.7
  915. },
  916. biomes = {
  917. "taiga_ocean",
  918. "snowy_grassland_ocean",
  919. "grassland_ocean",
  920. "coniferous_forest_ocean",
  921. "deciduous_forest_ocean",
  922. "sandstone_desert_ocean",
  923. "cold_desert_ocean"},
  924. y_max = -6,
  925. y_min = -16,
  926. flags = "force_placement",
  927. schematic = minetest.get_modpath("xocean") .. "/schems/horn.mts",
  928. param2 = 48,
  929. param2_max = 96,
  930. })
  931. minetest.register_decoration({
  932. name = "xocean:bubble",
  933. deco_type = "schematic",
  934. place_on = {"default:sand"},
  935. place_offset_y = -1,
  936. sidelen = 2,
  937. noise_params = {
  938. offset = 0.0001,
  939. scale = 0.0001,
  940. spread = {x = 100000, y = 100000, z = 100000},
  941. seed = 87112,
  942. octaves = 20,
  943. persist = 0.7
  944. },
  945. biomes = {
  946. "taiga_ocean",
  947. "snowy_grassland_ocean",
  948. "grassland_ocean",
  949. "coniferous_forest_ocean",
  950. "deciduous_forest_ocean",
  951. "sandstone_desert_ocean",
  952. "cold_desert_ocean"},
  953. y_max = -6,
  954. y_min = -16,
  955. flags = "force_placement",
  956. schematic = minetest.get_modpath("xocean") .. "/schems/bubble.mts",
  957. param2 = 48,
  958. param2_max = 96,
  959. })
  960. minetest.register_decoration({
  961. name = "xocean:tube",
  962. deco_type = "schematic",
  963. place_on = {"default:sand"},
  964. place_offset_y = -1,
  965. sidelen = 2,
  966. noise_params = {
  967. offset = 0.0001,
  968. scale = 0.0001,
  969. spread = {x = 100000, y = 100000, z = 100000},
  970. seed = 87112,
  971. octaves = 20,
  972. persist = 0.7
  973. },
  974. biomes = {
  975. "taiga_ocean",
  976. "snowy_grassland_ocean",
  977. "grassland_ocean",
  978. "coniferous_forest_ocean",
  979. "deciduous_forest_ocean",
  980. "sandstone_desert_ocean",
  981. "cold_desert_ocean"},
  982. y_max = -6,
  983. y_min = -16,
  984. flags = "force_placement",
  985. schematic = minetest.get_modpath("xocean") .. "/schems/tube.mts",
  986. param2 = 48,
  987. param2_max = 96,
  988. })
  989. minetest.register_decoration({
  990. name = "xocean:fire",
  991. deco_type = "schematic",
  992. place_on = {"default:sand"},
  993. place_offset_y = -1,
  994. sidelen = 2,
  995. noise_params = {
  996. offset = 0.0001,
  997. scale = 0.0001,
  998. spread = {x = 100000, y = 100000, z = 100000},
  999. seed = 87112,
  1000. octaves = 20,
  1001. persist = 0.7
  1002. },
  1003. biomes = {
  1004. "taiga_ocean",
  1005. "snowy_grassland_ocean",
  1006. "grassland_ocean",
  1007. "coniferous_forest_ocean",
  1008. "deciduous_forest_ocean",
  1009. "sandstone_desert_ocean",
  1010. "cold_desert_ocean"},
  1011. y_max = -6,
  1012. y_min = -16,
  1013. flags = "force_placement",
  1014. schematic = minetest.get_modpath("xocean") .. "/schems/fire.mts",
  1015. param2 = 48,
  1016. param2_max = 96,
  1017. })
  1018. minetest.register_decoration({
  1019. name = "xocean:brain2",
  1020. deco_type = "schematic",
  1021. place_on = {"default:sand"},
  1022. place_offset_y = -1,
  1023. sidelen = 2,
  1024. noise_params = {
  1025. offset = 0.0001,
  1026. scale = 0.001,
  1027. spread = {x = 100000, y = 100000, z = 100000},
  1028. seed = 87112,
  1029. octaves = 28,
  1030. persist = 0.7
  1031. },
  1032. biomes = {
  1033. "taiga_ocean",
  1034. "snowy_grassland_ocean",
  1035. "grassland_ocean",
  1036. "coniferous_forest_ocean",
  1037. "deciduous_forest_ocean",
  1038. "sandstone_desert_ocean",
  1039. "cold_desert_ocean"},
  1040. y_max = -6,
  1041. y_min = -16,
  1042. flags = "force_placement",
  1043. schematic = minetest.get_modpath("xocean") .. "/schems/brain2.mts",
  1044. param2 = 48,
  1045. param2_max = 96,
  1046. })
  1047. minetest.register_decoration({
  1048. name = "xocean:horn2",
  1049. deco_type = "schematic",
  1050. place_on = {"default:sand"},
  1051. place_offset_y = -1,
  1052. sidelen = 2,
  1053. noise_params = {
  1054. offset = 0.0001,
  1055. scale = 0.001,
  1056. spread = {x = 100000, y = 100000, z = 100000},
  1057. seed = 87112,
  1058. octaves = 28,
  1059. persist = 0.7
  1060. },
  1061. biomes = {
  1062. "taiga_ocean",
  1063. "snowy_grassland_ocean",
  1064. "grassland_ocean",
  1065. "coniferous_forest_ocean",
  1066. "deciduous_forest_ocean",
  1067. "sandstone_desert_ocean",
  1068. "cold_desert_ocean"},
  1069. y_max = -6,
  1070. y_min = -16,
  1071. flags = "force_placement",
  1072. schematic = minetest.get_modpath("xocean") .. "/schems/horn2.mts",
  1073. param2 = 48,
  1074. param2_max = 96,
  1075. })
  1076. minetest.register_decoration({
  1077. name = "xocean:bubble2",
  1078. deco_type = "schematic",
  1079. place_on = {"default:sand"},
  1080. place_offset_y = -1,
  1081. sidelen = 2,
  1082. noise_params = {
  1083. offset = 0.0001,
  1084. scale = 0.001,
  1085. spread = {x = 100000, y = 100000, z = 100000},
  1086. seed = 87112,
  1087. octaves = 28,
  1088. persist = 0.7
  1089. },
  1090. biomes = {
  1091. "taiga_ocean",
  1092. "snowy_grassland_ocean",
  1093. "grassland_ocean",
  1094. "coniferous_forest_ocean",
  1095. "deciduous_forest_ocean",
  1096. "sandstone_desert_ocean",
  1097. "cold_desert_ocean"},
  1098. y_max = -6,
  1099. y_min = -16,
  1100. flags = "force_placement",
  1101. schematic = minetest.get_modpath("xocean") .. "/schems/bubble2.mts",
  1102. param2 = 48,
  1103. param2_max = 96,
  1104. })
  1105. minetest.register_decoration({
  1106. name = "xocean:tube2",
  1107. deco_type = "schematic",
  1108. place_on = {"default:sand"},
  1109. place_offset_y = -1,
  1110. sidelen = 2,
  1111. noise_params = {
  1112. offset = 0.0001,
  1113. scale = 0.001,
  1114. spread = {x = 100000, y = 100000, z = 100000},
  1115. seed = 87112,
  1116. octaves = 28,
  1117. persist = 0.7
  1118. },
  1119. biomes = {
  1120. "taiga_ocean",
  1121. "snowy_grassland_ocean",
  1122. "grassland_ocean",
  1123. "coniferous_forest_ocean",
  1124. "deciduous_forest_ocean",
  1125. "sandstone_desert_ocean",
  1126. "cold_desert_ocean"},
  1127. y_max = -6,
  1128. y_min = -16,
  1129. flags = "force_placement",
  1130. schematic = minetest.get_modpath("xocean") .. "/schems/tube2.mts",
  1131. param2 = 48,
  1132. param2_max = 96,
  1133. })
  1134. minetest.register_decoration({
  1135. name = "xocean:fire2",
  1136. deco_type = "schematic",
  1137. place_on = {"default:sand"},
  1138. place_offset_y = -1,
  1139. sidelen = 2,
  1140. noise_params = {
  1141. offset = 0.0001,
  1142. scale = 0.001,
  1143. spread = {x = 100000, y = 100000, z = 100000},
  1144. seed = 87112,
  1145. octaves = 12,
  1146. persist = 0.7
  1147. },
  1148. biomes = {
  1149. "taiga_ocean",
  1150. "snowy_grassland_ocean",
  1151. "grassland_ocean",
  1152. "coniferous_forest_ocean",
  1153. "deciduous_forest_ocean",
  1154. "sandstone_desert_ocean",
  1155. "cold_desert_ocean"},
  1156. y_max = -6,
  1157. y_min = -16,
  1158. flags = "force_placement",
  1159. schematic = minetest.get_modpath("xocean") .. "/schems/fire2.mts",
  1160. param2 = 48,
  1161. param2_max = 96,
  1162. })
  1163. minetest.register_decoration({
  1164. name = "xocean:tube3",
  1165. deco_type = "schematic",
  1166. place_on = {"default:sand"},
  1167. place_offset_y = -1,
  1168. sidelen = 1 ,
  1169. noise_params = {
  1170. offset = 0.0001,
  1171. scale = 0.000001,
  1172. spread = {x = 100000, y = 100000, z = 100000},
  1173. seed = 87112,
  1174. octaves = 20,
  1175. persist = 0.7
  1176. },
  1177. biomes = {
  1178. "taiga_ocean",
  1179. "snowy_grassland_ocean",
  1180. "grassland_ocean",
  1181. "coniferous_forest_ocean",
  1182. "deciduous_forest_ocean",
  1183. "sandstone_desert_ocean",
  1184. "cold_desert_ocean"},
  1185. y_max = -6,
  1186. y_min = -16,
  1187. flags = "force_placement",
  1188. schematic = minetest.get_modpath("xocean") .. "/schems/tube3.mts",
  1189. param2 = 48,
  1190. param2_max = 96,
  1191. })
  1192. minetest.register_decoration({
  1193. name = "xocean:brain3",
  1194. deco_type = "schematic",
  1195. place_on = {"default:sand"},
  1196. place_offset_y = -1,
  1197. sidelen = 1,
  1198. noise_params = {
  1199. offset = 0.0001,
  1200. scale = 0.000001,
  1201. spread = {x = 100000, y = 100000, z = 100000},
  1202. seed = 87112,
  1203. octaves = 25,
  1204. persist = 0.7
  1205. },
  1206. biomes = {
  1207. "taiga_ocean",
  1208. "snowy_grassland_ocean",
  1209. "grassland_ocean",
  1210. "coniferous_forest_ocean",
  1211. "deciduous_forest_ocean",
  1212. "sandstone_desert_ocean",
  1213. "cold_desert_ocean"},
  1214. y_max = -6,
  1215. y_min = -16,
  1216. flags = "force_placement",
  1217. schematic = minetest.get_modpath("xocean") .. "/schems/brain3.mts",
  1218. param2 = 48,
  1219. param2_max = 96,
  1220. })
  1221. minetest.register_decoration({
  1222. name = "xocean:seagrass",
  1223. deco_type = "simple",
  1224. place_on = {"default:sand"},
  1225. place_offset_y = -1,
  1226. sidelen = 16,
  1227. noise_params = {
  1228. offset = -0.04,
  1229. scale = 0.4,
  1230. spread = {x = 200, y = 200, z = 200},
  1231. seed = 87112,
  1232. octaves = 3,
  1233. persist = 0.7
  1234. },
  1235. biomes = {
  1236. "taiga_ocean",
  1237. "snowy_grassland_ocean",
  1238. "grassland_ocean",
  1239. "coniferous_forest_ocean",
  1240. "deciduous_forest_ocean",
  1241. "sandstone_desert_ocean",
  1242. "cold_desert_ocean"},
  1243. y_max = -5,
  1244. y_min = -50,
  1245. flags = "force_placement",
  1246. decoration = "xocean:seagrass",
  1247. param2 = 48,
  1248. param2_max = 96,
  1249. })
  1250. minetest.register_decoration({
  1251. name = "xocean:fire_plant_dead",
  1252. deco_type = "simple",
  1253. place_on = {"xocean:brain_block","xocean:tube_block","default:coral_orange","default:coral_brown","xocean:bubble_block"},
  1254. place_offset_y = -1,
  1255. sidelen = 16,
  1256. noise_params = {
  1257. offset = -0.04,
  1258. scale = 1.0,
  1259. spread = {x = 20, y = 20, z = 20},
  1260. seed = 87112,
  1261. octaves = 3,
  1262. persist = 0.7
  1263. },
  1264. biomes = {
  1265. "taiga_ocean",
  1266. "snowy_grassland_ocean",
  1267. "grassland_ocean",
  1268. "coniferous_forest_ocean",
  1269. "deciduous_forest_ocean",
  1270. "sandstone_desert_ocean",
  1271. "cold_desert_ocean"},
  1272. y_max = -5,
  1273. y_min = -50,
  1274. flags = "force_placement",
  1275. decoration = "xocean:skeleton_fire",
  1276. param2 = 48,
  1277. param2_max = 96,
  1278. })
  1279. minetest.register_decoration({
  1280. name = "xocean:horn_plant_dead",
  1281. deco_type = "simple",
  1282. place_on = {"xocean:brain_block","xocean:tube_block","default:coral_orange","default:coral_brown","xocean:bubble_block"},
  1283. place_offset_y = -1,
  1284. sidelen = 16,
  1285. noise_params = {
  1286. offset = -0.04,
  1287. scale = 1.0,
  1288. spread = {x = 20, y = 20, z = 20},
  1289. seed = 87112,
  1290. octaves = 3,
  1291. persist = 0.7
  1292. },
  1293. biomes = {
  1294. "taiga_ocean",
  1295. "snowy_grassland_ocean",
  1296. "grassland_ocean",
  1297. "coniferous_forest_ocean",
  1298. "deciduous_forest_ocean",
  1299. "sandstone_desert_ocean",
  1300. "cold_desert_ocean"},
  1301. y_max = -5,
  1302. y_min = -50,
  1303. flags = "force_placement",
  1304. decoration = "xocean:skeleton_horn",
  1305. param2 = 48,
  1306. param2_max = 96,
  1307. })
  1308. minetest.register_decoration({
  1309. name = "xocean:bubble_plant_skeleton",
  1310. deco_type = "simple",
  1311. place_on = {"xocean:brain_block","xocean:tube_block","default:coral_orange","default:coral_brown","xocean:bubble_block"},
  1312. place_offset_y = -1,
  1313. sidelen = 16,
  1314. noise_params = {
  1315. offset = -0.04,
  1316. scale = 1.0,
  1317. spread = {x = 20, y = 20, z = 20},
  1318. seed = 87112,
  1319. octaves = 3,
  1320. persist = 0.7
  1321. },
  1322. biomes = {
  1323. "taiga_ocean",
  1324. "snowy_grassland_ocean",
  1325. "grassland_ocean",
  1326. "coniferous_forest_ocean",
  1327. "deciduous_forest_ocean",
  1328. "sandstone_desert_ocean",
  1329. "cold_desert_ocean"},
  1330. y_max = -5,
  1331. y_min = -50,
  1332. flags = "force_placement",
  1333. decoration = "xocean:skeleton_bubble",
  1334. param2 = 48,
  1335. param2_max = 96,
  1336. })
  1337. minetest.register_decoration({
  1338. name = "xocean:brain_plant_skeleton",
  1339. deco_type = "simple",
  1340. place_on = {"xocean:brain_block","xocean:tube_block","default:coral_orange","default:coral_brown","xocean:bubble_block"},
  1341. place_offset_y = -1,
  1342. sidelen = 16,
  1343. noise_params = {
  1344. offset = -0.04,
  1345. scale = 1.0,
  1346. spread = {x = 20, y = 20, z = 20},
  1347. seed = 87112,
  1348. octaves = 3,
  1349. persist = 0.7
  1350. },
  1351. biomes = {
  1352. "taiga_ocean",
  1353. "snowy_grassland_ocean",
  1354. "grassland_ocean",
  1355. "coniferous_forest_ocean",
  1356. "deciduous_forest_ocean",
  1357. "sandstone_desert_ocean",
  1358. "cold_desert_ocean"},
  1359. y_max = -5,
  1360. y_min = -50,
  1361. flags = "force_placement",
  1362. decoration = "xocean:skeleton_brain",
  1363. param2 = 48,
  1364. param2_max = 96,
  1365. })
  1366. minetest.register_decoration({
  1367. name = "xocean:tube_plant",
  1368. deco_type = "simple",
  1369. place_on = {"xocean:brain_block","xocean:tube_block","default:coral_orange","default:coral_brown","xocean:bubble_block"},
  1370. place_offset_y = -1,
  1371. sidelen = 16,
  1372. noise_params = {
  1373. offset = -0.04,
  1374. scale = 1.0,
  1375. spread = {x = 20, y = 20, z = 20},
  1376. seed = 87112,
  1377. octaves = 3,
  1378. persist = 0.7
  1379. },
  1380. biomes = {
  1381. "taiga_ocean",
  1382. "snowy_grassland_ocean",
  1383. "grassland_ocean",
  1384. "coniferous_forest_ocean",
  1385. "deciduous_forest_ocean",
  1386. "sandstone_desert_ocean",
  1387. "cold_desert_ocean"},
  1388. y_max = -5,
  1389. y_min = -50,
  1390. flags = "force_placement",
  1391. decoration = "xocean:skeleton_tube",
  1392. param2 = 48,
  1393. param2_max = 96,
  1394. })
  1395. minetest.register_decoration({
  1396. name = "xocean:fire_plant",
  1397. deco_type = "simple",
  1398. place_on = {"xocean:brain_block","xocean:tube_block","default:coral_orange","default:coral_brown","xocean:bubble_block"},
  1399. place_offset_y = -1,
  1400. sidelen = 16,
  1401. noise_params = {
  1402. offset = -0.04,
  1403. scale = 1.0,
  1404. spread = {x = 20, y = 20, z = 20},
  1405. seed = 87112,
  1406. octaves = 3,
  1407. persist = 0.7
  1408. },
  1409. biomes = {
  1410. "taiga_ocean",
  1411. "snowy_grassland_ocean",
  1412. "grassland_ocean",
  1413. "coniferous_forest_ocean",
  1414. "deciduous_forest_ocean",
  1415. "sandstone_desert_ocean",
  1416. "cold_desert_ocean"},
  1417. y_max = -5,
  1418. y_min = -50,
  1419. flags = "force_placement",
  1420. decoration = "xocean:fire",
  1421. param2 = 48,
  1422. param2_max = 96,
  1423. })
  1424. minetest.register_decoration({
  1425. name = "xocean:horn_plant",
  1426. deco_type = "simple",
  1427. place_on = {"xocean:brain_block","xocean:tube_block","default:coral_orange","default:coral_brown","xocean:bubble_block"},
  1428. place_offset_y = -1,
  1429. sidelen = 16,
  1430. noise_params = {
  1431. offset = -0.04,
  1432. scale = 1.0,
  1433. spread = {x = 20, y = 20, z = 20},
  1434. seed = 87112,
  1435. octaves = 3,
  1436. persist = 0.7
  1437. },
  1438. biomes = {
  1439. "taiga_ocean",
  1440. "snowy_grassland_ocean",
  1441. "grassland_ocean",
  1442. "coniferous_forest_ocean",
  1443. "deciduous_forest_ocean",
  1444. "sandstone_desert_ocean",
  1445. "cold_desert_ocean"},
  1446. y_max = -5,
  1447. y_min = -50,
  1448. flags = "force_placement",
  1449. decoration = "xocean:horn",
  1450. param2 = 48,
  1451. param2_max = 96,
  1452. })
  1453. minetest.register_decoration({
  1454. name = "xocean:bubble_plant",
  1455. deco_type = "simple",
  1456. place_on = {"xocean:brain_block","xocean:tube_block","default:coral_orange","default:coral_brown","xocean:bubble_block"},
  1457. place_offset_y = -1,
  1458. sidelen = 16,
  1459. noise_params = {
  1460. offset = -0.04,
  1461. scale = 1.0,
  1462. spread = {x = 20, y = 20, z = 20},
  1463. seed = 87112,
  1464. octaves = 3,
  1465. persist = 0.7
  1466. },
  1467. biomes = {
  1468. "taiga_ocean",
  1469. "snowy_grassland_ocean",
  1470. "grassland_ocean",
  1471. "coniferous_forest_ocean",
  1472. "deciduous_forest_ocean",
  1473. "sandstone_desert_ocean",
  1474. "cold_desert_ocean"},
  1475. y_max = -5,
  1476. y_min = -50,
  1477. flags = "force_placement",
  1478. decoration = "xocean:bubble",
  1479. param2 = 48,
  1480. param2_max = 96,
  1481. })
  1482. minetest.register_decoration({
  1483. name = "xocean:brain_plant",
  1484. deco_type = "simple",
  1485. place_on = {"xocean:brain_block","xocean:tube_block","default:coral_orange","default:coral_brown","xocean:bubble_block"},
  1486. place_offset_y = -1,
  1487. sidelen = 16,
  1488. noise_params = {
  1489. offset = -0.04,
  1490. scale = 1.0,
  1491. spread = {x = 20, y = 20, z = 20},
  1492. seed = 87112,
  1493. octaves = 3,
  1494. persist = 0.7
  1495. },
  1496. biomes = {
  1497. "taiga_ocean",
  1498. "snowy_grassland_ocean",
  1499. "grassland_ocean",
  1500. "coniferous_forest_ocean",
  1501. "deciduous_forest_ocean",
  1502. "sandstone_desert_ocean",
  1503. "cold_desert_ocean"},
  1504. y_max = -5,
  1505. y_min = -50,
  1506. flags = "force_placement",
  1507. decoration = "default:coral_pink",
  1508. param2 = 48,
  1509. param2_max = 96,
  1510. })
  1511. minetest.register_decoration({
  1512. name = "xocean:tube_plant",
  1513. deco_type = "simple",
  1514. place_on = {"xocean:brain_block","xocean:tube_block","default:coral_orange","default:coral_brown","xocean:bubble_block"},
  1515. place_offset_y = -1,
  1516. sidelen = 16,
  1517. noise_params = {
  1518. offset = -0.04,
  1519. scale = 1.0,
  1520. spread = {x = 20, y = 20, z = 20},
  1521. seed = 87112,
  1522. octaves = 3,
  1523. persist = 0.7
  1524. },
  1525. biomes = {
  1526. "taiga_ocean",
  1527. "snowy_grassland_ocean",
  1528. "grassland_ocean",
  1529. "coniferous_forest_ocean",
  1530. "deciduous_forest_ocean",
  1531. "sandstone_desert_ocean",
  1532. "cold_desert_ocean"},
  1533. y_max = -5,
  1534. y_min = -50,
  1535. flags = "force_placement",
  1536. decoration = "default:coral_cyan",
  1537. param2 = 48,
  1538. param2_max = 96,
  1539. })
  1540. minetest.register_decoration({
  1541. name = "xocean:pickle",
  1542. deco_type = "simple",
  1543. place_on = {"default:sand"},
  1544. place_offset_y = -1,
  1545. sidelen = 16,
  1546. noise_params = {
  1547. offset = -0.04,
  1548. scale = 0.04,
  1549. spread = {x = 200, y = 200, z = 200},
  1550. seed = 87112,
  1551. octaves = 3,
  1552. persist = 0.7
  1553. },
  1554. biomes = {
  1555. "taiga_ocean",
  1556. "snowy_grassland_ocean",
  1557. "grassland_ocean",
  1558. "coniferous_forest_ocean",
  1559. "deciduous_forest_ocean",
  1560. "sandstone_desert_ocean",
  1561. "cold_desert_ocean"},
  1562. y_max = -8,
  1563. y_min = -50,
  1564. flags = "force_placement",
  1565. decoration = "xocean:pickle",
  1566. param2 = 48,
  1567. param2_max = 96,
  1568. })
  1569. ---Mobs
  1570. if minetest.get_modpath("mobs") then
  1571. local l_water_level = minetest.setting_get("water_level") - 2
  1572. mobs:register_mob("xocean:dolphin", {
  1573. type = "animal",
  1574. attack_type = "dogfight",
  1575. damage = 1,
  1576. visual_size = {x = 15, y = 15, z= 15},
  1577. reach = 3,
  1578. hp_min = 20,
  1579. hp_max = 20,
  1580. armor = 100,
  1581. collisionbox = {-0.75, -0.5, -0.75, 0.75, 0.5, 0.75},
  1582. visual = "mesh",
  1583. mesh = "dolphin.b3d",
  1584. textures = {
  1585. {"mobs_dolphin.png"}
  1586. },
  1587. drops = {
  1588. {name = "mobs:meat_raw", chance = 1, min = 2, max = 4},
  1589. },
  1590. makes_footstep_sound = false,
  1591. walk_velocity = 4,
  1592. run_velocity = 6,
  1593. fly = true,
  1594. fly_in = "default:water_source",
  1595. fall_speed = 0,
  1596. rotate = 90,
  1597. view_range = 30,
  1598. water_damage = 0,
  1599. lava_damage = 10,
  1600. jump = false,
  1601. stepheight = 0.1,
  1602. light_damage = 0,
  1603. animation = {
  1604. speed_normal = 15,
  1605. speed_run = 25,
  1606. stand_start = 40,
  1607. stand_end = 100,
  1608. walk_start = 40,
  1609. walk_end = 100,
  1610. run_start = 40,
  1611. run_end = 100,
  1612. },
  1613. })
  1614. mobs:spawn_specific("xocean:dolphin", {"default:water_source"}, {"default:water_flowing","default:water_source"}, 5, 20, 30, 10000, 2, -31000, l_water_level)
  1615. mobs:register_egg("xocean:dolphin", "Dolphin", "xocean_stone.png", 1)
  1616. mobs:register_mob("xocean:fish", {
  1617. type = "animal",
  1618. hp_min = 5,
  1619. hp_max = 5,
  1620. armor = 100,
  1621. visual_size = {x = 2, y = 2, z= 2},
  1622. collisionbox = {-0.25, -0.2, -0.25, 0.25, 0.2, 0.25},
  1623. visual = "mesh",
  1624. mesh = "fishy.b3d",
  1625. textures = {
  1626. {"mobs_fishy.png"},
  1627. {"mobs_fishy1.png"},
  1628. {"mobs_fishy2.png"},
  1629. {"mobs_fishy3.png"}
  1630. },
  1631. drops = {
  1632. {name = "xocean:fish_edible", chance = 1, min = 1, max = 1},
  1633. },
  1634. makes_footstep_sound = false,
  1635. walk_velocity = 2,
  1636. run_velocity = 3,
  1637. fly = true,
  1638. fly_in = "default:water_source",
  1639. fall_speed = 0,
  1640. view_range = 30,
  1641. water_damage = 0,
  1642. lava_damage = 10,
  1643. light_damage = 0,
  1644. animation = {
  1645. speed_normal = 15,
  1646. speed_run = 25,
  1647. stand_start = 40,
  1648. stand_end = 100,
  1649. walk_start = 40,
  1650. walk_end = 100,
  1651. run_start = 40,
  1652. run_end = 100,
  1653. },
  1654. })
  1655. mobs:spawn_specific("xocean:fish", {"default:water_source"}, {"default:water_flowing","default:water_source"}, 2, 20, 30, 10000, 5, -31000, l_water_level)
  1656. mobs:register_egg("xocean:fish", "Tropical Fish (Kob)", "xocean_fish.png", 0)
  1657. mobs:register_mob("xocean:fish2", {
  1658. type = "animal",
  1659. hp_min = 5,
  1660. hp_max = 5,
  1661. armor = 100,
  1662. visual_size = {x = 2, y = 2, z= 2},
  1663. collisionbox = {-0.25, -0.2, -0.25, 0.25, 0.2, 0.25},
  1664. visual = "mesh",
  1665. mesh = "fishy.b3d",
  1666. textures = {
  1667. {"mobs_fishy4.png"},
  1668. {"mobs_fishy5.png"},
  1669. {"mobs_fishy6.png"}
  1670. },
  1671. drops = {
  1672. {name = "xocean:fish_edible", chance = 2, min = 1, max = 2},
  1673. },
  1674. makes_footstep_sound = false,
  1675. walk_velocity = 2,
  1676. run_velocity = 3,
  1677. fly = true,
  1678. fly_in = "default:water_source",
  1679. fall_speed = 0,
  1680. view_range = 30,
  1681. water_damage = 0,
  1682. lava_damage = 10,
  1683. light_damage = 0,
  1684. animation = {
  1685. speed_normal = 15,
  1686. speed_run = 25,
  1687. stand_start = 40,
  1688. stand_end = 100,
  1689. walk_start = 40,
  1690. walk_end = 100,
  1691. run_start = 40,
  1692. run_end = 100,
  1693. },
  1694. })
  1695. mobs:spawn_specific("xocean:fish2", {"default:water_source"}, {"default:water_flowing","default:water_source"}, 2, 20, 30, 10000, 5, -31000, l_water_level)
  1696. mobs:register_egg("xocean:fish2", "Tropical Fish (SunStreak)", "xocean_fish2.png", 0)
  1697. mobs:register_mob("xocean:fish3", {
  1698. type = "animal",
  1699. hp_min = 5,
  1700. hp_max = 5,
  1701. armor = 100,
  1702. visual_size = {x = 2, y = 2, z= 2},
  1703. collisionbox = {-0.25, -0.2, -0.25, 0.25, 0.2, 0.25},
  1704. visual = "mesh",
  1705. mesh = "fishy.b3d",
  1706. textures = {
  1707. {"mobs_fishy7.png"},
  1708. {"mobs_fishy8.png"},
  1709. {"mobs_fishy9.png"}
  1710. },
  1711. drops = {
  1712. {name = "xocean:fish_edible", chance = 2, min = 1, max = 2},
  1713. },
  1714. makes_footstep_sound = false,
  1715. walk_velocity = 2,
  1716. run_velocity = 3,
  1717. fly = true,
  1718. fly_in = "default:water_source",
  1719. fall_speed = 0,
  1720. view_range = 30,
  1721. water_damage = 0,
  1722. lava_damage = 10,
  1723. light_damage = 0,
  1724. animation = {
  1725. speed_normal = 15,
  1726. speed_run = 25,
  1727. stand_start = 40,
  1728. stand_end = 100,
  1729. walk_start = 40,
  1730. walk_end = 100,
  1731. run_start = 40,
  1732. run_end = 100,
  1733. },
  1734. })
  1735. mobs:spawn_specific("xocean:fish3", {"default:water_source"}, {"default:water_flowing","default:water_source"}, 2, 20, 30, 10000, 5, -31000, l_water_level)
  1736. mobs:register_egg("xocean:fish3", "Tropical Fish (Dasher)", "xocean_fish3.png", 0)
  1737. mobs:register_mob("xocean:fish4", {
  1738. type = "animal",
  1739. hp_min = 5,
  1740. hp_max = 5,
  1741. armor = 100,
  1742. visual_size = {x = 2, y = 2, z= 2},
  1743. collisionbox = {-0.25, -0.2, -0.25, 0.25, 0.2, 0.25},
  1744. visual = "mesh",
  1745. mesh = "fishy.b3d",
  1746. textures = {
  1747. {"mobs_fishy10.png"},
  1748. {"mobs_fishy11.png"},
  1749. {"mobs_fishy12.png"}
  1750. },
  1751. drops = {
  1752. {name = "xocean:fish_edible", chance = 2, min = 1, max = 2},
  1753. },
  1754. makes_footstep_sound = false,
  1755. walk_velocity = 2,
  1756. run_velocity = 3,
  1757. fly = true,
  1758. fly_in = "default:water_source",
  1759. fall_speed = 0,
  1760. view_range = 30,
  1761. water_damage = 0,
  1762. lava_damage = 10,
  1763. light_damage = 0,
  1764. animation = {
  1765. speed_normal = 15,
  1766. speed_run = 25,
  1767. stand_start = 40,
  1768. stand_end = 100,
  1769. walk_start = 40,
  1770. walk_end = 100,
  1771. run_start = 40,
  1772. run_end = 100,
  1773. },
  1774. })
  1775. mobs:spawn_specific("xocean:fish4", {"default:water_source"}, {"default:water_flowing","default:water_source"}, 2, 20, 30, 10000, 5, -31000, l_water_level)
  1776. mobs:register_egg("xocean:fish4", "Tropical Fish (Snapper)", "xocean_fish4.png", 0)
  1777. end