summaryrefslogtreecommitdiff
path: root/food.lua
diff options
context:
space:
mode:
authorroot <root@linux-forks.de>2018-11-14 12:45:10 +0100
committerroot <root@linux-forks.de>2018-11-14 12:45:10 +0100
commit070c5dd08e9652cd540542b860d5a5cce1f8c7d4 (patch)
tree55b8404d46f195a38bb34a470290a9cacd4b75bd /food.lua
parent31fe2ff374e72fb8ea44d50cd82d6fc8b9be5463 (diff)
parentb29634b3632aebe6c21d035884ed454cfd7ce77a (diff)
Merge branch 'master' of https://notabug.org/TenPlus1/etherealHEADmaster
Diffstat (limited to 'food.lua')
-rw-r--r--food.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/food.lua b/food.lua
index 156e97f..390f2cd 100644
--- a/food.lua
+++ b/food.lua
@@ -144,7 +144,13 @@ minetest.register_node("ethereal:golden_apple", {
leafdecay = 3,leafdecay_drop = 1
},
drop = "ethereal:golden_apple",
- on_use = minetest.item_eat(20),
+-- on_use = minetest.item_eat(20),
+ on_use = function(itemstack, user, pointed_thing)
+ if user then
+ user:set_hp(20)
+ return minetest.do_item_eat(2, nil, itemstack, user, pointed_thing)
+ end
+ end,
sounds = default.node_sound_leaves_defaults(),
after_place_node = function(pos, placer, itemstack)
if placer:is_player() then