summaryrefslogtreecommitdiff
path: root/farming/crops
diff options
context:
space:
mode:
authorVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>2019-04-01 19:38:47 -0400
committerVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>2019-04-01 19:38:47 -0400
commit8555f75acc050f29508d88f1e57159f79cb948d1 (patch)
tree367cbd14aafff8523b448e81027c11000863a107 /farming/crops
parentb548167fde186dc92d97a243e6689efe0a51a115 (diff)
downloaddreambuilder_modpack-8555f75acc050f29508d88f1e57159f79cb948d1.tar
dreambuilder_modpack-8555f75acc050f29508d88f1e57159f79cb948d1.tar.gz
dreambuilder_modpack-8555f75acc050f29508d88f1e57159f79cb948d1.tar.bz2
dreambuilder_modpack-8555f75acc050f29508d88f1e57159f79cb948d1.tar.xz
dreambuilder_modpack-8555f75acc050f29508d88f1e57159f79cb948d1.zip
update blox, castles, cottages, technic, farming_redo, gloopblocks,
homedecor, led_marquee, locks, maptools, mesecons, plantlife, moreblocks, nixie_tubes, replacer, travelnet, and unified inventory
Diffstat (limited to 'farming/crops')
-rw-r--r--farming/crops/potato.lua11
1 files changed, 10 insertions, 1 deletions
diff --git a/farming/crops/potato.lua b/farming/crops/potato.lua
index 1547fc0..256ce97 100644
--- a/farming/crops/potato.lua
+++ b/farming/crops/potato.lua
@@ -14,7 +14,16 @@ minetest.register_craftitem("farming:potato", {
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:potato_1")
end,
- on_use = minetest.item_eat(1),
+-- on_use = minetest.item_eat(1),
+ on_use = function(itemstack, user, pointed_thing)
+ if user then
+ if math.random(1, 3) == 1 then
+ return minetest.do_item_eat(-1, nil, itemstack, user, pointed_thing)
+ else
+ return minetest.do_item_eat(1, nil, itemstack, user, pointed_thing)
+ end
+ end
+ end,
})
-- baked potato