Fix: brewery drinks

make them only restore one hunger
This commit is contained in:
Coder12a 2019-03-16 14:02:26 -05:00
parent 7a65594b95
commit 3cb0c623c1

View File

@ -163,11 +163,11 @@ minetest.register_node("brewing:drinking_glass_water", {
local recipes = {
--MAKE YOUR OWN DRINK HERE!
--drink api: description, itemname, fill value, craft items.
{"Wine", "wine", 4, {"default:apple", "cake:sugar", "brewing:cider"}},
{"Beer", "beer", 2, {"farming:wheat", "farming:wheat", "cake:sugar" ,"brewing:drinking_glass_water"}},
{"Cider", "cider", 2 , {"default:apple", "cake:sugar", "brewing:drinking_glass_water"}},
{"Ale", "ale", 2, {"farming:seed_wheat", "farming:wheat", "cake:sugar", "brewing:drinking_glass_water"}},
{"Root Beer", "rootbeer", 2, {"farming:seed_wheat", "default:sapling", "cake:sugar", "brewing:drinking_glass_water"}},
{"Wine", "wine", 1, {"default:apple", "cake:sugar", "brewing:cider"}},
{"Beer", "beer", 1, {"farming:wheat", "farming:wheat", "cake:sugar" ,"brewing:drinking_glass_water"}},
{"Cider", "cider", 1 , {"default:apple", "cake:sugar", "brewing:drinking_glass_water"}},
{"Ale", "ale", 1, {"farming:seed_wheat", "farming:wheat", "cake:sugar", "brewing:drinking_glass_water"}},
{"Root Beer", "rootbeer", 1, {"farming:seed_wheat", "default:sapling", "cake:sugar", "brewing:drinking_glass_water"}},
}
for _, data in pairs(recipes) do
minetest.register_node("brewing:"..data[2], {
@ -198,11 +198,7 @@ for _, data in pairs(recipes) do
end,
groups = {vessel = 1, dig_immediate = 4, attached_node = 1},
on_use = function(itemstack, player, pointed_thing)
local player_inv = player:get_inventory()
minetest.item_eat(data[3])
player_inv:add_item("main", "vessels:drinking_glass")
end,
on_use = minetest.item_eat(data[3], "vessels:drinking_glass"),
selection_box = {
type = "fixed",