stop being drunk or poisoned after drinking bucket of milk
This commit is contained in:
parent
95ae8a2894
commit
250cbeca55
7
init.lua
7
init.lua
@ -493,6 +493,13 @@ function stamina.eat(hp_change, replace_with_item, itemstack, user, pointed_thin
|
|||||||
texture = texture,
|
texture = texture,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- if player drinks bucket of milk then stop poison and being drunk
|
||||||
|
if itemstack:get_name() == "mobs:bucket_milk" then
|
||||||
|
|
||||||
|
stamina.players[name].poisoned = 0
|
||||||
|
stamina.players[name].drunk = 0
|
||||||
|
end
|
||||||
|
|
||||||
itemstack:take_item()
|
itemstack:take_item()
|
||||||
|
|
||||||
if replace_with_item then
|
if replace_with_item then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user