Add cake group

This commit is contained in:
Wuzzy 2017-05-23 01:45:35 +02:00
parent 3ff572d2bc
commit 16adc1b029
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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(),