Fixed cake bug

This commit is contained in:
Billy S 2019-04-28 08:53:43 -04:00
parent d0abeb7d06
commit 8b0bdb8eb9
3 changed files with 4 additions and 7 deletions

View File

@ -159,7 +159,7 @@ minetest.register_abm({
interval = 1, interval = 1,
chance = 1, chance = 1,
catch_up = false, catch_up = false,
action = function(pos, node, obj_count) action = function(pos, node)
-- Get items (if any) -- Get items (if any)
local searchPos = {x = pos.x, y = pos.y + 0.5, z = pos.z} local searchPos = {x = pos.x, y = pos.y + 0.5, z = pos.z}
local objs = minetest.get_objects_inside_radius(searchPos, 0.5) local objs = minetest.get_objects_inside_radius(searchPos, 0.5)

View File

@ -47,12 +47,7 @@ for i, size in ipairs(sizes) do
} }
}, },
on_rightclick = function(pos, node, clicker) on_rightclick = function(pos, node, clicker)
-- clicker:set_hp(clicker:get_hp() + 1) stamina.change(clicker, 2)
local name = clicker:get_player_name()
local h = tonumber(hud.hunger[name])
h = h + 2
hud.hunger[name] = h
hud.set_hunger(clicker)
if i < #sizes then if i < #sizes then
minetest.swap_node(pos, {name="cake:cake_"..i}) minetest.swap_node(pos, {name="cake:cake_"..i})
else else

View File

@ -1 +1,3 @@
name = cake name = cake
description = Slicable cake
depends = bucket, farming, stamina