From 3b7b055e2c781960ac7e24fa518267d871fae0c3 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Thu, 11 Mar 2021 22:42:42 +0100 Subject: [PATCH] add saplings to mcl_flowerpots --- mods/ITEMS/mcl_flowerpots/init.lua | 56 +++++++++++++++++++++++++++++- mods/ITEMS/mcl_flowers/init.lua | 8 +++++ 2 files changed, 63 insertions(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_flowerpots/init.lua b/mods/ITEMS/mcl_flowerpots/init.lua index 44507cf212..d9876148f5 100644 --- a/mods/ITEMS/mcl_flowerpots/init.lua +++ b/mods/ITEMS/mcl_flowerpots/init.lua @@ -154,7 +154,7 @@ function mcl_flowerpots.register_potted_cube(name, def) groups = {dig_immediate=3, attached_node=1, dig_by_piston=1, not_in_creative_inventory=1, flower_pot=2}, sounds = mcl_sounds.node_sound_stone_defaults(), on_rightclick = function(pos, item, clicker) - local name = "" + local player_name = "" if clicker:is_player() then player_name = clicker:get_player_name() end @@ -183,3 +183,57 @@ mcl_flowerpots.register_potted_cube("mcl_core:cactus", { desc = S("Cactus"), image = "mcl_flowerpots_cactus.png", }) + +mcl_flowerpots.register_potted_flower("mcl_mushrooms:mushroom_brown", { + name = "mushroom_brown", + desc = S("Brown Mushroom"), + image = "farming_mushroom_brown.png", +}) + +mcl_flowerpots.register_potted_flower("mcl_mushrooms:mushroom_red", { + name = "mushroom_red", + desc = S("Red Mushroom"), + image = "farming_mushroom_red.png", +}) + +mcl_flowerpots.register_potted_flower("mcl_core:sapling", { + name = "sapling", + desc = S("Oak Sapling"), + image = "default_sapling.png", +}) + +mcl_flowerpots.register_potted_flower("mcl_core:acaciasapling", { + name = "acaciasapling", + desc = S("Acacia Sapling"), + image = "default_acacia_sapling.png", +}) + +mcl_flowerpots.register_potted_flower("mcl_core:junglesapling", { + name = "junglesapling", + desc = S("Jungle Sapling"), + image = "default_junglesapling.png", +}) + +mcl_flowerpots.register_potted_flower("mcl_core:darksapling", { + name = "darksapling", + desc = S("Dark Oak Sapling"), + image = "mcl_core_sapling_big_oak.png", +}) + +mcl_flowerpots.register_potted_flower("mcl_core:sprucesapling", { + name = "sprucesapling", + desc = S("Spruce Sapling"), + image = "mcl_core_sapling_spruce.png", +}) + +mcl_flowerpots.register_potted_flower("mcl_core:birchsapling", { + name = "birchsapling", + desc = S("Birch Sapling"), + image = "mcl_core_sapling_birch.png", +}) + +mcl_flowerpots.register_potted_flower("mcl_core:deadbush", { + name = "deadbush", + desc = S("Dead Bush"), + image = "default_dry_shrub.png", +}) diff --git a/mods/ITEMS/mcl_flowers/init.lua b/mods/ITEMS/mcl_flowers/init.lua index aa94d54003..adda8c2275 100644 --- a/mods/ITEMS/mcl_flowers/init.lua +++ b/mods/ITEMS/mcl_flowers/init.lua @@ -169,6 +169,14 @@ def_fern.selection_box = { minetest.register_node("mcl_flowers:fern", def_fern) +if has_mcl_flowerpots then + mcl_flowerpots.register_potted_flower("mcl_flowers:fern", { + name = "fern", + desc = S("Fern"), + image = "mcl_flowers_fern.png", + }) +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) if not inv_img then inv_img = top_img