From c00bdaa9c28878d97bb53281b9341ffa68d2a76c Mon Sep 17 00:00:00 2001 From: kno10 Date: Sat, 26 Oct 2024 19:05:24 +0200 Subject: [PATCH] Add cherry grove biome, based on MCLA. Textures from pixel perfection, optimized with zopfipng. C.f., voxelibre#3463 voxelibre#4113 --- mods/ITEMS/mcl_cherry_blossom/nodes.lua | 39 ++++++++ mods/MAPGEN/vl_biomes/cherrygrove.lua | 89 ++++++++++++++++++ mods/MAPGEN/vl_biomes/deco/tallgrass.lua | 6 +- mods/MAPGEN/vl_biomes/init.lua | 1 + mods/MAPGEN/vl_biomes/mod.conf | 2 +- textures/mcl_cherry_blossom_pink_petals.png | Bin 0 -> 177 bytes .../mcl_cherry_blossom_pink_petals_inv.png | Bin 0 -> 158 bytes 7 files changed, 133 insertions(+), 4 deletions(-) create mode 100644 mods/MAPGEN/vl_biomes/cherrygrove.lua create mode 100644 textures/mcl_cherry_blossom_pink_petals.png create mode 100644 textures/mcl_cherry_blossom_pink_petals_inv.png diff --git a/mods/ITEMS/mcl_cherry_blossom/nodes.lua b/mods/ITEMS/mcl_cherry_blossom/nodes.lua index 5b9e0ce49..a18876d5b 100644 --- a/mods/ITEMS/mcl_cherry_blossom/nodes.lua +++ b/mods/ITEMS/mcl_cherry_blossom/nodes.lua @@ -101,3 +101,42 @@ mesecon.register_button( true, nil, "mesecons_button_push_wood") + +minetest.register_node("mcl_cherry_blossom:pink_petals",{ + description = S("Pink Petals"), + doc_items_longdesc = S("Pink Petals are ground decoration of cherry grove biomes"), + doc_items_hidden = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = false, + sunlight_propagates = true, + floodable = true, + pointable = true, + drawtype = "nodebox", + node_box = {type = "fixed", fixed = {-1/2, -1/2, -1/2, 1/2, -7.9/16, 1/2}}, + collision_box = {type = "fixed", fixed = {-1/2, -1/2, -1/2, 1/2, -7.9/16, 1/2}}, + groups = { + shearsy=1, + handy=1, + flammable=3, + attached_node=1, + dig_by_piston=1, + compostability = 30, + deco_block=1 + --not_in_creative_inventory=1, + }, + use_texture_alpha = "clip", + sounds = mcl_sounds.node_sound_leaves_defaults(), + tiles = { + "mcl_cherry_blossom_pink_petals.png", + "mcl_cherry_blossom_pink_petals.png^[transformFY", -- mirror + "blank.png" -- empty + }, + inventory_image = "mcl_cherry_blossom_pink_petals_inv.png", + _mcl_hardness = 0, + _mcl_blast_resistance = 0, + _on_bone_meal = function(_, _, _ , pos, n) + minetest.add_item(pos,n.name) + end +}) + diff --git a/mods/MAPGEN/vl_biomes/cherrygrove.lua b/mods/MAPGEN/vl_biomes/cherrygrove.lua new file mode 100644 index 000000000..d39d67c80 --- /dev/null +++ b/mods/MAPGEN/vl_biomes/cherrygrove.lua @@ -0,0 +1,89 @@ +local mod_cherry_blossom = minetest.get_modpath("mcl_cherry_blossom") +-- Cherry Grove +vl_biomes.register_biome({ + name = "CherryGrove", + node_top = "mcl_core:dirt_with_grass", + depth_top = 1, + node_filler = "mcl_core:dirt", + depth_filler = 2, + node_riverbed = "mcl_core:sand", + depth_riverbed = 2, + y_min = 18, + y_max = vl_biomes.overworld_max, + humidity_point = 41, + heat_point = 55, + _mcl_biome_type = "medium", + _mcl_water_temp = "ocean", + _mcl_grass_palette_index = 11, + _mcl_foliage_palette_index = 1, + _mcl_water_palette_index = 0, + _mcl_skycolor = "#78A7FF", + _beach = { + node_top = "mcl_core:sand", + depth_top = 2, + node_filler = "mcl_core:sandstone", + depth_filler = 2, + y_min = 0, + y_max = 2, + }, + _ocean = { + node_top = "mcl_core:sand", + depth_top = 1, + node_filler = "mcl_core:sand", + depth_filler = 3, + y_max = -1, + }, +}) + +-- Cherry trees +for i=1,3 do + mcl_mapgen_core.register_decoration({ + deco_type = "schematic", + place_on = {"mcl_core:dirt_with_grass"}, + sidelen = 80, + noise_params = { + offset = 0.007, + scale = 0.08, + spread = {x = 250, y = 250, z = 250}, + seed = 13+i, + octaves = 3, + persist = 0.6 + }, + biomes = {"CherryGrove"}, + y_min = 1, + y_max = mcl_vars.mg_overworld_max, + schematic = mod_cherry_blossom.."/schematics/mcl_cherry_blossom_tree_"..i..".mts", + flags = "place_center_x, place_center_z", + rotation = "random", + }) + mcl_mapgen_core.register_decoration({ + deco_type = "schematic", + place_on = {"mcl_core:dirt_with_grass"}, + sidelen = 80, + noise_params = { + offset = 0.0005, + scale = 0.0001, + spread = {x = 250, y = 250, z = 250}, + seed = 32+i, + octaves = 3, + persist = 0.01 + }, + biomes = {"CherryGrove"}, + y_min = 1, + y_max = mcl_vars.mg_overworld_max, + schematic = mod_cherry_blossom.."/schematics/mcl_cherry_blossom_tree_beehive_"..i..".mts", + flags = "place_center_x, place_center_z", + rotation = "random", + }) +end + +mcl_mapgen_core.register_decoration({ + deco_type = "simple", + place_on = {"mcl_core:dirt_with_grass"}, + fill_ratio = 0.6, + biomes = {"CherryGrove"}, + y_min = mcl_vars.mg_overworld_min, + y_max = mcl_vars.mg_overworld_max, + decoration = "mcl_cherry_blossom:pink_petals", +}) + diff --git a/mods/MAPGEN/vl_biomes/deco/tallgrass.lua b/mods/MAPGEN/vl_biomes/deco/tallgrass.lua index bae38d544..14e88206e 100644 --- a/mods/MAPGEN/vl_biomes/deco/tallgrass.lua +++ b/mods/MAPGEN/vl_biomes/deco/tallgrass.lua @@ -35,7 +35,7 @@ end local grass_forest = {"Plains", "Taiga", "Forest", "FlowerForest", "BirchForest", "BirchForestM", "RoofedForest", "Swampland", } local grass_mpf = {"MesaPlateauF_grasstop"} -local grass_plains = {"Plains", "SunflowerPlains", "JungleEdge", "JungleEdgeM", "MangroveSwamp"} +local grass_plains = {"Plains", "SunflowerPlains", "CherryGrove", "JungleEdge", "JungleEdgeM", "MangroveSwamp"} local grass_savanna = {"Savanna", "SavannaM"} local grass_sparse = {"ExtremeHills", "ExtremeHills+", "ExtremeHills+_snowtop", "ExtremeHillsM", "Jungle"} local grass_mpfm = {"MesaPlateauFM_grasstop"} @@ -96,14 +96,14 @@ local function register_doubletall_grass(offset, scale, biomes) }, y_min = 1, y_max = vl_biomes.overworld_max, - biomes = biomes, + biomes = bs, }) end end register_doubletall_grass(-0.0005, -0.3, {"BambooJungle", "BambooJungleM", "BambooJungleEdge"}) register_doubletall_grass(-0.01, 0.03, {"Forest", "FlowerForest", "BirchForest", "BirchForestM", "RoofedForest", "Taiga"}) -register_doubletall_grass(-0.002, 0.03, {"Plains", "SunflowerPlains"}) +register_doubletall_grass(-0.002, 0.03, {"Plains", "SunflowerPlains", "CherryGrove"}) register_doubletall_grass(-0.0005, -0.03, {"Savanna", "SavannaM"}) mcl_mapgen_core.register_decoration({ diff --git a/mods/MAPGEN/vl_biomes/init.lua b/mods/MAPGEN/vl_biomes/init.lua index bc965dce9..2b14d8669 100644 --- a/mods/MAPGEN/vl_biomes/init.lua +++ b/mods/MAPGEN/vl_biomes/init.lua @@ -268,6 +268,7 @@ elseif mg_name ~= "v6" then dofile(modpath.."/plains.lua") dofile(modpath.."/plains_sunflower.lua") + dofile(modpath.."/cherrygrove.lua") dofile(modpath.."/savanna.lua") dofile(modpath.."/savanna_windswept.lua") dofile(modpath.."/desert.lua") diff --git a/mods/MAPGEN/vl_biomes/mod.conf b/mods/MAPGEN/vl_biomes/mod.conf index d465cdd2e..50bb63f0f 100644 --- a/mods/MAPGEN/vl_biomes/mod.conf +++ b/mods/MAPGEN/vl_biomes/mod.conf @@ -1,4 +1,4 @@ name = vl_biomes author = maikerumine,wuzzy,kno10 description = Adds the various biomes and biome-related things for non-v6 map generators. -depends = mcl_init, mcl_mapgen_core, mcl_core, mcl_worlds, mcl_farming, mcl_flowers, mcl_end, mcl_ocean, mcl_crimson, mcl_blackstone, mcl_mangrove +depends = mcl_init, mcl_mapgen_core, mcl_core, mcl_worlds, mcl_farming, mcl_flowers, mcl_end, mcl_ocean, mcl_crimson, mcl_blackstone, mcl_mangrove, mcl_cherry_blossom diff --git a/textures/mcl_cherry_blossom_pink_petals.png b/textures/mcl_cherry_blossom_pink_petals.png new file mode 100644 index 0000000000000000000000000000000000000000..f19a6ce285e04b5be4379a11e3eb4fb31b634727 GIT binary patch literal 177 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPHV5AX?b1=7Dy-T1cY=-cV*pEk~Q zHAwCU3Ne-h`2{mLJiCzwu#9s|Go59o7&t;ucLK6V6*FdWP literal 0 HcmV?d00001 diff --git a/textures/mcl_cherry_blossom_pink_petals_inv.png b/textures/mcl_cherry_blossom_pink_petals_inv.png new file mode 100644 index 0000000000000000000000000000000000000000..cdc8e4fb0e29cba3912639a6180801a7df31bb10 GIT binary patch literal 158 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPHV5AX?b1=7Dy-FQ2F{nN&|-!>gp zp1%<&!oXM(2X zBab^Ho2tTW#uLd#MU2`)DM1BA4YQ6sYB*ZKaDtur)xFC)_dv#ay85}Sb4q9e0AbB9 AO#lD@ literal 0 HcmV?d00001