From 817368f0238b2cebc3de4db06209c13d99feb5e1 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 10 Feb 2017 22:00:39 +0100 Subject: [PATCH] Add flower_pot group --- API.md | 3 +++ mods/mcl_flowerpots/nodes.lua | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/API.md b/API.md index 02f788aa13..143775d2b5 100644 --- a/API.md +++ b/API.md @@ -64,6 +64,9 @@ These groups are used mostly for informational purposes * `fence_gate=1`: Fence gate * `fence_wood=1`: Wooden fence * `fence_nether_brick=1`: Nether brick fence +* `flower_pot`: Flower pot + * `flower_pot=1`: Empty flower pot + * `flower_pot=2`: Flower pot with a plant or flower * `clock=1`: Clock * `compass`: Compass (rating doesn't matter) * `book=1`: Book diff --git a/mods/mcl_flowerpots/nodes.lua b/mods/mcl_flowerpots/nodes.lua index a615e4eb24..1d29855063 100644 --- a/mods/mcl_flowerpots/nodes.lua +++ b/mods/mcl_flowerpots/nodes.lua @@ -47,7 +47,7 @@ minetest.register_node("mcl_flowerpots:flower_pot", { fixed = {-0.2, -0.5, -0.2, 0.2, -0.1, 0.2} }, inventory_image = "mcl_flowerpots_flowerpot_inventory.png", - groups = {dig_immediate=3,deco_block=1,attached_node=1}, + groups = {dig_immediate=3, deco_block=1, attached_node=1, flower_pot=1}, sounds = mcl_core.node_sound_stone_defaults(), on_rightclick = function(pos, node, clicker, itemstack) local item = clicker:get_wielded_item():get_name() @@ -106,7 +106,7 @@ minetest.register_node("mcl_flowerpots:flower_pot_"..flower, { type = "fixed", fixed = {-0.2, -0.5, -0.2, 0.2, -0.1, 0.2} }, - groups = {dig_immediate=3, attached_node=1,not_in_creative_inventory=1}, + groups = {dig_immediate=3, attached_node=1, not_in_creative_inventory=1, flower_pot=2}, sounds = mcl_core.node_sound_stone_defaults(), on_rightclick = function(pos, item, clicker) minetest.add_item({x=pos.x, y=pos.y+0.5, z=pos.z}, flower_node) @@ -142,7 +142,7 @@ minetest.register_node("mcl_flowerpots:flower_pot_"..flower, { type = "fixed", fixed = {-0.2, -0.5, -0.2, 0.2, -0.1, 0.2} }, - groups = {dig_immediate=3, attached_node=1,not_in_creative_inventory=1}, + groups = {dig_immediate=3, attached_node=1, not_in_creative_inventory=1, flower_pot=2}, sounds = mcl_core.node_sound_stone_defaults(), on_rightclick = function(pos, item, clicker) minetest.add_item({x=pos.x, y=pos.y+0.5, z=pos.z}, flower_node)