From 113f07581b203b5728b22ed5431f548fe44f8658 Mon Sep 17 00:00:00 2001 From: JoseDouglas26 Date: Thu, 14 Dec 2023 12:42:44 -0300 Subject: [PATCH 1/9] new sunflower mesh --- mods/ITEMS/mcl_flowers/init.lua | 31 +++++++++- .../models/mcl_flowers_sunflower.mtl | 32 ++++++++++ .../models/mcl_flowers_sunflower.obj | 59 +++++++++++++++++++ 3 files changed, 119 insertions(+), 3 deletions(-) create mode 100644 mods/ITEMS/mcl_flowers/models/mcl_flowers_sunflower.mtl create mode 100644 mods/ITEMS/mcl_flowers/models/mcl_flowers_sunflower.obj diff --git a/mods/ITEMS/mcl_flowers/init.lua b/mods/ITEMS/mcl_flowers/init.lua index 10189240b..148d9db53 100644 --- a/mods/ITEMS/mcl_flowers/init.lua +++ b/mods/ITEMS/mcl_flowers/init.lua @@ -383,9 +383,6 @@ add_large_plant("peony", S("Peony"), S("A peony is a large plant which occupies add_large_plant("rose_bush", S("Rose Bush"), S("A rose bush is a large plant which occupies two blocks. It is safe to touch it. Rose bushes are mainly used in dye production."), "mcl_flowers_double_plant_rose_bottom.png", "mcl_flowers_double_plant_rose_top.png", nil, 5/16, 1/16) add_large_plant("lilac", S("Lilac"), S("A lilac is a large plant which occupies two blocks. It is mainly used in dye production."), "mcl_flowers_double_plant_syringa_bottom.png", "mcl_flowers_double_plant_syringa_top.png", nil, 5/16, 6/16) --- TODO: Make the sunflower face East. Requires a mesh for the top node. -add_large_plant("sunflower", S("Sunflower"), S("A sunflower is a large plant which occupies two blocks. It is mainly used in dye production."), "mcl_flowers_double_plant_sunflower_bottom.png", "mcl_flowers_double_plant_sunflower_top.png^mcl_flowers_double_plant_sunflower_front.png", "mcl_flowers_double_plant_sunflower_front.png", 6/16, 6/16) - local longdesc_grass = S("Double tallgrass a variant of tall grass and occupies two blocks. It can be harvested for wheat seeds.") local longdesc_fern = S("Large fern is a variant of fern and occupies two blocks. It can be harvested for wheat seeds.") @@ -522,4 +519,32 @@ if mod_mcimport and mg_name == "singlenode" and fix_doubleplants == true then }) end +minetest.register_node("mcl_flowers:sunflower", { + description = S("Sunflower"), + _doc_items_longdesc = S("A sunflower is a large plant which occupies two blocks. It is mainly used in dye production."), + drawtype = "mesh", + groups = { + attached_node = 1, deco_block = 1, + dig_by_water = 1, destroy_by_lava_flow = 1, dig_by_piston = 1, + flammable = 2, fire_encouragement = 60, fire_flammability = 100, + plant = 1, double_plant = 1, non_mycelium_plant = 1, compostability = 65, grass_palette = nil + }, + inventory_image = "mcl_flowers_double_plant_sunflower_front.png", + mesh = "mcl_flowers_sunflower.obj", + paramtype = "light", + selection_box = { + type = "fixed", + fixed = {-0.25, -0.5, -0.25, 0.25, 1.5, 0.25} + }, + sunlight_propagates = true, + tiles = { + "mcl_flowers_double_plant_sunflower_bottom.png", + "mcl_flowers_double_plant_sunflower_bottom.png", + "mcl_flowers_double_plant_sunflower_front.png", + "mcl_flowers_double_plant_sunflower_back.png" + }, + walkable = false, + wield_image = "mcl_flowers_double_plant_sunflower_front.png" +}) + dofile(modpath.."/register.lua") diff --git a/mods/ITEMS/mcl_flowers/models/mcl_flowers_sunflower.mtl b/mods/ITEMS/mcl_flowers/models/mcl_flowers_sunflower.mtl new file mode 100644 index 000000000..1a72d010b --- /dev/null +++ b/mods/ITEMS/mcl_flowers/models/mcl_flowers_sunflower.mtl @@ -0,0 +1,32 @@ +# Blender 3.6.4 MTL File: 'sunflower.blend' +# www.blender.org + +newmtl Flower_1 +Ns 250.000000 +Ka 1.000000 1.000000 1.000000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.450000 +d 1.000000 +illum 2 +map_Kd C:/Minetest-5.8/games/mineclone2/textures/mcl_flowers_double_plant_sunflower_front.png + +newmtl Flower_2 +Ns 250.000000 +Ka 1.000000 1.000000 1.000000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.450000 +d 1.000000 +illum 2 +map_Kd C:/Minetest-5.8/games/mineclone2/textures/mcl_flowers_double_plant_sunflower_back.png + +newmtl Stem +Ns 250.000000 +Ka 1.000000 1.000000 1.000000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.450000 +d 1.000000 +illum 2 +map_Kd C:/Minetest-5.8/games/mineclone2/textures/mcl_flowers_double_plant_sunflower_bottom.png diff --git a/mods/ITEMS/mcl_flowers/models/mcl_flowers_sunflower.obj b/mods/ITEMS/mcl_flowers/models/mcl_flowers_sunflower.obj new file mode 100644 index 000000000..4bac1dbd7 --- /dev/null +++ b/mods/ITEMS/mcl_flowers/models/mcl_flowers_sunflower.obj @@ -0,0 +1,59 @@ +# Blender 3.6.4 +# www.blender.org +mtllib sunflower.mtl +o Stem_1 +v 0.309359 1.500000 -0.309359 +v -0.309359 1.500000 0.309359 +v 0.309359 -0.500000 -0.309359 +v -0.309359 -0.500000 0.309359 +vn 0.7071 -0.0000 0.7071 +vt 1.000000 1.000000 +vt 0.000000 1.000000 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +s 0 +g Stem_1_Stem +usemtl Stem +f 1/1/1 2/2/1 4/3/1 3/4/1 +o Stem_2 +v 0.309359 1.500000 0.309359 +v -0.309359 1.500000 -0.309359 +v 0.309359 -0.500000 0.309359 +v -0.309359 -0.500000 -0.309359 +vn -0.7071 -0.0000 0.7071 +vt 1.000000 1.000000 +vt 0.000000 1.000000 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +s 0 +g Stem_2_Stem +usemtl Stem +f 5/5/2 6/6/2 8/7/2 7/8/2 +o Flower_1 +v -0.500000 1.933013 -0.125000 +v -0.500000 1.066987 0.375000 +v 0.500000 1.933013 -0.125000 +v 0.500000 1.066987 0.375000 +vn -0.0000 0.5000 0.8660 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt 0.000000 1.000000 +s 0 +g Flower_1_Flower_1 +usemtl Flower_1 +f 9/9/3 10/10/3 12/11/3 11/12/3 +o Flower_2 +v -0.500000 1.933013 -0.130000 +v -0.500000 1.066987 0.370000 +v 0.500000 1.933013 -0.130000 +v 0.500000 1.066987 0.370000 +vn -0.0000 0.5000 0.8660 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt 0.000000 1.000000 +s 0 +g Flower_2_Flower_2 +usemtl Flower_2 +f 13/13/4 14/14/4 16/15/4 15/16/4 From dd5a9178d9833804cddcaa462245ea42b7d506c0 Mon Sep 17 00:00:00 2001 From: JoseDouglas26 Date: Thu, 14 Dec 2023 13:29:37 -0300 Subject: [PATCH 2/9] sunflower mapgen bug fix --- mods/MAPGEN/mcl_biomes/init.lua | 76 ++++++++++++++++++++++----------- 1 file changed, 52 insertions(+), 24 deletions(-) diff --git a/mods/MAPGEN/mcl_biomes/init.lua b/mods/MAPGEN/mcl_biomes/init.lua index d42720d26..956a5dac8 100644 --- a/mods/MAPGEN/mcl_biomes/init.lua +++ b/mods/MAPGEN/mcl_biomes/init.lua @@ -4804,32 +4804,60 @@ local function register_decorations() b = {"FlowerForest"} end - minetest.register_decoration({ - deco_type = "schematic", - schematic = { - size = {x = 1, y = 3, z = 1}, - data = { - {name = "air", prob = 0}, - {name = "mcl_flowers:" .. name, param1 = 255, }, - {name = "mcl_flowers:" .. name .. "_top", param1 = 255, }, + if name ~= "sunflower" then + minetest.register_decoration({ + deco_type = "schematic", + schematic = { + size = {x = 1, y = 3, z = 1}, + data = { + {name = "air", prob = 0}, + {name = "mcl_flowers:" .. name, param1 = 255, }, + {name = "mcl_flowers:" .. name .. "_top", param1 = 255, }, + }, }, - }, - place_on = {"group:grass_block_no_snow", "mcl_core:dirt"}, + place_on = {"group:grass_block_no_snow", "mcl_core:dirt"}, - sidelen = 16, - noise_params = { - offset = o, - scale = 0.01, - spread = {x = 300, y = 300, z = 300}, - seed = seed, - octaves = 5, - persist = 0.62, - }, - y_min = 1, - y_max = mcl_vars.mg_overworld_max, - flags = "", - biomes = b, - }) + sidelen = 16, + noise_params = { + offset = o, + scale = 0.01, + spread = {x = 300, y = 300, z = 300}, + seed = seed, + octaves = 5, + persist = 0.62, + }, + y_min = 1, + y_max = mcl_vars.mg_overworld_max, + flags = "", + biomes = b, + }) + else + minetest.register_decoration({ + deco_type = "schematic", + schematic = { + size = {x = 1, y = 2, z = 1}, + data = { + {name = "air", prob = 0}, + {name = "mcl_flowers:" .. name, param1 = 255, }, + }, + }, + place_on = {"group:grass_block_no_snow", "mcl_core:dirt"}, + + sidelen = 16, + noise_params = { + offset = o, + scale = 0.01, + spread = {x = 300, y = 300, z = 300}, + seed = seed, + octaves = 5, + persist = 0.62, + }, + y_min = 1, + y_max = mcl_vars.mg_overworld_max, + flags = "", + biomes = b, + }) + end end end From e6a64cfc69c6ae6e7394863ace4ca66aa42d06c7 Mon Sep 17 00:00:00 2001 From: JoseDouglas26 Date: Thu, 14 Dec 2023 22:35:59 -0300 Subject: [PATCH 3/9] Sound and mining sunflower bug fixes --- mods/ITEMS/mcl_flowers/init.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_flowers/init.lua b/mods/ITEMS/mcl_flowers/init.lua index 148d9db53..ef22da3a3 100644 --- a/mods/ITEMS/mcl_flowers/init.lua +++ b/mods/ITEMS/mcl_flowers/init.lua @@ -525,8 +525,8 @@ minetest.register_node("mcl_flowers:sunflower", { drawtype = "mesh", groups = { attached_node = 1, deco_block = 1, - dig_by_water = 1, destroy_by_lava_flow = 1, dig_by_piston = 1, - flammable = 2, fire_encouragement = 60, fire_flammability = 100, + dig_by_water = 1, destroy_by_lava_flow = 1, dig_by_piston = 1, dig_immediate = 3, + flammable = 2, flower = 1, fire_encouragement = 60, fire_flammability = 100, plant = 1, double_plant = 1, non_mycelium_plant = 1, compostability = 65, grass_palette = nil }, inventory_image = "mcl_flowers_double_plant_sunflower_front.png", @@ -536,6 +536,7 @@ minetest.register_node("mcl_flowers:sunflower", { type = "fixed", fixed = {-0.25, -0.5, -0.25, 0.25, 1.5, 0.25} }, + sounds = mcl_sounds.node_sound_leaves_defaults(), sunlight_propagates = true, tiles = { "mcl_flowers_double_plant_sunflower_bottom.png", From 85d21fa1e9dcd4abb3e62ad69c61a062ce7c0470 Mon Sep 17 00:00:00 2001 From: JoseDouglas26 Date: Thu, 14 Dec 2023 23:18:38 -0300 Subject: [PATCH 4/9] new sunflower mesh --- .../models/mcl_flowers_sunflower.obj | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/mods/ITEMS/mcl_flowers/models/mcl_flowers_sunflower.obj b/mods/ITEMS/mcl_flowers/models/mcl_flowers_sunflower.obj index 4bac1dbd7..115670e11 100644 --- a/mods/ITEMS/mcl_flowers/models/mcl_flowers_sunflower.obj +++ b/mods/ITEMS/mcl_flowers/models/mcl_flowers_sunflower.obj @@ -1,12 +1,12 @@ # Blender 3.6.4 # www.blender.org -mtllib sunflower.mtl +mtllib mcl_flowers_sunflower.mtl o Stem_1 -v 0.309359 1.500000 -0.309359 -v -0.309359 1.500000 0.309359 -v 0.309359 -0.500000 -0.309359 -v -0.309359 -0.500000 0.309359 -vn 0.7071 -0.0000 0.7071 +v -0.309359 1.000000 -0.309359 +v 0.309359 1.000000 0.309359 +v -0.309359 -0.500000 -0.309359 +v 0.309359 -0.500000 0.309359 +vn 0.7071 -0.0000 -0.7071 vt 1.000000 1.000000 vt 0.000000 1.000000 vt 0.000000 0.000000 @@ -16,11 +16,11 @@ g Stem_1_Stem usemtl Stem f 1/1/1 2/2/1 4/3/1 3/4/1 o Stem_2 -v 0.309359 1.500000 0.309359 -v -0.309359 1.500000 -0.309359 -v 0.309359 -0.500000 0.309359 -v -0.309359 -0.500000 -0.309359 -vn -0.7071 -0.0000 0.7071 +v 0.309359 1.000000 -0.309359 +v -0.309359 1.000000 0.309359 +v 0.309359 -0.500000 -0.309359 +v -0.309359 -0.500000 0.309359 +vn 0.7071 -0.0000 0.7071 vt 1.000000 1.000000 vt 0.000000 1.000000 vt 0.000000 0.000000 @@ -30,11 +30,11 @@ g Stem_2_Stem usemtl Stem f 5/5/2 6/6/2 8/7/2 7/8/2 o Flower_1 -v -0.500000 1.933013 -0.125000 -v -0.500000 1.066987 0.375000 -v 0.500000 1.933013 -0.125000 -v 0.500000 1.066987 0.375000 -vn -0.0000 0.5000 0.8660 +v -0.145000 1.483012 0.500000 +v 0.355000 0.616987 0.500000 +v -0.145000 1.483012 -0.500000 +v 0.355000 0.616987 -0.500000 +vn 0.8660 0.5000 -0.0000 vt 0.000000 0.000000 vt 1.000000 0.000000 vt 1.000000 1.000000 @@ -44,11 +44,11 @@ g Flower_1_Flower_1 usemtl Flower_1 f 9/9/3 10/10/3 12/11/3 11/12/3 o Flower_2 -v -0.500000 1.933013 -0.130000 -v -0.500000 1.066987 0.370000 -v 0.500000 1.933013 -0.130000 -v 0.500000 1.066987 0.370000 -vn -0.0000 0.5000 0.8660 +v -0.150000 1.482013 0.500000 +v 0.350000 0.615987 0.500000 +v -0.150000 1.482013 -0.500000 +v 0.350000 0.615987 -0.500000 +vn 0.8660 0.5000 -0.0000 vt 0.000000 0.000000 vt 1.000000 0.000000 vt 1.000000 1.000000 From f9972aef015cc992b41ab2c004a1a3c5101c3310 Mon Sep 17 00:00:00 2001 From: JoseDouglas26 Date: Thu, 14 Dec 2023 23:35:42 -0300 Subject: [PATCH 5/9] new lower mesh and selection box --- mods/ITEMS/mcl_flowers/init.lua | 2 +- .../models/mcl_flowers_sunflower.obj | 24 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/mods/ITEMS/mcl_flowers/init.lua b/mods/ITEMS/mcl_flowers/init.lua index ef22da3a3..ce8391c29 100644 --- a/mods/ITEMS/mcl_flowers/init.lua +++ b/mods/ITEMS/mcl_flowers/init.lua @@ -534,7 +534,7 @@ minetest.register_node("mcl_flowers:sunflower", { paramtype = "light", selection_box = { type = "fixed", - fixed = {-0.25, -0.5, -0.25, 0.25, 1.5, 0.25} + fixed = {-1/4, -1/2, -1/4, 1/4, 8/7, 1/4} }, sounds = mcl_sounds.node_sound_leaves_defaults(), sunlight_propagates = true, diff --git a/mods/ITEMS/mcl_flowers/models/mcl_flowers_sunflower.obj b/mods/ITEMS/mcl_flowers/models/mcl_flowers_sunflower.obj index 115670e11..43fc4301d 100644 --- a/mods/ITEMS/mcl_flowers/models/mcl_flowers_sunflower.obj +++ b/mods/ITEMS/mcl_flowers/models/mcl_flowers_sunflower.obj @@ -2,8 +2,8 @@ # www.blender.org mtllib mcl_flowers_sunflower.mtl o Stem_1 -v -0.309359 1.000000 -0.309359 -v 0.309359 1.000000 0.309359 +v -0.309359 0.750000 -0.309359 +v 0.309359 0.750000 0.309359 v -0.309359 -0.500000 -0.309359 v 0.309359 -0.500000 0.309359 vn 0.7071 -0.0000 -0.7071 @@ -16,8 +16,8 @@ g Stem_1_Stem usemtl Stem f 1/1/1 2/2/1 4/3/1 3/4/1 o Stem_2 -v 0.309359 1.000000 -0.309359 -v -0.309359 1.000000 0.309359 +v 0.309359 0.750000 -0.309359 +v -0.309359 0.750000 0.309359 v 0.309359 -0.500000 -0.309359 v -0.309359 -0.500000 0.309359 vn 0.7071 -0.0000 0.7071 @@ -30,10 +30,10 @@ g Stem_2_Stem usemtl Stem f 5/5/2 6/6/2 8/7/2 7/8/2 o Flower_1 -v -0.145000 1.483012 0.500000 -v 0.355000 0.616987 0.500000 -v -0.145000 1.483012 -0.500000 -v 0.355000 0.616987 -0.500000 +v -0.175000 1.233013 0.500000 +v 0.325000 0.366987 0.500000 +v -0.175000 1.233013 -0.500000 +v 0.325000 0.366987 -0.500000 vn 0.8660 0.5000 -0.0000 vt 0.000000 0.000000 vt 1.000000 0.000000 @@ -44,10 +44,10 @@ g Flower_1_Flower_1 usemtl Flower_1 f 9/9/3 10/10/3 12/11/3 11/12/3 o Flower_2 -v -0.150000 1.482013 0.500000 -v 0.350000 0.615987 0.500000 -v -0.150000 1.482013 -0.500000 -v 0.350000 0.615987 -0.500000 +v -0.180000 1.232013 0.500000 +v 0.320000 0.365988 0.500000 +v -0.180000 1.232013 -0.500000 +v 0.320000 0.365988 -0.500000 vn 0.8660 0.5000 -0.0000 vt 0.000000 0.000000 vt 1.000000 0.000000 From 4d5d5953107cca7339fac49377b6b125efc32499 Mon Sep 17 00:00:00 2001 From: JoseDouglas26 Date: Fri, 15 Dec 2023 08:54:44 -0300 Subject: [PATCH 6/9] changes requested in sunflower definitions --- mods/ITEMS/mcl_flowers/init.lua | 23 ++++++++-- mods/MAPGEN/mcl_biomes/init.lua | 76 +++++++++++---------------------- 2 files changed, 43 insertions(+), 56 deletions(-) diff --git a/mods/ITEMS/mcl_flowers/init.lua b/mods/ITEMS/mcl_flowers/init.lua index ce8391c29..5277cd35c 100644 --- a/mods/ITEMS/mcl_flowers/init.lua +++ b/mods/ITEMS/mcl_flowers/init.lua @@ -192,7 +192,7 @@ if has_mcl_flowerpots then }) end -local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_img, selbox_radius, selbox_top_height, drop, shears_drop, is_flower, grass_color, fortune_drop) +local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_img, selbox_radius, selbox_top_height, drop, shears_drop, is_flower, grass_color, fortune_drop, mesh) if not inv_img then inv_img = top_img end @@ -236,13 +236,26 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im drop_top = drop drop_bottom = drop end + -- Sunflower mesh and tiles + local top_drawtype, bottom_drawtype + local bottom_tiles = {} + if not mesh then + top_drawtype = "plantlike" + bottom_drawtype = "plantlike" + table.insert(bottom_tiles, bottom_img) + else + top_drawtype = "airlike" + bottom_drawtype = "mesh" + bottom_tiles = bottom_img + end + -- Bottom minetest.register_node("mcl_flowers:"..name, { description = desc, _doc_items_create_entry = create_entry, _doc_items_longdesc = longdesc, _doc_items_usagehelp = plant_usage_help, - drawtype = "plantlike", - tiles = { bottom_img }, + drawtype = bottom_drawtype, + tiles = bottom_tiles, inventory_image = inv_img, wield_image = inv_img, sunlight_propagates = true, @@ -334,6 +347,7 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im end, groups = bottom_groups, sounds = mcl_sounds.node_sound_leaves_defaults(), + mesh = mesh }) local top_groups = table.copy(bottom_groups) @@ -345,7 +359,7 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im minetest.register_node("mcl_flowers:"..name.."_top", { description = desc.." " .. S("(Top Part)"), _doc_items_create_entry = false, - drawtype = "plantlike", + drawtype = top_drawtype, tiles = { top_img }, sunlight_propagates = true, paramtype = "light", @@ -382,6 +396,7 @@ end add_large_plant("peony", S("Peony"), S("A peony is a large plant which occupies two blocks. It is mainly used in dye production."), "mcl_flowers_double_plant_paeonia_bottom.png", "mcl_flowers_double_plant_paeonia_top.png", nil, 5/16, 6/16) add_large_plant("rose_bush", S("Rose Bush"), S("A rose bush is a large plant which occupies two blocks. It is safe to touch it. Rose bushes are mainly used in dye production."), "mcl_flowers_double_plant_rose_bottom.png", "mcl_flowers_double_plant_rose_top.png", nil, 5/16, 1/16) add_large_plant("lilac", S("Lilac"), S("A lilac is a large plant which occupies two blocks. It is mainly used in dye production."), "mcl_flowers_double_plant_syringa_bottom.png", "mcl_flowers_double_plant_syringa_top.png", nil, 5/16, 6/16) +add_large_plant("sunflower", S("Sunflower"), S("A sunflower is a large plant which occupies two blocks. It is mainly used in dye production."), {"mcl_flowers_double_plant_sunflower_bottom.png", "mcl_flowers_double_plant_sunflower_bottom.png", "mcl_flowers_double_plant_sunflower_front.png", "mcl_flowers_double_plant_sunflower_back.png"}, nil, "mcl_flowers_double_plant_sunflower_front.png", 6/16, 6/16, "mcl_flowers:sunflower", nil, true, nil, nil, "mcl_flowers_sunflower.obj") local longdesc_grass = S("Double tallgrass a variant of tall grass and occupies two blocks. It can be harvested for wheat seeds.") local longdesc_fern = S("Large fern is a variant of fern and occupies two blocks. It can be harvested for wheat seeds.") diff --git a/mods/MAPGEN/mcl_biomes/init.lua b/mods/MAPGEN/mcl_biomes/init.lua index 956a5dac8..d42720d26 100644 --- a/mods/MAPGEN/mcl_biomes/init.lua +++ b/mods/MAPGEN/mcl_biomes/init.lua @@ -4804,60 +4804,32 @@ local function register_decorations() b = {"FlowerForest"} end - if name ~= "sunflower" then - minetest.register_decoration({ - deco_type = "schematic", - schematic = { - size = {x = 1, y = 3, z = 1}, - data = { - {name = "air", prob = 0}, - {name = "mcl_flowers:" .. name, param1 = 255, }, - {name = "mcl_flowers:" .. name .. "_top", param1 = 255, }, - }, + minetest.register_decoration({ + deco_type = "schematic", + schematic = { + size = {x = 1, y = 3, z = 1}, + data = { + {name = "air", prob = 0}, + {name = "mcl_flowers:" .. name, param1 = 255, }, + {name = "mcl_flowers:" .. name .. "_top", param1 = 255, }, }, - place_on = {"group:grass_block_no_snow", "mcl_core:dirt"}, + }, + place_on = {"group:grass_block_no_snow", "mcl_core:dirt"}, - sidelen = 16, - noise_params = { - offset = o, - scale = 0.01, - spread = {x = 300, y = 300, z = 300}, - seed = seed, - octaves = 5, - persist = 0.62, - }, - y_min = 1, - y_max = mcl_vars.mg_overworld_max, - flags = "", - biomes = b, - }) - else - minetest.register_decoration({ - deco_type = "schematic", - schematic = { - size = {x = 1, y = 2, z = 1}, - data = { - {name = "air", prob = 0}, - {name = "mcl_flowers:" .. name, param1 = 255, }, - }, - }, - place_on = {"group:grass_block_no_snow", "mcl_core:dirt"}, - - sidelen = 16, - noise_params = { - offset = o, - scale = 0.01, - spread = {x = 300, y = 300, z = 300}, - seed = seed, - octaves = 5, - persist = 0.62, - }, - y_min = 1, - y_max = mcl_vars.mg_overworld_max, - flags = "", - biomes = b, - }) - end + sidelen = 16, + noise_params = { + offset = o, + scale = 0.01, + spread = {x = 300, y = 300, z = 300}, + seed = seed, + octaves = 5, + persist = 0.62, + }, + y_min = 1, + y_max = mcl_vars.mg_overworld_max, + flags = "", + biomes = b, + }) end end From f63e5d3c1978c766dd09fb9dcfed656e06061210 Mon Sep 17 00:00:00 2001 From: JoseDouglas26 Date: Fri, 22 Dec 2023 14:35:47 -0300 Subject: [PATCH 7/9] fix facing west --- .../models/mcl_flowers_sunflower.obj | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/mods/ITEMS/mcl_flowers/models/mcl_flowers_sunflower.obj b/mods/ITEMS/mcl_flowers/models/mcl_flowers_sunflower.obj index 43fc4301d..9866fa4f2 100644 --- a/mods/ITEMS/mcl_flowers/models/mcl_flowers_sunflower.obj +++ b/mods/ITEMS/mcl_flowers/models/mcl_flowers_sunflower.obj @@ -2,11 +2,11 @@ # www.blender.org mtllib mcl_flowers_sunflower.mtl o Stem_1 -v -0.309359 0.750000 -0.309359 -v 0.309359 0.750000 0.309359 -v -0.309359 -0.500000 -0.309359 -v 0.309359 -0.500000 0.309359 -vn 0.7071 -0.0000 -0.7071 +v 0.381859 0.750000 0.309359 +v -0.236859 0.750000 -0.309359 +v 0.381859 -0.500000 0.309359 +v -0.236859 -0.500000 -0.309359 +vn -0.7071 -0.0000 0.7071 vt 1.000000 1.000000 vt 0.000000 1.000000 vt 0.000000 0.000000 @@ -16,11 +16,11 @@ g Stem_1_Stem usemtl Stem f 1/1/1 2/2/1 4/3/1 3/4/1 o Stem_2 -v 0.309359 0.750000 -0.309359 -v -0.309359 0.750000 0.309359 -v 0.309359 -0.500000 -0.309359 -v -0.309359 -0.500000 0.309359 -vn 0.7071 -0.0000 0.7071 +v -0.236859 0.750000 0.309359 +v 0.381859 0.750000 -0.309359 +v -0.236859 -0.500000 0.309359 +v 0.381859 -0.500000 -0.309359 +vn -0.7071 -0.0000 -0.7071 vt 1.000000 1.000000 vt 0.000000 1.000000 vt 0.000000 0.000000 @@ -30,11 +30,11 @@ g Stem_2_Stem usemtl Stem f 5/5/2 6/6/2 8/7/2 7/8/2 o Flower_1 -v -0.175000 1.233013 0.500000 -v 0.325000 0.366987 0.500000 -v -0.175000 1.233013 -0.500000 -v 0.325000 0.366987 -0.500000 -vn 0.8660 0.5000 -0.0000 +v 0.247500 1.233013 -0.500000 +v -0.252500 0.366987 -0.500000 +v 0.247500 1.233013 0.500000 +v -0.252500 0.366987 0.500000 +vn -0.8660 0.5000 -0.0000 vt 0.000000 0.000000 vt 1.000000 0.000000 vt 1.000000 1.000000 @@ -44,11 +44,11 @@ g Flower_1_Flower_1 usemtl Flower_1 f 9/9/3 10/10/3 12/11/3 11/12/3 o Flower_2 -v -0.180000 1.232013 0.500000 -v 0.320000 0.365988 0.500000 -v -0.180000 1.232013 -0.500000 -v 0.320000 0.365988 -0.500000 -vn 0.8660 0.5000 -0.0000 +v 0.252500 1.232013 -0.500000 +v -0.247500 0.365988 -0.500000 +v 0.252500 1.232013 0.500000 +v -0.247500 0.365988 0.500000 +vn -0.8660 0.5000 -0.0000 vt 0.000000 0.000000 vt 1.000000 0.000000 vt 1.000000 1.000000 From 92ee9c0557a88ce07c044de278c21c1414da51b0 Mon Sep 17 00:00:00 2001 From: the-real-herowl Date: Mon, 18 Dec 2023 02:14:01 +0100 Subject: [PATCH 8/9] Remove the wrong separate sunflower definition --- mods/ITEMS/mcl_flowers/init.lua | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/mods/ITEMS/mcl_flowers/init.lua b/mods/ITEMS/mcl_flowers/init.lua index 5277cd35c..75e133322 100644 --- a/mods/ITEMS/mcl_flowers/init.lua +++ b/mods/ITEMS/mcl_flowers/init.lua @@ -534,33 +534,4 @@ if mod_mcimport and mg_name == "singlenode" and fix_doubleplants == true then }) end -minetest.register_node("mcl_flowers:sunflower", { - description = S("Sunflower"), - _doc_items_longdesc = S("A sunflower is a large plant which occupies two blocks. It is mainly used in dye production."), - drawtype = "mesh", - groups = { - attached_node = 1, deco_block = 1, - dig_by_water = 1, destroy_by_lava_flow = 1, dig_by_piston = 1, dig_immediate = 3, - flammable = 2, flower = 1, fire_encouragement = 60, fire_flammability = 100, - plant = 1, double_plant = 1, non_mycelium_plant = 1, compostability = 65, grass_palette = nil - }, - inventory_image = "mcl_flowers_double_plant_sunflower_front.png", - mesh = "mcl_flowers_sunflower.obj", - paramtype = "light", - selection_box = { - type = "fixed", - fixed = {-1/4, -1/2, -1/4, 1/4, 8/7, 1/4} - }, - sounds = mcl_sounds.node_sound_leaves_defaults(), - sunlight_propagates = true, - tiles = { - "mcl_flowers_double_plant_sunflower_bottom.png", - "mcl_flowers_double_plant_sunflower_bottom.png", - "mcl_flowers_double_plant_sunflower_front.png", - "mcl_flowers_double_plant_sunflower_back.png" - }, - walkable = false, - wield_image = "mcl_flowers_double_plant_sunflower_front.png" -}) - dofile(modpath.."/register.lua") From 569dd691885d529efaebbfc9c2e3f1400a37578a Mon Sep 17 00:00:00 2001 From: the-real-herowl Date: Fri, 22 Dec 2023 23:36:49 +0100 Subject: [PATCH 9/9] Increase sunflower height --- .../models/mcl_flowers_sunflower.obj | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/mods/ITEMS/mcl_flowers/models/mcl_flowers_sunflower.obj b/mods/ITEMS/mcl_flowers/models/mcl_flowers_sunflower.obj index 9866fa4f2..fb9dfc7cf 100644 --- a/mods/ITEMS/mcl_flowers/models/mcl_flowers_sunflower.obj +++ b/mods/ITEMS/mcl_flowers/models/mcl_flowers_sunflower.obj @@ -2,8 +2,8 @@ # www.blender.org mtllib mcl_flowers_sunflower.mtl o Stem_1 -v 0.381859 0.750000 0.309359 -v -0.236859 0.750000 -0.309359 +v 0.381859 1.050000 0.309359 +v -0.236859 1.050000 -0.309359 v 0.381859 -0.500000 0.309359 v -0.236859 -0.500000 -0.309359 vn -0.7071 -0.0000 0.7071 @@ -16,8 +16,8 @@ g Stem_1_Stem usemtl Stem f 1/1/1 2/2/1 4/3/1 3/4/1 o Stem_2 -v -0.236859 0.750000 0.309359 -v 0.381859 0.750000 -0.309359 +v -0.236859 1.050000 0.309359 +v 0.381859 1.050000 -0.309359 v -0.236859 -0.500000 0.309359 v 0.381859 -0.500000 -0.309359 vn -0.7071 -0.0000 -0.7071 @@ -30,10 +30,10 @@ g Stem_2_Stem usemtl Stem f 5/5/2 6/6/2 8/7/2 7/8/2 o Flower_1 -v 0.247500 1.233013 -0.500000 -v -0.252500 0.366987 -0.500000 -v 0.247500 1.233013 0.500000 -v -0.252500 0.366987 0.500000 +v 0.247500 1.433013 -0.500000 +v -0.252500 0.766987 -0.500000 +v 0.247500 1.433013 0.500000 +v -0.252500 0.766987 0.500000 vn -0.8660 0.5000 -0.0000 vt 0.000000 0.000000 vt 1.000000 0.000000 @@ -44,10 +44,10 @@ g Flower_1_Flower_1 usemtl Flower_1 f 9/9/3 10/10/3 12/11/3 11/12/3 o Flower_2 -v 0.252500 1.232013 -0.500000 -v -0.247500 0.365988 -0.500000 -v 0.252500 1.232013 0.500000 -v -0.247500 0.365988 0.500000 +v 0.252500 1.432013 -0.500000 +v -0.247500 0.765988 -0.500000 +v 0.252500 1.432013 0.500000 +v -0.247500 0.765988 0.500000 vn -0.8660 0.5000 -0.0000 vt 0.000000 0.000000 vt 1.000000 0.000000