mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-28 10:59:34 +01:00
you no longer can get potion effects without eating the stew
This commit is contained in:
parent
da12a0a5b2
commit
a4c608aada
1 changed files with 25 additions and 9 deletions
34
init.lua
34
init.lua
|
@ -7,29 +7,45 @@ local eat = minetest.item_eat(6, "mcl_core:bowl") --6 hunger points, player rece
|
|||
|
||||
|
||||
local function poison(itemstack, placer, pointed_thing)
|
||||
mcl_potions.poison_func(placer, 1, 12)
|
||||
return eat(itemstack, placer, pointed_thing)
|
||||
local hunger = mcl_hunger.get_hunger(placer)
|
||||
if hunger < 20 then
|
||||
mcl_potions.poison_func(placer, 1, 12)
|
||||
return eat(itemstack, placer, pointed_thing)
|
||||
end
|
||||
end
|
||||
|
||||
local function hunger(itemstack, placer, pointed_thing, player)
|
||||
return eat(itemstack, placer, pointed_thing)
|
||||
local hunger = mcl_hunger.get_hunger(placer)
|
||||
if hunger < 20 then
|
||||
return eat(itemstack, placer, pointed_thing)
|
||||
end
|
||||
end
|
||||
|
||||
local function jump_boost(itemstack, placer, pointed_thing)
|
||||
mcl_potions.leaping_func(placer, 1, 6)
|
||||
return eat(itemstack, placer, pointed_thing)
|
||||
local hunger = mcl_hunger.get_hunger(placer)
|
||||
if hunger < 20 then
|
||||
mcl_potions.leaping_func(placer, 1, 6)
|
||||
return eat(itemstack, placer, pointed_thing)
|
||||
end
|
||||
end
|
||||
|
||||
local function regeneration(itemstack, placer, pointed_thing)
|
||||
mcl_potions.regeneration_func(placer, 1, 8)
|
||||
return eat(itemstack, placer, pointed_thing)
|
||||
local hunger = mcl_hunger.get_hunger(placer)
|
||||
if hunger < 20 then
|
||||
mcl_potions.regeneration_func(placer, 1, 8)
|
||||
return eat(itemstack, placer, pointed_thing)
|
||||
end
|
||||
end
|
||||
|
||||
local function night_vision(itemstack, placer, pointed_thing)
|
||||
mcl_potions.night_vision_func(placer, 1, 5)
|
||||
return eat(itemstack, placer, pointed_thing)
|
||||
local hunger = mcl_hunger.get_hunger(placer)
|
||||
if hunger < 20 then
|
||||
mcl_potions.night_vision_func(placer, 1, 5)
|
||||
return eat(itemstack, placer, pointed_thing)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- ________________________
|
||||
--_________________________________________/ Item Regestration \_________________
|
||||
minetest.register_craftitem("mcl_sus_stew:poison_stew",{
|
||||
|
|
Loading…
Reference in a new issue