From 16adc1b0294ceea720872cb4e8de8586f996e616 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 23 May 2017 01:45:35 +0200 Subject: [PATCH] Add cake group --- GROUPS.md | 1 + mods/ITEMS/mcl_cake/init.lua | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/GROUPS.md b/GROUPS.md index ffe60e37..6926fb3f 100644 --- a/GROUPS.md +++ b/GROUPS.md @@ -104,6 +104,7 @@ These groups are used mostly for informational purposes * `flower_pot`: Flower pot * `flower_pot=1`: Empty flower pot * `flower_pot=2`: Flower pot with a plant or flower +* `cake`: Cake (rating = slices left) * `book=1`: Book * `pane=1`: Node is a “pane”-like node glass pane or iron bars * `bed=1`: Bed diff --git a/mods/ITEMS/mcl_cake/init.lua b/mods/ITEMS/mcl_cake/init.lua index 9e8e101f..fc0ac015 100644 --- a/mods/ITEMS/mcl_cake/init.lua +++ b/mods/ITEMS/mcl_cake/init.lua @@ -46,7 +46,7 @@ minetest.register_node("mcl_cake:cake", { fixed = full_cake }, stack_max = 1, - groups = {handy=1, food=2,attached_node=1, dig_by_piston=1}, + groups = {handy=1, cake=7, food=2,attached_node=1, dig_by_piston=1}, drop = '', on_rightclick = function(pos, node, clicker, itemstack) minetest.do_item_eat(2, ItemStack("mcl_cake:cake_6"), ItemStack("mcl_cake:cake"), clicker, {type="nothing"}) @@ -92,7 +92,7 @@ local register_slice = function(level, nodebox, desc) type = "fixed", fixed = nodebox, }, - groups = {handy=1, food=2,attached_node=1,not_in_creative_inventory=1,dig_by_piston=1}, + groups = {handy=1, cake=level, food=2,attached_node=1,not_in_creative_inventory=1,dig_by_piston=1}, drop = '', on_rightclick = on_rightclick, sounds = mcl_sounds.node_sound_leaves_defaults(),