1
0
Fork 0

Add wither rose

This commit is contained in:
cora 2022-10-28 21:02:45 +02:00
parent eef4b52ce4
commit dec207368c
3 changed files with 10 additions and 1 deletions

View File

@ -51,6 +51,9 @@ local on_place_flower = mcl_util.generate_on_place_plant_function(function(pos,
if (light_night and light_night >= 8) or (light_day and light_day >= minetest.LIGHT_MAX) then if (light_night and light_night >= 8) or (light_day and light_day >= minetest.LIGHT_MAX) then
light_ok = true light_ok = true
end end
if itemstack:get_name() == "mcl_flowers:wither_rose" and ( minetest.get_item_group(soil_node.name, "grass_block") > 0 or soil_node.name == "mcl_core:dirt" or soil_node.name == "mcl_core:coarse_dirt" or soil_node.name == "mcl_mud:mud" or soil_node.name == "mcl_moss:moss" or soil_node.name == "mcl_nether:netherrack" or minetest.get_item_group(soil_node.name, "soul_block") > 0 ) then
return true,colorize
end
local is_flower = minetest.get_item_group(itemstack:get_name(), "flower") == 1 local is_flower = minetest.get_item_group(itemstack:get_name(), "flower") == 1
local ok = (soil_node.name == "mcl_core:dirt" or minetest.get_item_group(soil_node.name, "grass_block") == 1 or (not is_flower and (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 local ok = (soil_node.name == "mcl_core:dirt" or minetest.get_item_group(soil_node.name, "grass_block") == 1 or (not is_flower and (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 ok, colorize return ok, colorize

View File

@ -59,4 +59,10 @@ mcl_flowers.register_simple_flower("blue_orchid", {
image = "mcl_flowers_blue_orchid.png", image = "mcl_flowers_blue_orchid.png",
selection_box = { -5/16, -0.5, -5/16, 5/16, 7/16, 5/16 }, selection_box = { -5/16, -0.5, -5/16, 5/16, 7/16, 5/16 },
potted = true, potted = true,
}) })
mcl_flowers.register_simple_flower("wither_rose", {
desc = S("Wither Rose"),
image = "mcl_flowers_wither_rose.png",
selection_box = { -3/16, -0.5, -3/16, 3/16, 6/16, 3/16 },
potted = true,
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB