ExhaustingAction - coolsquid/HungerTweaker GitHub Wiki

ExhaustingAction

mods.hungertweaker.ExhaustingAction

The ExhaustingAction ZenClass can be used to modify exhaustion gain, both generally and from specific actions.

Constants

  • HARVEST_BLOCK (ExhaustingAction)
  • NORMAL_JUMP (ExhaustingAction)
  • SPRINTING_JUMP (ExhaustingAction)
  • ATTACK_ENTITY (ExhaustingAction)
  • DAMAGE_TAKEN (ExhaustingAction)
  • HUNGER_POTION (ExhaustingAction)
  • MOVEMENT_DIVE (ExhaustingAction)
  • MOVEMENT_SWIM (ExhaustingAction)
  • MOVEMENT_SPRINT (ExhaustingAction)
  • MOVEMENT_CROUCH (ExhaustingAction)
  • MOVEMENT_WALK (ExhaustingAction)
  • ALL (ExhaustingAction[])

Methods

  • setDeltaExhaustion(IData)
    • Accepts a number or an expression.
    • The amount of exhaustion that is added by the action.

Non-static methods are used on instances of the class in question.

Examples

mods.hungertweaker.ExhaustingAction.MOVEMENT_SPRINT.setDeltaExhaustion("x*2")

This would make sprinting twice as exhausting as usual.

for action in mods.hungertweaker.ExhaustingAction.ALL {
	action.setDeltaExhaustion("x/2");
}

This would make every action half as exhausting as usual.

import mods.hungertweaker.ExhaustingAction;
for action in ExhaustingAction.ALL {
	action.setDeltaExhaustion("x*5");
}
ExhaustingAction.MOVEMENT_SWIM.setDeltaExhaustion("x*20");

setDeltaExhaustion overrides the previous deltaExhaustion, so if you want to modify all actions, and then modify some specific actions differently, you must do the former first.

⚠️ **GitHub.com Fallback** ⚠️