Prevent sprinting if hunger level <= 6
This commit is contained in:
parent
2e7ce77985
commit
d36beaf64f
5 changed files with 13 additions and 10 deletions
|
@ -61,8 +61,8 @@ minetest.register_globalstep(function(dtime)
|
|||
--Adjust player states
|
||||
if players[playerName]["shouldSprint"] == true then --Stopped
|
||||
local sprinting
|
||||
-- Prevent sprinting if standing on soul sand
|
||||
if playerplus[playerName].nod_stand == "mcl_nether:soul_sand" then
|
||||
-- Prevent sprinting if standing on soul sand or hungry
|
||||
if playerplus[playerName].nod_stand == "mcl_nether:soul_sand" or mcl_hunger.get_hunger(player) <= 6 then
|
||||
sprinting = false
|
||||
else
|
||||
sprinting = true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue