From 72f5591400f29e50200ada511b938a07ae758b80 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 14 Nov 2017 23:44:53 +0100 Subject: [PATCH] Add dry-colored grass/fern variants --- mods/ENTITIES/mobs_mc_gameconfig/init.lua | 6 +- mods/ITEMS/mcl_core/functions.lua | 10 +- mods/ITEMS/mcl_core/nodes_base.lua | 26 ++- mods/ITEMS/mcl_core/nodes_trees.lua | 2 +- .../mcl_core/textures/default_dry_grass.png | Bin 0 -> 171 bytes .../textures/default_dry_grass_side.png | Bin 0 -> 183 bytes .../ITEMS/mcl_core/textures/default_grass.png | Bin 171 -> 428 bytes .../mcl_core/textures/default_grass_side.png | Bin 183 -> 306 bytes mods/ITEMS/mcl_dye/init.lua | 28 ++- mods/ITEMS/mcl_farming/shared_functions.lua | 2 +- mods/ITEMS/mcl_flowers/init.lua | 175 +++++++++++------- .../mcl_flowers_double_plant_fern_bottom.png | Bin 388 -> 192 bytes ...l_flowers_double_plant_fern_bottom_dry.png | Bin 0 -> 192 bytes .../mcl_flowers_double_plant_fern_top.png | Bin 372 -> 178 bytes .../mcl_flowers_double_plant_fern_top_dry.png | Bin 0 -> 178 bytes .../mcl_flowers_double_plant_grass_bottom.png | Bin 421 -> 224 bytes ..._flowers_double_plant_grass_bottom_dry.png | Bin 0 -> 224 bytes .../mcl_flowers_double_plant_grass_top.png | Bin 364 -> 166 bytes ...mcl_flowers_double_plant_grass_top_dry.png | Bin 0 -> 166 bytes .../mcl_flowers/textures/mcl_flowers_fern.png | Bin 396 -> 202 bytes .../textures/mcl_flowers_fern_dry.png | Bin 0 -> 202 bytes .../textures/mcl_flowers_tallgrass.png | Bin 390 -> 196 bytes .../textures/mcl_flowers_tallgrass_dry.png | Bin 0 -> 196 bytes mods/ITEMS/mcl_tools/init.lua | 2 +- .../minetest-3d_armor/wieldview/transform.lua | 2 + mods/MAPGEN/mcl_biomes/init.lua | 76 +++++--- mods/MAPGEN/mcl_mapgen_core/init.lua | 25 ++- tools/Texture_Converter.py | 29 +-- 28 files changed, 256 insertions(+), 127 deletions(-) create mode 100644 mods/ITEMS/mcl_core/textures/default_dry_grass.png create mode 100644 mods/ITEMS/mcl_core/textures/default_dry_grass_side.png create mode 100644 mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_fern_bottom_dry.png create mode 100644 mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_fern_top_dry.png create mode 100644 mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_grass_bottom_dry.png create mode 100644 mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_grass_top_dry.png create mode 100644 mods/ITEMS/mcl_flowers/textures/mcl_flowers_fern_dry.png create mode 100644 mods/ITEMS/mcl_flowers/textures/mcl_flowers_tallgrass_dry.png diff --git a/mods/ENTITIES/mobs_mc_gameconfig/init.lua b/mods/ENTITIES/mobs_mc_gameconfig/init.lua index a41a8b4482..fbeb3d4954 100644 --- a/mods/ENTITIES/mobs_mc_gameconfig/init.lua +++ b/mods/ENTITIES/mobs_mc_gameconfig/init.lua @@ -150,7 +150,9 @@ mobs_mc.override.replace = { -- Sheep eat grass sheep = { { "mcl_core:dirt_with_grass", "mcl_core:dirt", -1 }, + { "mcl_core:dirt_with_dry_grass", "mcl_core:dirt", -1 }, { "mcl_flowers:tallgrass", "air", 0 }, + { "mcl_flowers:tallgrass_dry", "air", 0 }, }, -- Silverfish populate stone, etc. with monster eggs silverfish = { @@ -195,13 +197,13 @@ mobs_mc.override.spawn = { grassland_savanna = { mobs_mc.override.items.grass_block, "group:sand", "mcl_core:sandstone", "mcl_core:redsandstone" }, desert = { "group:sand" }, jungle = { "mcl_core:jungletree", "mcl_core:jungleleaves", "mcl_flowers:fern", "mcl_core:vine" }, - snow = { "mcl_core:snow", "mcl_core:snowblock", "mcl_core:dirt_with_grass_snow" }, + snow = { "mcl_core:snow", "mcl_core:snowblock", "mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_dry_grass_snow" }, -- End stone added for shulkers because End cities don't generate yet end_city = { "mcl_end:end_stone", "mcl_end:purpur_block" }, nether = { "mcl_nether:netherrack", "mcl_nether:quartz_ore" }, -- Netherrack added because there are no Nether fortresses yet. TODO: Remove netherrac from list as soon they're available nether_fortress = { "mcl_nether:nether_brick", "mcl_nether:netherrack" }, - wolf = { mobs_mc.override.items.grass_block, "mcl_core:dirt", "mcl_core:dirt_with_grass_snow", "mcl_core:snow", "mcl_core:snowblock", "mcl_core:podzol" }, + wolf = { mobs_mc.override.items.grass_block, "mcl_core:dirt", "mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_dry_grass_snow", "mcl_core:snow", "mcl_core:snowblock", "mcl_core:podzol" }, } -- This table contains important spawn height references for the mob spawn height. diff --git a/mods/ITEMS/mcl_core/functions.lua b/mods/ITEMS/mcl_core/functions.lua index f008d66f60..a4855063f1 100644 --- a/mods/ITEMS/mcl_core/functions.lua +++ b/mods/ITEMS/mcl_core/functions.lua @@ -645,7 +645,7 @@ local grass_spread_randomizer = PseudoRandom(minetest.get_mapgen_setting("seed") minetest.register_abm({ label = "Grass Block and Mycelium spread", nodenames = {"mcl_core:dirt"}, - neighbors = {"air", "mcl_core:dirt_with_grass", "mcl_core:mycelium"}, + neighbors = {"air", "group:grass_block", "mcl_core:mycelium"}, interval = 30, chance = 20, catch_up = false, @@ -1190,6 +1190,12 @@ end -- of the snowed node. mcl_core.register_snowed_node = function(itemstring_snowed, itemstring_clear, tiles, sounds) local def = table.copy(minetest.registered_nodes[itemstring_clear]) + local create_doc_alias + if def.description then + create_doc_alias = true + else + create_doc_alias = false + end -- Just some group clearing def.description = nil def._doc_items_longdesc = nil @@ -1224,7 +1230,7 @@ mcl_core.register_snowed_node = function(itemstring_snowed, itemstring_clear, ti -- Register stuff minetest.register_node(itemstring_snowed, def) - if minetest.get_modpath("doc") then + if create_doc_alias and minetest.get_modpath("doc") then doc.add_entry_alias("nodes", itemstring_clear, "nodes", itemstring_snowed) end end diff --git a/mods/ITEMS/mcl_core/nodes_base.lua b/mods/ITEMS/mcl_core/nodes_base.lua index 0aa6a041ee..b8ed7628d3 100644 --- a/mods/ITEMS/mcl_core/nodes_base.lua +++ b/mods/ITEMS/mcl_core/nodes_base.lua @@ -295,6 +295,7 @@ minetest.register_node("mcl_core:diorite_smooth", { _mcl_hardness = 1.5, }) +-- Grass Block minetest.register_node("mcl_core:dirt_with_grass", { description = "Grass Block", _doc_items_longdesc = "A grass block is dirt with a grass cover. Grass blocks are resourceful blocks which allow the growth of all sorts of plants. They can be turned into farmland with a hoe and turned into grass paths with a shovel. In light, the grass slowly spreads onto dirt nearby. Under an opaque block or a liquid, a grass block may turn back to dirt.", @@ -302,7 +303,7 @@ minetest.register_node("mcl_core:dirt_with_grass", { tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"}, is_ground_content = true, stack_max = 64, - groups = {handy=1,shovely=1, soil=1, soil_sapling=2, soil_sugarcane=1, cultivatable=2, spreading_dirt_type=1, enderman_takable=1, building_block=1}, + groups = {handy=1,shovely=1, grass_block=1, soil=1, soil_sapling=2, soil_sugarcane=1, cultivatable=2, spreading_dirt_type=1, enderman_takable=1, building_block=1}, drop = 'mcl_core:dirt', sounds = mcl_sounds.node_sound_dirt_defaults({ footstep = {name="default_grass_footstep", gain=0.4}, @@ -314,6 +315,29 @@ minetest.register_node("mcl_core:dirt_with_grass", { }) mcl_core.register_snowed_node("mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass") +-- Grass Block variant for dry biomes +minetest.register_node("mcl_core:dirt_with_dry_grass", { + _doc_items_create_entry = false, + tiles = {"default_dry_grass.png", "default_dirt.png", "default_dirt.png^default_dry_grass_side.png"}, + is_ground_content = true, + stack_max = 64, + groups = {handy=1,shovely=1, grass_block=1, soil=1, soil_sapling=2, soil_sugarcane=1, cultivatable=2, spreading_dirt_type=1, enderman_takable=1, building_block=1, not_in_creative_inventory=1}, + drop = 'mcl_core:dirt', + sounds = mcl_sounds.node_sound_dirt_defaults({ + footstep = {name="default_grass_footstep", gain=0.4}, + }), + on_construct = mcl_core.on_snowable_construct, + _mcl_snowed = "mcl_core:dirt_with_dry_grass_snow", + _mcl_blast_resistance = 3, + _mcl_hardness = 0.6, +}) +mcl_core.register_snowed_node("mcl_core:dirt_with_dry_grass_snow", "mcl_core:dirt_with_dry_grass") + +if minetest.get_modpath("doc") then + doc.add_entry_alias("nodes", "mcl_core:dirt_with_grass", "nodes", "mcl_core:dirt_with_dry_grass") + doc.add_entry_alias("nodes", "mcl_core:dirt_with_grass", "nodes", "mcl_core:dirt_with_dry_grass_snow") +end + minetest.register_node("mcl_core:grass_path", { tiles = {"mcl_core_grass_path_top.png", "default_dirt.png", "mcl_core_grass_path_side.png"}, description = "Grass Path", diff --git a/mods/ITEMS/mcl_core/nodes_trees.lua b/mods/ITEMS/mcl_core/nodes_trees.lua index d2ed7d0678..75241d8c8d 100644 --- a/mods/ITEMS/mcl_core/nodes_trees.lua +++ b/mods/ITEMS/mcl_core/nodes_trees.lua @@ -112,7 +112,7 @@ local register_sapling = function(subname, description, longdesc, texture, selbo local node_below = minetest.get_node_or_nil({x=pos.x,y=pos.y-1,z=pos.z}) if not node_below then return false end local nn = node_below.name - return (nn=="mcl_core:dirt_with_grass" or nn=="mcl_core:dirt_with_grass_snow" or + return ((minetest.get_item_group(nn, "grass_block") == 1) or nn=="mcl_core:podzol" or nn=="mcl_core:podzol_snow" or nn=="mcl_core:dirt") end), diff --git a/mods/ITEMS/mcl_core/textures/default_dry_grass.png b/mods/ITEMS/mcl_core/textures/default_dry_grass.png new file mode 100644 index 0000000000000000000000000000000000000000..e610678a629d2b865eac6e1b443c9479e07d17d9 GIT binary patch literal 171 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!93?!50ihlx9JOMr-uE}ABX{pw^rA`rkTFi@{ z_W{MDJY5_^Dj1U!I06!q68J98IB?*fQ?aeH_VMuSw$>hL6NzaXOj8VE(pPt;Thx5z zRc3xYm30x1)V59~9-fVTd^}2wO}speYaU5UL`2?RZ?J-EYnP#pVCGXMhKyWMm9%Pg Q8=x%=p00i_>zopr0Cv(co&W#< literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_core/textures/default_dry_grass_side.png b/mods/ITEMS/mcl_core/textures/default_dry_grass_side.png new file mode 100644 index 0000000000000000000000000000000000000000..b12d06e7b7f09a73a9a68add444a8fe907b51243 GIT binary patch literal 183 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPE^3h)VWjf^mkPqPg3*3Kw#@UT$; z3cr5rxe-XQl?3?({|5nv&HI<^2a5Q4x;TbZF!CJS%Gh8a;&4#><$m3UYZ?7-_Y3c2 z_SNmWy(4d)jC85BoAid*V7a$yey_jYHvSwruVU3leG`)dCnGLil{~><)F^R=W9b}5 Zh6UH;Zd40Qr~#VH;OXk;vd$@?2>@=9K`a0O literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_core/textures/default_grass.png b/mods/ITEMS/mcl_core/textures/default_grass.png index c0ec17276a09b727ecd169a04a05bd5e7249c295..56176e5ee73cfa906cbd7c0155f3fb9241849247 100644 GIT binary patch literal 428 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFwE_T zFU|k||JN@1Jr^j&nB?v5!qT5{GZ4t(EbxddW?=Uk%w8ov@uNl#cQTt@Alt*?W{22fUJOox$2!yjJIZg z`{K*Cb1~1Z3kN2>yRs*;_f}d?TI5H+5`)v$RvUCyd!4htJB>XkPI#f&JLi<>zE&OQ zuM?ggziyw*%;Eq2eu5^@GSw2-h?11Vl2ohYqEsNoU}Ruuu4`zhYiJT;WN2k`;tg7*Lb delta 155 zcmZ3(yqa->L_HHT0|P_ST=7ppiYLG)#8ubFP%qNPFx^SRRm;e~x)LZJ<>}%WQo)#< zz!8v;l)!g!#(@L>oQiFowU38qx3%_2n@CLCV47kOlfJq$-J<3zuQK!NsjQ25q_%Y` z@$hWy{QTe}Q(1T&v9F^FX3imIeltJ?srVeoYIb6Mw< G&;$T#gfNT% diff --git a/mods/ITEMS/mcl_core/textures/default_grass_side.png b/mods/ITEMS/mcl_core/textures/default_grass_side.png index d65d050bfbc1e275ee871e95fce5a59bac34debf..a44b9788f982748a830d7f5ff105e19f296e588d 100644 GIT binary patch delta 291 zcmV+;0o?w#0kQ&+7=H)`0000V^Z#K00004VQb$4nuFf3k0002&Nkl_zI*<0V%8${D?&e3m0ftAjMJ+;8)GOee-tS zt~#8K6Mz>9*Ji-hz}akp6$Q?x7IqOUtt6wC&8-M;QtQEaWEz@6D`g5Ap; zVJs`oAD_xPUz-8Z;s%!QFw_I4XzA+?FPh^j{=ngMoJ{e{lMV^91b{BT;HNQd{=?V# pTfM&Tr{}jl{~Ut->IWXUhZ~7`XfDHhgG~Sc002ovPDHLkV1gmUgUA2? delta 167 zcmdnQw4HH+L_G^L0|Ud`yN`l^lu&?Ah^t-LVkc{0+a z)^5@pVuR)0s`= 8) or (light_day and light_day >= minetest.LIGHT_MAX) then light_ok = true end - return (soil_node.name == "mcl_core:dirt" or soil_node.name == "mcl_core:dirt_with_grass" or soil_node.name == "mcl_core:dirt_with_grass_snow" or soil_node.name == "mcl_core:coarse_dirt" or soil_node.name == "mcl_core:podzol" or soil_node.name == "mcl_core:podzol_snow") and light_ok + return (soil_node.name == "mcl_core:dirt" or minetest.get_item_group(soil_node.name, "grass_block") == 1 or soil_node.name == "mcl_core:coarse_dirt" or soil_node.name == "mcl_core:podzol" or soil_node.name == "mcl_core:podzol_snow") and light_ok end) local function add_simple_flower(name, desc, image, simple_selection_box) @@ -74,68 +74,96 @@ local wheat_seed_drop = { } } --- Tall Grass -minetest.register_node("mcl_flowers:tallgrass", { - description = "Tall Grass", - _doc_items_longdesc = "Tall grass is a small plant which often occours on the surface of grasslands. It can be harvested for wheat seeds. By using bone meal, tall grass can be turned into double tallgrass which is two blocks high.", - _doc_items_hidden = false, - drawtype = "plantlike", - waving = 1, - tiles = {"mcl_flowers_tallgrass.png"}, - inventory_image = "mcl_flowers_tallgrass.png", - wield_image = "mcl_flowers_tallgrass.png", - selection_box = { - type = "fixed", - fixed = {{ -6/16, -8/16, -6/16, 6/16, 8/16, 6/16 }}, - }, - paramtype = "light", - sunlight_propagates = true, - walkable = false, - buildable_to = true, - is_ground_content = true, +-- Tall Grass and Fern +for i=1,2 do -- CHECKME: How does tall grass behave when pushed by a piston? - groups = {dig_immediate=3, flammable=3,attached_node=1,plant=1,place_flowerlike=1,non_mycelium_plant=1,dig_by_water=1,destroy_by_lava_flow=1,deco_block=1}, - sounds = mcl_sounds.node_sound_leaves_defaults(), - drop = wheat_seed_drop, - _mcl_shears_drop = true, - node_placement_prediction = "", - on_place = on_place_flower, - _mcl_blast_resistance = 0, - _mcl_hardness = 0, -}) + local tgf_groups = {dig_immediate=3, flammable=3,attached_node=1,plant=1,place_flowerlike=1,non_mycelium_plant=1,dig_by_water=1,destroy_by_lava_flow=1,deco_block=1} ---- Fern --- -minetest.register_node("mcl_flowers:fern", { - description = "Fern", - _doc_items_longdesc = "Ferns are small plants which occour naturally in grasslands. They can be harvested for wheat seeds. By using bone meal, a fern can be turned into a large fern which is two blocks high.", - drawtype = "plantlike", - waving = 1, - tiles = { "mcl_flowers_fern.png" }, - inventory_image = "mcl_flowers_fern.png", - wield_image = "mcl_flowers_fern.png", - sunlight_propagates = true, - paramtype = "light", - walkable = false, - stack_max = 64, - -- CHECKME: How does a fern behave when pushed by a piston? - groups = {dig_immediate=3,flammable=2,attached_node=1,plant=1,place_flowerlike=1,non_mycelium_plant=1,dig_by_water=1,destroy_by_lava_flow=1,deco_block=1}, - buildable_to = true, - sounds = mcl_sounds.node_sound_leaves_defaults(), - node_placement_prediction = "", - on_place = on_place_flower, - drop = wheat_seed_drop, - _mcl_shears_drop = true, - selection_box = { - type = "fixed", - fixed = { -4/16, -0.5, -4/16, 4/16, 7/16, 4/16 }, - }, -}) + local id, idf, longdesc, longdesc_fern, create_entry, shears_drop, shears_drop_fern + if i==1 then + id = "tallgrass" + idf = "fern" + longdesc = "Tall grass is a small plant which often occours on the surface of grasslands. It can be harvested for wheat seeds. By using bone meal, tall grass can be turned into double tallgrass which is two blocks high." + longdesc_fern = "Ferns are small plants which occour naturally in grasslands. They can be harvested for wheat seeds. By using bone meal, a fern can be turned into a large fern which is two blocks high." + hidden = false + shears_drop = true + shears_drop_fern = true + else + id = "tallgrass_dry" + idf = "fern_dry" + tgf_groups.not_in_creative_inventory = 1 + create_entry = false + shears_drop = {"mcl_flowers:tallgrass"} + shears_drop_fern = {"mcl_flowers:fern"} + end + + --- Tall Grass --- + minetest.register_node("mcl_flowers:"..id, { + description = "Tall Grass", + drawtype = "plantlike", + _doc_items_longdesc = longdesc, + _doc_items_hidden = hidden, + _doc_items_create_entry = create_entry, + waving = 1, + tiles = {"mcl_flowers_"..id..".png"}, + inventory_image = "mcl_flowers_"..id..".png", + wield_image = "mcl_flowers_"..id..".png", + selection_box = { + type = "fixed", + fixed = {{ -6/16, -8/16, -6/16, 6/16, 8/16, 6/16 }}, + }, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + is_ground_content = true, + groups = tgf_groups, + sounds = mcl_sounds.node_sound_leaves_defaults(), + drop = wheat_seed_drop, + _mcl_shears_drop = shears_drop, + node_placement_prediction = "", + on_place = on_place_flower, + _mcl_blast_resistance = 0, + _mcl_hardness = 0, + }) + + --- Fern --- + minetest.register_node("mcl_flowers:"..idf, { + description = "Fern", + _doc_items_longdesc = longdesc_fern, + _doc_items_create_entry = create_entry, + _doc_items_hidden = hidden, + drawtype = "plantlike", + waving = 1, + tiles = { "mcl_flowers_"..idf..".png" }, + inventory_image = "mcl_flowers_"..idf..".png", + wield_image = "mcl_flowers_"..idf..".png", + sunlight_propagates = true, + paramtype = "light", + walkable = false, + stack_max = 64, + groups = tgf_groups, + buildable_to = true, + sounds = mcl_sounds.node_sound_leaves_defaults(), + node_placement_prediction = "", + on_place = on_place_flower, + drop = wheat_seed_drop, + _mcl_shears_drop = shears_drop_fern, + selection_box = { + type = "fixed", + fixed = { -4/16, -0.5, -4/16, 4/16, 7/16, 4/16 }, + }, + }) +end + +doc.add_entry_alias("nodes", "mcl_flowers:tallgrass", "nodes", "mcl_flowers:tallgrass_dry") +doc.add_entry_alias("nodes", "mcl_flowers:fern", "nodes", "mcl_flowers:fern_dry") local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_img, selbox_radius, selbox_top_height, drop, shears_drop, is_flower) if not inv_img then inv_img = top_img end - local flowergroup, usagehelp + local flowergroup, usagehelp, noncreative, create_entry if is_flower == nil then is_flower = true end @@ -143,6 +171,11 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im flowergroup = 1 usagehelp = flowerusagehelp end + if longdesc == nil then + noncreative = 1 + create_entry = false + usagehelp = nil + end -- Drop itself by default local drop_bottom, drop_top if not drop then @@ -153,6 +186,7 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im end minetest.register_node("mcl_flowers:"..name, { description = desc, + _doc_items_create_entry = create_entry, _doc_items_longdesc = longdesc, _doc_items_usagehelp = usagehelp, drawtype = "plantlike", @@ -217,7 +251,7 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im -- * Allowed on dirt or grass block -- * Only with light level >= 8 -- * Only if two enough space - if (floorname == "mcl_core:dirt" or floorname == "mcl_core:dirt_with_grass" or floorname == "mcl_core:dirt_with_grass_snow" or floorname == "mcl_core:coarse_dirt" or floorname == "mcl_core:podzol" or floorname == "mcl_core:podzol_snow") and bottom_buildable and top_buildable and light_ok then + if (floorname == "mcl_core:dirt" or minetest.get_item_group(floorname, "grass_block") == 1 or floorname == "mcl_core:coarse_dirt" or floorname == "mcl_core:podzol" or floorname == "mcl_core:podzol_snow") and bottom_buildable and top_buildable and light_ok then -- Success! We can now place the flower minetest.sound_play(minetest.registered_nodes["mcl_flowers:"..name].sounds.place, {pos = bottom, gain=1}) minetest.set_node(bottom, {name="mcl_flowers:"..name}) @@ -236,7 +270,7 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im minetest.remove_node(top) end end, - groups = {dig_immediate=3,flammable=2,flower=flowergroup,place_flowerlike=1,non_mycelium_plant=1,attached_node=1, dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1, plant=1,double_plant=1,deco_block=1}, + groups = {dig_immediate=3,flammable=2,flower=flowergroup,place_flowerlike=1,non_mycelium_plant=1,attached_node=1, dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1, plant=1,double_plant=1,deco_block=1,not_in_creative_inventory=noncreative}, sounds = mcl_sounds.node_sound_leaves_defaults(), }) @@ -268,8 +302,9 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im sounds = mcl_sounds.node_sound_leaves_defaults(), }) - if minetest.get_modpath("doc") then + if minetest.get_modpath("doc") and longdesc then doc.add_entry_alias("nodes", "mcl_flowers:"..name, "nodes", "mcl_flowers:"..name.."_top") + -- If no longdesc, help alias must be added manually end end @@ -281,8 +316,24 @@ add_large_plant("lilac", "Lilac", "A lilac is a large plant which occupies two b -- TODO: Make the sunflower face East. Requires a mesh for the top node. add_large_plant("sunflower", "Sunflower", "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", 3/16, 4/16) -add_large_plant("double_grass", "Double Tallgrass", "Double tallgrass a variant of tall grass and occupies two blocks. It can be harvested for wheat seeds.", "mcl_flowers_double_plant_grass_bottom.png", "mcl_flowers_double_plant_grass_top.png", nil, 5/16, 7/16, wheat_seed_drop, {"mcl_flowers:tallgrass 2"}, false) -add_large_plant("double_fern", "Large Fern", "Large fern is a variant of fern and occupies two blocks. It can be harvested for wheat seeds.", "mcl_flowers_double_plant_fern_bottom.png", "mcl_flowers_double_plant_fern_top.png", nil, 6/16, 5/16, wheat_seed_drop, {"mcl_flowers:fern 2"}, false) +for i=1, 2 do + local longdesc_grass, longdesc_fern, dry + if i==1 then + longdesc_grass = "Double tallgrass a variant of tall grass and occupies two blocks. It can be harvested for wheat seeds." + longdesc_fern = "Large fern is a variant of fern and occupies two blocks. It can be harvested for wheat seeds." + dry = "" + else + -- ID/texture name modifier + dry = "_dry" + end + add_large_plant("double_grass"..dry, "Double Tallgrass", longdesc_grass, "mcl_flowers_double_plant_grass_bottom"..dry..".png", "mcl_flowers_double_plant_grass_top"..dry..".png", nil, 5/16, 7/16, wheat_seed_drop, {"mcl_flowers:tallgrass 2"}, false) + add_large_plant("double_fern"..dry, "Large Fern", longdesc_fern, "mcl_flowers_double_plant_fern_bottom"..dry..".png", "mcl_flowers_double_plant_fern_top"..dry..".png", nil, 6/16, 5/16, wheat_seed_drop, {"mcl_flowers:fern 2"}, false) +end + +doc.add_entry_alias("nodes", "mcl_flowers:double_grass", "nodes", "mcl_flowers:double_grass_dry") +doc.add_entry_alias("nodes", "mcl_flowers:double_grass", "nodes", "mcl_flowers:double_grass_dry_top") +doc.add_entry_alias("nodes", "mcl_flowers:double_fern", "nodes", "mcl_flowers:double_fern_dry") +doc.add_entry_alias("nodes", "mcl_flowers:double_fern", "nodes", "mcl_flowers:double_fern_dry_top") minetest.register_abm({ label = "Pop out flowers", @@ -299,7 +350,7 @@ minetest.register_abm({ return end -- Pop out flower if not on dirt, grass block or too low brightness - if (below.name ~= "mcl_core:dirt" and below.name ~= "mcl_core:dirt_with_grass" and below.name ~= "mcl_core:dirt_with_grass_snow") or (minetest.get_node_light(pos, 0.5) < 8) then + if (below.name ~= "mcl_core:dirt" and minetest.get_item_group(below.name, "grass_block") ~= 1) or (minetest.get_node_light(pos, 0.5) < 8) then minetest.dig_node(pos) return end diff --git a/mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_fern_bottom.png b/mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_fern_bottom.png index 448cdebaffdbb1f511b17e430f654accd0749314..c63d4dbf9b6ef02e03ee85f1ff39815a20f4b63e 100644 GIT binary patch delta 164 zcmZo+KEOCZrCv0^C&ZP3fkD?%#XP~%wcXn+NZ-Iq(>mWFt7ml(P=c`}$S;_|;n|He zAScq(#WAFUF`0qMQI%C7^^L#@2DX!$3w1IT6ql-8Pf!+U_Vf((<60F+q~yjT4V!BJa9l Ppe+oZu6{1-oD!MBEfgJV{PhVH|hwLK4 z7W_}IACdtI#dx|nhHzX@PDn@)2nk}C#B+?Vktboo9HCQ_*o1<-ig?YK3};LUxjN-Q z(W*u-K7r7tg**bW0<#=_Ri_-)Wn6Q^kY&x>gPwt&tV)txSEnwMVhEMxFyznRV>V)D zc;m$5xbbCDD9|3&64!{5l*E!$tK_0oAjM#0U}&yuV6JOq5MpR)Wol++XsT^sWMyD* i`PC{d6b-rgDVb@NxHT-=E;J3Ofx*+&&t;ucLK6Vl+G~jb diff --git a/mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_fern_bottom_dry.png b/mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_fern_bottom_dry.png new file mode 100644 index 0000000000000000000000000000000000000000..f65a1bf00ac03c8ebe8412e7483041d396770d48 GIT binary patch literal 192 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPE^4e$wZ1=7K;s%fd#^}W8yVTKWY zTDhf8(xsZ(Kncc@AirP+hi5m^fSgEA7srqa#$*O2M^#pV)Hebr7}!o~F4W0XP+Y2V zJwaKZ+0!%Bms4lC)QTqzfvOUx7%s9dl)Mt+6nRJJK$ooZfm@PuM5cx)Oj;Nao4JZH j;A*26Pe8H61WATBPCSl@yz7dAmN0m_`njxgN@xNABwaS{ literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_fern_top.png b/mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_fern_top.png index 9b7d3717ff6dfb7708015f93312dd68cb8585148..c44d03d34473502f0e3cc17e68c5b71664a720f0 100644 GIT binary patch delta 98 zcmeyuw25(oim6b5Plzi61A}$GgL#6bS&+VKySIUtrrqmBHb7Cvk|4ie28U-i(tsR4 zPZ!6K3dUpwmWeyfl^8cfr8>K_ZkVu9DL|JYQtIIm4geCyjuTsqb diff --git a/mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_fern_top_dry.png b/mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_fern_top_dry.png new file mode 100644 index 0000000000000000000000000000000000000000..2b64566e7fbd61e45e6f6eb6507b4f667a7453ed GIT binary patch literal 178 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPE^3h)VW1=6{tPHCyu$zg`|y}l8C zT6s6L=Kw_+OM?7@862M7NCR^GJY5_^Dj1U$SXvTz5)Dp1IQ}v?g&dWFbiWcWMO7f@Dg!d$fFvVEY7$gD%IJYb;E>>N&&hInZoSK Ub(0KE15IY|boFyt=akR{0Jz;Ss{jB1 literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_grass_bottom.png b/mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_grass_bottom.png index 5ae10c09b24da2e43645a6dc5179027ef786d9c3..a1b97146fa2d6c1b2ac8dfac5ea8186c0c41ab55 100644 GIT binary patch delta 196 zcmV;#06YJs1K)HH>Z7geW2k1Mrs1mf|NsB$g~drg6^tc8e!&b5&u*lFI7!~_E}S24E`0;!u$OrH zy0SlH7ZJALe|r6p3{a@t)5S4_kzuHEw}{PB)6ee>S^+mzWqN7=fE?cI0x=i%c&nQZh$l-_*kcn5TXYKdz^ zNlIc#s#S7PDv)9@GB7mPH89sTG6*rWv@$ibGBnjTFtRc*xcq9B7K(=4{FKbJO57S2 TZ5Nsb)WG2B>gTe~DWM4f4$X*N diff --git a/mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_grass_bottom_dry.png b/mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_grass_bottom_dry.png new file mode 100644 index 0000000000000000000000000000000000000000..e2703bf6f6479691ce0b280959ddfe48b382d099 GIT binary patch literal 224 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPGa4)6(a1=6{tPHCyu+1{$8he>;HEj3q&S!3+-1ZlnP@#hxyXAr*|O#|*g+IS8~})So<~>InBA zjU#2vS-M%jSbgn}CG{^lUUu-&!Nmu)66Wae7{ydYS|6%8I{h2p^6*cMn$FGD+gENZ zuxI)*DY~g;Nvr6;6_N$lHjBKFVdQj@c=p2>=a-F-!me literal 364 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFZ5I#?qpW# zY3QV;7ipvGWBC97|IZa2e}Qt0B|(0{3=Yq3q=7g|-tI2!Vu>BEfgJV{PhVH|hwLK4 z7W_}IACdtIxp=xbhHzX@PEe3CXc83AVA#kgV7;1wGnJ8zEp38EhXGTOL<^6k1aAVD z=mD!xNePjIN}fDx5(L@Q*p{(KFeh2GFfyz)VOA;qE*1$iPqoA~q9i4;B-JXpC>2OC z7#SFv>l&Er8X1HbT3VT!Ss9vY8yHy`7+ij}N()6pZhlH;S|x4`i?$0*18QLKboFyt I=akR{0N1NsB>(^b diff --git a/mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_grass_top_dry.png b/mods/ITEMS/mcl_flowers/textures/mcl_flowers_double_plant_grass_top_dry.png new file mode 100644 index 0000000000000000000000000000000000000000..c708e44b1051d1e125f278a30026acb29c5990a5 GIT binary patch literal 166 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPE^4e$wZ1=6Kq+PS4p<*lCC-l}P- z*2!Up=XlQv10@(sg8YIR9G=}s19I#=T^vIy7<-Rx6m&2UVYu*p^5y3~A7p=RXmXwN zxBbF}=b`6!C^#&7d~1W5R>&OQ&x%$aLP_b2{hE$}@9YKQZ|C&ZP3fx$Z8!92mzvEJP*NZ-IqQ`b>t_uITHKncc@AirP+hi5m^ zfShDc7srqa#^eM16ZgmjH90Uki>fE8yD~12TdFWsfSrvkO#Hfldvf@Kh7}7s7G*48 zU|t-wU{z4ZA|~eM;8j5xtAql4Bcie*qBxitIPUQBI86{K0vgNU>FVdQ&MBb@029_N Aj{pDw delta 345 zcmX@b*uy+QrJg0-(btiIVPik{pF~y$1_p&>k04(LhAK4%hK3dfhF?ITh8GMBr3MTP zuM!v-tY$DUh!@P+6=(yLkO=SzaRt(b=}vl)HfE)sx;};)u3Bm~YXATL-~ZU;E>MoK zB*-tA!Qt7BG!Q4r+uem-EV1J?ki%Z$>FX-V{*YZn*nfE8yDso^T&gftfSrvkO#Hfld-4J$$3RCx*NYB}Y;H>(LYE4-va+!) z4_SI4M0LTe4O^~k*doBjz;TC{CtmNU2hd#A64!{5l*E!$tK_0oAjM#0U}&yuV6JOq z5MpR)Wol++XsT^sWMyD*`PC{dmmgng-Ot;OXk;vd$@?2>?Av BV%z`# diff --git a/mods/ITEMS/mcl_flowers/textures/mcl_flowers_fern_dry.png b/mods/ITEMS/mcl_flowers/textures/mcl_flowers_fern_dry.png new file mode 100644 index 0000000000000000000000000000000000000000..068d83fc36ba7a9b56714cf8fb0582b9d9cbf635 GIT binary patch literal 202 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPE^4e$wZ1=6{tPHCyu<*lB{VTKWY zTEVWW(%Wp-03{epg8YIR9G=}s19Fl*T^vIy7?Th1vn231N;r3T-eB;M?AEYsJUXLw zj#KPGqjh?R)S4U^oki6X)m<4E$SqZvD!|Uh7AAgOz&$y9LBom#9g8v+FfcC;TCggp tV-XW`bMUI5j8#Gbz7bJb5m6k>3>Z|C&abjT)K6>gISQiW4*h1f~Bsbih-AAsTjvH1_lPkk|4ie28U-i l(tw;;PZ!6K3dUpwzKMGx1XeXT2LJ^bJYD@<);T3K0RZsc7s&ts delta 278 zcmX@Y*v33TrJg0-(btiIVPik{pF~y$1_p&>k04(LhAK4%hK3dfhF?ITh8GMBr3MTP zuM!v-tY$DUh!@P+6=(yLkO=SzaRt(b=}x*nhGwOndXYA2HfkEKTL1t5zg5)n6)4A8 z666=m;PC858i^mUbFf5{v;S3j3^P6