added cactus juice (thanks OgelGames)

This commit is contained in:
tenplus1 2020-06-18 21:02:39 +01:00
parent 84d9ca7beb
commit b3f69171c3
3 changed files with 33 additions and 1 deletions

View File

@ -13,7 +13,7 @@ This mod works by adding your new plant to the {growing=1} group and numbering t
### Changelog:
- 1.45 - Dirt and Hoes are more in line with default by using dry/wet/base
- 1.45 - Dirt and Hoes are more in line with default by using dry/wet/base, added cactus juice
options, onion soup added (thanks edcrypt), Added apple pie, added wild cotton to savanna
- 1.44 - Added 'farming_stage_length' in mod settings for speed of crop growth, also thanks to TheDarkTiger for translation updates
- 1.43 - Scythe works on use instead of right-click, added seed=1 groups to actual seeds and seed=2 group for plantable food items.

View File

@ -236,3 +236,35 @@ minetest.register_craft({
},
replacements = {{"group:food_baking_tray", "farming:baking_tray"}}
})
-- Cactus Juice
minetest.register_craftitem("farming:cactus_juice", {
description = S("Cactus Juice"),
inventory_image = "farming_cactus_juice.png",
-- on_use = minetest.item_eat(2, "vessels:drinking_glass"),
groups = {vessel = 1},
on_use = function(itemstack, user, pointed_thing)
if user then
if math.random(1, 5) == 1 then
return minetest.do_item_eat(-1, "vessels:drinking_glass",
itemstack, user, pointed_thing)
else
return minetest.do_item_eat(2, "vessels:drinking_glass",
itemstack, user, pointed_thing)
end
end
end,
})
minetest.register_craft({
output = "farming:cactus_juice 2",
type = "shapeless",
recipe = {
"vessels:drinking_glass", "vessels:drinking_glass",
"default:cactus", "farming:juicer"
},
replacements = {
{"group:food_juicer", "farming:juicer"},
},
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B