ThirstUtil
It has been packaged in mods.simpletweaker.util.ThirstUtil
.
Static Methods
You can call these by ThirstUtil.method(parameters)
.
void takeDrink(IPlayer player, int thirst, float saturation, @Optional bool hasSound)
To handle player's drink values.
player -> an IPlayer instance
thirst -> thirst level
saturation -> thirst saturation
hasSound -> whether to play the sound of drinking (optional, default is false)
void takeDrinkWithThirsty(IPlayer player, int thirst, float saturation, float thirstyChance, int thirstyDuration, @Optional bool hasSound)
To handle player's drink values and give a Thirsty potion effect.
player -> an IPlayer instance
thirst -> thirst level
saturation -> thirst saturation
thirstyChance -> chance of Thirsty potion effect
thirstyDuration -> duration of Thirsty potion effect
hasSound -> whether to play the sound of drinking (optional, default is false)
void takeDrinkWithParasites(IPlayer player, int thirst, float saturation, @Optional bool hasSound, @Optional float parasitesChance, @Optional int parasitesDuration, @Optional bool useConfigParasites)
To handle player's drink values and give a Parasites potion effect.
player -> an IPlayer instance
thirst -> thirst level
saturation -> thirst saturation
hasSound -> whether to play the sound of drinking (optional, default is false)
parasitesChance -> chance of Thirsty potion effect, if useConfigParasites is false or blank, it will do nothing (optional, default is 0.0f)
parasitesDuration -> duration of Thirsty potion effect, if useConfigParasites is false or blank, it will do nothing (optional, default is 0)
useConfigParasites -> whether to handle Parasites potion effect in simpledifficulty.cfg (optional, default is true)
Last updated