From 4d0ee10f29786635ef9eae9b784e6a9ba7cc148f Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Mon, 18 Mar 2019 09:44:53 +0000 Subject: [PATCH] detect and add mt5.0 coral reefs --- mapgen.lua | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/mapgen.lua b/mapgen.lua index c46f781..2adaf45 100644 --- a/mapgen.lua +++ b/mapgen.lua @@ -1113,3 +1113,61 @@ if minetest.get_modpath("fireflies") then decoration = "fireflies:hidden_firefly", }) end + +-- Coral Reef (Minetest 5.0) +if minetest.registered_nodes["default:coral_green"] then + minetest.register_decoration({ + name = "default:corals", + deco_type = "simple", + place_on = {"default:sand"}, + place_offset_y = -1, + sidelen = 4, + noise_params = { + offset = -4, + scale = 4, + spread = {x = 50, y = 50, z = 50}, + seed = 7013, + octaves = 3, + persist = 0.7, + }, + biomes = { + "desert_ocean", + "savanna_ocean", + "junglee_ocean", + }, + y_max = -2, + y_min = -8, + flags = "force_placement", + decoration = { + "default:coral_green", "default:coral_pink", + "default:coral_cyan", "default:coral_brown", + "default:coral_orange", "default:coral_skeleton", + }, + }) + + -- Kelp + + minetest.register_decoration({ + name = "default:kelp", + deco_type = "simple", + place_on = {"default:sand"}, + place_offset_y = -1, + sidelen = 16, + noise_params = { + offset = -0.04, + scale = 0.1, + spread = {x = 200, y = 200, z = 200}, + seed = 87112, + octaves = 3, + persist = 0.7 + }, + biomes = { + "frost_ocean", "grassy_ocean", "sandstone_ocean", "swamp_ocean"}, + y_max = -5, + y_min = -10, + flags = "force_placement", + decoration = "default:sand_with_kelp", + param2 = 48, + param2_max = 96, + }) +end