Fixed cake bug
This commit is contained in:
parent
d0abeb7d06
commit
8b0bdb8eb9
@ -159,7 +159,7 @@ minetest.register_abm({
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
catch_up = false,
|
||||
action = function(pos, node, obj_count)
|
||||
action = function(pos, node)
|
||||
-- Get items (if any)
|
||||
local searchPos = {x = pos.x, y = pos.y + 0.5, z = pos.z}
|
||||
local objs = minetest.get_objects_inside_radius(searchPos, 0.5)
|
||||
|
@ -47,12 +47,7 @@ for i, size in ipairs(sizes) do
|
||||
}
|
||||
},
|
||||
on_rightclick = function(pos, node, clicker)
|
||||
-- clicker:set_hp(clicker:get_hp() + 1)
|
||||
local name = clicker:get_player_name()
|
||||
local h = tonumber(hud.hunger[name])
|
||||
h = h + 2
|
||||
hud.hunger[name] = h
|
||||
hud.set_hunger(clicker)
|
||||
stamina.change(clicker, 2)
|
||||
if i < #sizes then
|
||||
minetest.swap_node(pos, {name="cake:cake_"..i})
|
||||
else
|
||||
|
@ -1 +1,3 @@
|
||||
name = cake
|
||||
description = Slicable cake
|
||||
depends = bucket, farming, stamina
|
||||
|
Loading…
x
Reference in New Issue
Block a user