-- Namespace: test
--
-- the higher it is the more it's "eaten"
+
+minetest.register_food("cake:cake_item_placeholder",{
+ description = "",
+ texture = "nothing.png",
+ satiation=30,
+ hunger=6,
+})
+
+
for i = 0,13 do
local missing_slice
if i == 0 then
on_construct = function(pos)
--randomly cake eats itself
if math.random() > 0.995 then
- minetest.set_node(pos, {name="cake:cursed_cake_1"})
+ minetest.set_node(pos, {name="cake:cursed_cake_0"})
end
end,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
- clicker:set_hp(clicker:get_hp()+5)
+ player_eat_food(clicker,"cake:cake_item_placeholder")
+ --clicker:set_hp(clicker:get_hp()+5)
if i == 13 then
minetest.sound_play("eat_finish",{pos=pos,gain=0.2,pitch=math.random(90,100)/100})
minetest.remove_node(pos)
timer:start(0.2)
end,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
+ player_eat_food(clicker,"cake:cake_item_placeholder")
clicker:set_hp(clicker:get_hp()-5)
end,
on_timer = function(pos, elapsed)
minetest.register_craft({
- output = "cake:cake_1",
+ output = "cake:cake_0",
recipe = {
{"weather:snowball","weather:snowball","weather:snowball"},
{"farming:wheat","farming:wheat","farming:wheat"},