mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-28 22:03:45 +01:00
you no longer can get potion effects without eating the stew
This commit is contained in:
parent
da12a0a5b2
commit
a4c608aada
16
init.lua
16
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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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 New Issue
Block a user