Search in sources :

Example 1 with ThirstHandler

use of toughasnails.thirst.ThirstHandler in project RandomTweaker by Project-RT.

the class IPlayerExpansionTAN method addExhaustion.

@ZenMethod
public static void addExhaustion(IPlayer player, float exhaustion) {
    EntityPlayer mcPlayer = CraftTweakerMC.getPlayer(player);
    ThirstHandler thirstHandler = (ThirstHandler) mcPlayer.getCapability(TANCapabilities.THIRST, null);
    Objects.requireNonNull(thirstHandler).addExhaustion(exhaustion);
}
Also used : EntityPlayer(net.minecraft.entity.player.EntityPlayer) ThirstHandler(toughasnails.thirst.ThirstHandler) ZenMethod(stanhebben.zenscript.annotations.ZenMethod)

Aggregations

EntityPlayer (net.minecraft.entity.player.EntityPlayer)1 ZenMethod (stanhebben.zenscript.annotations.ZenMethod)1 ThirstHandler (toughasnails.thirst.ThirstHandler)1