From 07e67644e2726f668c9be714559e906c024a231b Mon Sep 17 00:00:00 2001 From: D00Med Date: Thu, 19 Jan 2017 06:43:29 +1000 Subject: [PATCH] D00Med's update 19.1.17 >added stalagmites and stalagtites >added swamp biome >jungle grass is now generated --- mods/mapgen/mapgen.lua | 116 +++++- mods/mapgen/nodes.lua | 425 +++++++++++++++----- mods/mapgen/textures/mapgen_duckweed.png | Bin 0 -> 325 bytes mods/mapgen/textures/mapgen_stalagmite0.png | Bin 0 -> 458 bytes mods/mapgen/textures/mapgen_stalagmite1.png | Bin 0 -> 449 bytes mods/mapgen/textures/mapgen_stalagmite2.png | Bin 0 -> 958 bytes mods/mapgen/textures/mapgen_stalagmite3.png | Bin 0 -> 902 bytes 7 files changed, 435 insertions(+), 106 deletions(-) create mode 100644 mods/mapgen/textures/mapgen_duckweed.png create mode 100644 mods/mapgen/textures/mapgen_stalagmite0.png create mode 100644 mods/mapgen/textures/mapgen_stalagmite1.png create mode 100644 mods/mapgen/textures/mapgen_stalagmite2.png create mode 100644 mods/mapgen/textures/mapgen_stalagmite3.png diff --git a/mods/mapgen/mapgen.lua b/mods/mapgen/mapgen.lua index 0ea796c..db3f8b4 100644 --- a/mods/mapgen/mapgen.lua +++ b/mods/mapgen/mapgen.lua @@ -91,6 +91,27 @@ }, }) + --swamp water + + minetest.register_ore({ + ore_type = "blob", + ore = "mapgen:dirty_water_source", + wherein = {"mapgen:dirt_with_swampgrass"}, + clust_scarcity = 9 * 9 * 9, + clust_size = 8, + y_min = -31000, + y_max = 31000, + noise_threshold = 0.0, + noise_params = { + offset = 0.5, + scale = 0.2, + spread = {x = 5, y = 5, z = 5}, + seed = 766, + octaves = 1, + persist = 0.0 + }, + }) + --new stone minetest.register_ore({ @@ -409,6 +430,25 @@ minetest.clear_registered_biomes() + --Swamp + minetest.register_biome({ + name = "swamp", + --node_dust = "", + node_top = "mapgen:dirt_with_swampgrass", + depth_top = 3, + node_filler = "default:dirt", + depth_filler = 3, + --node_stone = "", + node_water_top = "mapgen:dirty_water_source", + depth_water_top = 1, + --node_water = "", + --node_river_water = "", + y_min = 1, + y_max = 21000, + heat_point = 40, + humidity_point = 0, +}) + -- Icesheet minetest.register_biome({ @@ -888,7 +928,7 @@ }) -- Cold desert - + --[[ minetest.register_biome({ name = "cold_desert", --node_dust = "", @@ -928,6 +968,7 @@ heat_point = 40, humidity_point = 0, }) + ]] -- Savanna @@ -1120,6 +1161,26 @@ local function register_dry_grass_decoration(offset, scale, length) }) end +local function register_jungle_grass_decoration(offset, scale, length) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"mapgen:dirt_with_junglegrass", "default:dirt"}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"rainforest", "rainforest_swamp", "rainforest_ocean",}, + y_min = 1, + y_max = 31000, + decoration = "default:grass_" .. length, + }) +end + minetest.clear_registered_decorations() @@ -1602,6 +1663,14 @@ minetest.register_decoration({ register_grass_decoration(0.015, 0.045, 2) register_grass_decoration(0.03, 0.03, 1) + --Jungle grasses + + register_grass_decoration(-0.03, 0.09, 5) + register_grass_decoration(-0.015, 0.075, 4) + register_grass_decoration(0, 0.06, 3) + register_grass_decoration(0.015, 0.045, 2) + register_grass_decoration(0.03, 0.03, 1) + -- Dry grasses register_dry_grass_decoration(0.01, 0.05, 5) @@ -1706,3 +1775,48 @@ minetest.register_decoration({ flags = "place_center_x, place_center_z", }) +minetest.register_on_generated(function(minp, maxp) + if maxp.y < -50 or maxp.y > 10 then + return + end + local dirt = minetest.find_nodes_in_area(minp, maxp, + {"default:stone"}) + for n = 1, #dirt do + if math.random(1, 50) == 1 then + local pos = {x = dirt[n].x, y = dirt[n].y, z = dirt[n].z } + if minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name == "air" then + if math.random(1,2) == 1 then + minetest.add_node({x=pos.x, y=pos.y-1, z=pos.z}, {name = "mapgen:stalagtite"}) + elseif math.random(1,2) == 1 then + minetest.add_node({x=pos.x, y=pos.y-1, z=pos.z}, {name = "mapgen:stalagtite1"}) + elseif math.random(1,2) == 1 then + minetest.add_node({x=pos.x, y=pos.y-1, z=pos.z}, {name = "mapgen:stalagtite2"}) + else + minetest.add_node({x=pos.x, y=pos.y-1, z=pos.z}, {name = "mapgen:stalagtite3"}) + end + end + end + end +end) + +minetest.register_on_generated(function(minp, maxp) + if maxp.y < -150 or maxp.y > 20 then + return + end + local dirt = minetest.find_nodes_in_area(minp, maxp, + {"default:stone"}) + for n = 1, #dirt do + if math.random(1, 50) == 1 then + local pos = {x = dirt[n].x, y = dirt[n].y, z = dirt[n].z } + if minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name == "air" and pos.y >= -100 then + if math.random(1,2) == 1 then + minetest.add_node({x=pos.x, y=pos.y+1, z=pos.z}, {name = "mapgen:stalagmite0"}) + elseif math.random(1,2) == 1 then + minetest.add_node({x=pos.x, y=pos.y+1, z=pos.z}, {name = "mapgen:stalagmite1"}) + else + minetest.add_node({x=pos.x, y=pos.y+1, z=pos.z}, {name = "mapgen:stalagmite2"}) + end + end + end + end +end) \ No newline at end of file diff --git a/mods/mapgen/nodes.lua b/mods/mapgen/nodes.lua index d1db0df..e466327 100644 --- a/mods/mapgen/nodes.lua +++ b/mods/mapgen/nodes.lua @@ -341,6 +341,219 @@ minetest.register_node("mapgen:flame_lily", { walkable = false, }) +minetest.register_node("mapgen:jungle_grass_1", { + description = "Jungle Grass", + drawtype = "plantlike", + tiles = {"mapgen_jungle_grass_1.png"}, + paramtype = "light", + is_ground_content = false, + buildable_to = true, + sunlight_propagates = true, + drop = "mapgen:jungle_grass_5", + inventory_image = "mapgen_jungle_grass_1.png", + groups = {snappy=3, flammable=1, attatched_node=1, flora=1, not_in_creative_inventory=1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5} + }, + walkable = false, +}) + +minetest.register_node("mapgen:jungle_grass_2", { + description = "Jungle Grass", + drawtype = "plantlike", + tiles = {"mapgen_jungle_grass_2.png"}, + paramtype = "light", + is_ground_content = false, + buildable_to = true, + sunlight_propagates = true, + drop = "mapgen:jungle_grass_5", + inventory_image = "mapgen_jungle_grass_2.png", + groups = {snappy=3, flammable=1, attatched_node=1, flora=1, not_in_creative_inventory=1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5} + }, + walkable = false, +}) + +minetest.register_node("mapgen:jungle_grass_3", { + description = "Jungle Grass", + drawtype = "plantlike", + tiles = {"mapgen_jungle_grass_3.png"}, + paramtype = "light", + is_ground_content = false, + buildable_to = true, + sunlight_propagates = true, + drop = "mapgen:jungle_grass_5", + inventory_image = "mapgen_jungle_grass_3.png", + groups = {snappy=3, flammable=1, attatched_node=1, flora=1, not_in_creative_inventory=1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5} + }, + walkable = false, +}) + +minetest.register_node("mapgen:jungle_grass_4", { + description = "Jungle Grass", + drawtype = "plantlike", + tiles = {"mapgen_jungle_grass_4.png"}, + paramtype = "light", + is_ground_content = false, + buildable_to = true, + sunlight_propagates = true, + drop = "mapgen:jungle_grass_5", + inventory_image = "mapgen_jungle_grass_4.png", + groups = {snappy=3, flammable=1, attatched_node=1, flora=1, not_in_creative_inventory=1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5} + }, + walkable = false, +}) + +minetest.register_node("mapgen:jungle_grass_5", { + description = "Jungle Grass", + drawtype = "plantlike", + tiles = {"mapgen_jungle_grass_5.png"}, + paramtype = "light", + is_ground_content = false, + buildable_to = true, + sunlight_propagates = true, + drop = "mapgen:jungle_grass_5", + inventory_image = "mapgen_jungle_grass_5.png", + groups = {snappy=3, flammable=1, attatched_node=1, flora=1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5} + }, + walkable = false, + on_construct = function(pos) + local num = math.random(1,5) + minetest.env:set_node(pos, {name="mapgen:jungle_grass_"..num}) + end, +}) + +minetest.register_node("mapgen:stalagtite", { + description = "Stalagtite", + drawtype = "plantlike", + tiles = {"mapgen_stalagmite0.png"}, + inventory_image = "mapgen_stalagmite0.png", + is_ground_content = false, + sunlight_propagates = true, + paramtype = "light", + selection_box = { + type = "fixed", + fixed = {{-0.3, -0.2, -0.3, 0.3, 0.5, 0.3}} + }, + groups = {crumbly=1, oddly_breakable_by_hand=1}, + sounds = default.node_sound_stone_defaults() +}) + +minetest.register_node("mapgen:stalagtite1", { + description = "Stalagtite", + drawtype = "plantlike", + tiles = {"mapgen_stalagmite1.png"}, + inventory_image = "mapgen_stalagmite1.png", + is_ground_content = false, + sunlight_propagates = true, + paramtype = "light", + selection_box = { + type = "fixed", + fixed = {{-0.3, -0.2, -0.3, 0.3, 0.5, 0.3}} + }, + groups = {crumbly=1, oddly_breakable_by_hand=1}, +}) + +minetest.register_node("mapgen:stalagtite2", { + description = "Stalagtite", + drawtype = "plantlike", + tiles = {"mapgen_stalagmite2.png"}, + inventory_image = "mapgen_stalagmite2.png", + is_ground_content = false, + sunlight_propagates = true, + paramtype = "light", + selection_box = { + type = "fixed", + fixed = {{-0.3, -0.2, -0.3, 0.3, 0.5, 0.3}} + }, + groups = {crumbly=1, oddly_breakable_by_hand=1}, + sounds = default.node_sound_stone_defaults() +}) + +minetest.register_node("mapgen:stalagtite3", { + description = "Stalagtite", + drawtype = "plantlike", + tiles = {"mapgen_stalagmite3.png"}, + inventory_image = "mapgen_stalagmite3.png", + is_ground_content = false, + sunlight_propagates = true, + paramtype = "light", + selection_box = { + type = "fixed", + fixed = {{-0.3, -0.2, -0.3, 0.3, 0.5, 0.3}} + }, + groups = {crumbly=1, oddly_breakable_by_hand=1}, + sounds = default.node_sound_stone_defaults() +}) + +minetest.register_node("mapgen:stalagmite0", { + description = "Stalagmite", + drawtype = "plantlike", + tiles = {"mapgen_stalagmite0.png^[transformFY"}, + inventory_image = "mapgen_stalagmite0.png^[transformFY", + is_ground_content = false, + sunlight_propagates = true, + paramtype = "light", + selection_box = { + type = "fixed", + fixed = {{-0.3, -0.2, -0.3, 0.3, 0.5, 0.3}} + }, + groups = {crumbly=1, oddly_breakable_by_hand=1}, + sounds = default.node_sound_stone_defaults() +}) + +minetest.register_node("mapgen:stalagmite1", { + description = "Stalagmite", + drawtype = "plantlike", + visual_scale = 1.5, + tiles = {"mapgen_stalagmite3.png^[transformFY"}, + inventory_image = "mapgen_stalagmite3.png^[transformFY", + is_ground_content = false, + sunlight_propagates = true, + paramtype = "light", + selection_box = { + type = "fixed", + fixed = {{-0.3, -0.2, -0.3, 0.3, 0.5, 0.3}} + }, + groups = {crumbly=1, oddly_breakable_by_hand=1}, + sounds = default.node_sound_stone_defaults() +}) + +minetest.register_node("mapgen:stalagmite2", { + description = "Stalagmite", + drawtype = "plantlike", + visual_scale = 1.5, + tiles = {"mapgen_stalagmite2.png^[transformFY"}, + inventory_image = "mapgen_stalagmite2.png^[transformFY", + is_ground_content = false, + sunlight_propagates = true, + paramtype = "light", + selection_box = { + type = "fixed", + fixed = {{-0.3, -0.2, -0.3, 0.3, 0.5, 0.3}} + }, + groups = {crumbly=1, oddly_breakable_by_hand=1}, + sounds = default.node_sound_stone_defaults() +}) + + minetest.register_node("mapgen:vine", { description = "Vines", drawtype = "nodebox", @@ -359,111 +572,6 @@ minetest.register_node("mapgen:vine", { groups = {cracky=3, dig_immediate=3, oddly_breakeable_by_hand=1}, }) ---code taken from default - ---License of source code ----------------------- - ---GNU Lesser General Public License, version 2.1 ---Copyright (C) 2011-2016 celeron55, Perttu Ahola ---Copyright (C) 2011-2016 Various Minetest developers and contributors - - - -minetest.register_node("mapgen:dirty_water_source", { - description = "Dirty Water Source", - drawtype = "liquid", - tiles = { - { - name = "mapgen_dirty_water_source_animated.png", - animation = { - type = "vertical_frames", - aspect_w = 16, - aspect_h = 16, - length = 2.0, - }, - }, - }, - special_tiles = { - { - name = "mapgen_dirty_water_source_animated.png", - animation = { - type = "vertical_frames", - aspect_w = 16, - aspect_h = 16, - length = 2.0, - }, - backface_culling = false, - }, - }, - alpha = 160, - paramtype = "light", - walkable = false, - pointable = false, - diggable = false, - buildable_to = true, - is_ground_content = false, - drop = "", - drowning = 1, - liquidtype = "source", - liquid_alternative_flowing = "mapgen:dirty_water_flowing", - liquid_alternative_source = ",mapgen:dirty_water_source", - liquid_viscosity = 2, - liquid_renewable = false, - liquid_range = 2, - post_effect_color = {a = 103, r = 30, g = 76, b = 90}, - groups = {water = 3, liquid = 3, puts_out_fire = 1, cools_lava = 1}, - sounds = default.node_sound_water_defaults(), -}) - -minetest.register_node("mapgen:dirty_water_flowing", { - description = "Flowing Dirty Water", - drawtype = "flowingliquid", - tiles = {"default_river_water.png^[colorize:green:100"}, - special_tiles = { - { - name = "mapgen_dirty_water_flowing_animated.png", - backface_culling = false, - animation = { - type = "vertical_frames", - aspect_w = 16, - aspect_h = 16, - length = 0.8, - }, - }, - { - name = "mapgen_dirty_water_flowing_animated.png", - backface_culling = true, - animation = { - type = "vertical_frames", - aspect_w = 16, - aspect_h = 16, - length = 0.8, - }, - }, - }, - alpha = 160, - paramtype = "light", - paramtype2 = "flowingliquid", - walkable = false, - pointable = false, - diggable = false, - buildable_to = true, - is_ground_content = false, - drop = "", - drowning = 1, - liquidtype = "flowing", - liquid_alternative_flowing = "mapgen:dirty_water_flowing", - liquid_alternative_source = "mapgen:dirty_water_source", - liquid_viscosity = 1, - liquid_renewable = false, - liquid_range = 2, - post_effect_color = {a = 103, r = 30, g = 76, b = 90}, - groups = {water = 3, liquid = 3, puts_out_fire = 1, - not_in_creative_inventory = 1, cools_lava = 1}, - sounds = default.node_sound_water_defaults(), -}) - minetest.register_node("mapgen:dirt_with_swampgrass", { description = "Dirt With Swamp Grass", tiles = {"mapgen_swamp_grass.png", "default_dirt.png", "default_dirt.png^mapgen_swamp_grass_side.png"}, @@ -598,3 +706,110 @@ minetest.register_node("mapgen:dead_grass", { }, walkable = false, }) + + +--code taken from default + +--License of source code +---------------------- + +--GNU Lesser General Public License, version 2.1 +--Copyright (C) 2011-2016 celeron55, Perttu Ahola +--Copyright (C) 2011-2016 Various Minetest developers and contributors + + + +minetest.register_node("mapgen:dirty_water_source", { + description = "Dirty Water Source", + drawtype = "liquid", + tiles = { + { + name = "mapgen_dirty_water_source_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 2.0, + }, + }, + }, + special_tiles = { + { + name = "mapgen_dirty_water_source_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 2.0, + }, + backface_culling = false, + }, + }, + alpha = 160, + paramtype = "light", + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + is_ground_content = false, + drop = "", + drowning = 1, + liquidtype = "source", + liquid_alternative_flowing = "mapgen:dirty_water_flowing", + liquid_alternative_source = ",mapgen:dirty_water_source", + liquid_viscosity = 2, + liquid_renewable = false, + liquid_range = 2, + post_effect_color = {a = 103, r = 30, g = 76, b = 90}, + groups = {water = 3, liquid = 3, puts_out_fire = 1, cools_lava = 1}, + sounds = default.node_sound_water_defaults(), +}) + +minetest.register_node("mapgen:dirty_water_flowing", { + description = "Flowing Dirty Water", + drawtype = "flowingliquid", + tiles = {"default_river_water.png^[colorize:green:100"}, + special_tiles = { + { + name = "mapgen_dirty_water_flowing_animated.png", + backface_culling = false, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 0.8, + }, + }, + { + name = "mapgen_dirty_water_flowing_animated.png", + backface_culling = true, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 0.8, + }, + }, + }, + alpha = 160, + paramtype = "light", + paramtype2 = "flowingliquid", + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + is_ground_content = false, + drop = "", + drowning = 1, + liquidtype = "flowing", + liquid_alternative_flowing = "mapgen:dirty_water_flowing", + liquid_alternative_source = "mapgen:dirty_water_source", + liquid_viscosity = 1, + liquid_renewable = false, + liquid_range = 2, + post_effect_color = {a = 103, r = 30, g = 76, b = 90}, + groups = {water = 3, liquid = 3, puts_out_fire = 1, + not_in_creative_inventory = 1, cools_lava = 1}, + sounds = default.node_sound_water_defaults(), +}) + diff --git a/mods/mapgen/textures/mapgen_duckweed.png b/mods/mapgen/textures/mapgen_duckweed.png new file mode 100644 index 0000000000000000000000000000000000000000..b9cfe9f55ed6fa3234c819bc019589e788876fcd GIT binary patch literal 325 zcmV-L0lNN)P)ui?F`zL#Y8k$WCBC79X!$1>zFDNYBjM zC?G2V{Ex|(0lnz{z7(Y)J3&ldG{CZj?1am-Qmd#i>SgOO3B8kb-o{D|LU!^upc7T4 z!QjZy3zw?2|7wOyv=t51eXVBRMrk}*8wB@G+jz9B1Y3KL*X>6Xva8M*lb0rGbFE%p z4Y+p^TU(Dwnm10*46}EoWgnzc#-=_OQ>Mkh(Sq%MA>$?DW?tG{Q z$nXAy{EZD($@hH#E?aG70HZK8f$3ywJs7;bTRx5=%WHt$y?xWjWYSjP=;+Y$TiaX9 z0IjuYe0@!J4M3>Qp9Z_g88VPp_GaQ5w7k94CKZH<9z7in(5&Lw z5ViJ@U1)FHO+kjAPK=vx3kUk`zAij5(5Bg=YZCK;QrT^ula{0$2;HpuPp$seWZnh` z73N1?MP4%3v(%-(Pw$mq?Bbv{weRu654F|Sp6%(+#Wyz3y8e$p;`*J>-pxfzSng-2g8{Z!QV44Pw z<3{$Hlt?M5*J?3clK;V*w_-eBc3iP_aSPAuM*$tjrDRzEgn^IaxLmn%nSVPS06ecx zr_(``62mA)x+MQ3$&4%P>M0K&Jr$RLfZ)^HI*!Z9@d@{Ke-r+|r`>Av zbng$Lsw!DU;rjKj$QKF#?7ch?IW0#flOYKFr~&}4+n5i)P@eA}h_y_Hl4T)v9RRtm zv!2g?TuYr&sf2CUP_k!l7x)2&Ve;(7OA&@)RQ{)X`ywe%mK3@4kLWr~!(<=aQ@=uk9d)D!;=Z7fEz1?49d^`0zVHhqBAPhq)pIzkIwX2bCb89nZ)AzhYU(+S|7=L`ARzM>@eaI4um1NzIZScrnrh7lq|vA7;R*K1D9HV6WIKbQzQ z4cNjJXf+$${Pwn(RspH&5KaOZw>v)t#p1-69+h6VOQlko@ca7acVZ;~f*^i=wcO-9 zPdWvQ$OKtJh^P-5Zk+S{SVj8%0fSGU=~*&uBBoZLKZpl!jNAi0&V3)LX{)V3>_m)F zP$hnE@7=dgGIJCV=CU>db(-B~L*rfXxdVsm{~x11kgY=eu{Q&O7%X zh+en5P{O%R!O&=JMiZ_=QZwlK`pf`#f8G(x01%6G?6Q(H3B{tvW|hh30^|1f|0~1L^ zK~z}7y_V~5+f*3Ff5(Y0$4L{%MH&rdu#Np~w4;kEK(uPNR;!?5NJxOhwbb z`siMkX#j9`{!;vKcB+m~Ud;5<77_3~AJ6l7_x2q@5RwcNqE5t5KmQ^O!=S9|JbwHI z)r}1_p&=_are&gO8fltvcK%X~?V8v8Mgk>Gqv5*z`um@vR4O4WHkE1>04Z%6jRx)Z z1$tRW*LA)>|52n#O1Gn2CsfF^-oq_4P|Ji+lumiy6rc0?@CQTFouImzp9m=|n zWtu$Q|5^al>NWcPK2bEn39-=S#R}|ydmsYepV;AhK7+Uqz|L1sg{BFll!QSz!5lq5 z6^5ZxF6$%QyL)171Ps&4>?;+S z*}reMS*2#o5<+C=K;!ayTK`9hWrJhohPlg$BI&iR<~I^pCyDE96-D0Nbv3^=fucn2 ca+nL(f2wyf&JTy6L;wH)07*qoM6N<$f)Q|_KL7v# literal 0 HcmV?d00001