Skip to content

Config Options

Jakob edited this page Jan 23, 2023 · 4 revisions

20 ticks ≈ 1 second

Option Type Default (Vanilla) Description
constantRegenRate Integer 80 ticks How often the constant regen is applied (in ticks)
constantRegenAmount Float 0 How much health is regened when constant regen is applied (in health points)
constantExhaustionRate Integer 80 ticks How often the constant exhaustion is applied (in ticks)
constantExhaustionAmount Float 0 How much exhaustion is added when constant regen is applied
starvationDamageRate Integer 80 ticks How often damage applies when you have no hunger (in ticks)
starvationDamageAmount Float 1 How much the player is damaged when starvation damage is applied (in health points)
foodRegenRate Integer 80 ticks How often regen from food is applied (in ticks)
foodRegenHealthAmount Float 1 How much regen you get from food regen
foodRegenExhaustionAmount Float 1 Multiplier on how much exhaustion you get from food regen
foodRegenMinimumHunger Integer 18 The minimum amount of hunger you need for food regen to apply
hyperFoodRegenRate Integer 80 ticks How often hyper-regen from food is applied (in ticks)
hyperFoodRegenHealthMultiplier Float 1 Multiplier on how much regen you get from food hyper-regen
hyperFoodRegenExhaustionMultiplier Float 1 Multiplier on how much exhaustion you get from food hyper-regen
hyperFoodRegenMinimumHunger Integer 20 The minimum amount of hunger you need for food hyper-regen to apply
dynamicRegenRateCurve Curve DISABLED The curved used for Dynamic Regen (see Dynamic Regen)
dynamicRegenRateMultiplier Float 1 Stretches or Compresses the curve used (see Dynamic Regen)
dynamicRegenOnConstantRegen Boolean True If Dynamic Regen should apply to regen from constant regen
dynamicRegenOnConstantExhaustion Boolean True If Dynamic Regen should apply to exhaustion from constant exhaustion
dynamicRegenOnFoodRegen Boolean True If Dynamic Regen should apply to regen from food regen
dynamicRegenOnHyperFoodRegen Boolean True If Dynamic Regen should apply to regen from hyper food regen
spawnHealth Integer 20 How much health the player should spawn with
spawnHunger Integer 20 How much hunger the player should spawn with
foodLevelForSprint Integer 6 How much hunger is needed to sprint (Client-side only rn)
jumpExhaustionAmount Float 0.05 How much exhaustion you get from normal jumping
sprintJumpExhaustionAmount Float 0.2 How much exhaustion you get from sprint jumping
walkingExhaustionMultiplier Float 0 How much exhaustion you get from walking 1cm
sprintingExhaustionMultiplier Float 0.1 How much exhaustion you get from sprinting 1cm
crouchingExhaustionMultiplier Float 0 How much exhaustion you get from crouch walking 1cm
swimmingExhaustionMultiplier Float 0.1 How much exhaustion you get from swimming 1c
walkingUnderwaterExhaustionMultiplier Float 0.1 How much exhaustion you get from walking underwater 1cm
walkingOnWaterExhaustionMultiplier Float 0.1 How much exhaustion you get from walking on water 1cm
hungerFromFoodMultiplier Float 1 Modifier on how much hunger you get from eating
saturationFromFoodMultiplier Float 1 Modifier on how much saturation you get from eating
disableRegenWhenUsingShield Boolean False Disables all regen while using a shield
shieldExhaustionRate Integer 80 How often exhaustion from using a shield is applied
shieldExhaustionAmount Float 0 How much exhaustion is applied when using a shield
sleepExhaustionAmount Float 0 How much exhaustion is applied when a player has slept through the night
dynamicSleepExhaustionAmount Float 0 How much exhaustion is applied every in-game hour the player is asleep
debug Boolean False Shows how much regen a player gets and some applications of exhaustion. Not recommended if there’s more than one player
effects Array Empty ([ ]) List of HealthEffects (see HealthEffects)
sleepEffects Array Empty ([ ]) List of SleepEffects (see SleepEffects)

FoodRegen vs HyperFoodRegen
In minecraft, there's two levels of healing you can get from food. This wiki page refers to them as hyper and normal.

  • Hyper is when you have a full hunger bar and some saturation
    • f = min(playerSaturation, 6)
    • heal = (f / 6) * hyperFoodRegenHealthMultiplier
    • exahustion = f * hyperFoodRegenExhaustionMultiplier
  • Normal is when yo have 18 or more hunger points
    • heal = foodRegenHealthAmount
    • exahustion = foodRegenExhaustionAmount

If the hyper level applies, then the normal doesn't

Dynamic Regen:
A multiplier placed on the regen rates based on the player's health. The exact formula depends on which curve you use. All of them use steps as an increment.
Step Formula:
step = ((20 - playerHealth) * dynamicRegenRateMultiplier) + 1
Formulas for specifc curves:

  • DISABLED - 1 (no change)
  • LINEAR - step
  • QUADRATIC - step^2
  • EXPONENTIAL - e^step

Want the regen rate when you're at the lowest health to be x times longer than what it would be with full health, and want it to have equal steps along the way?
Set dynamicRegenRateCurve to LINEAR
Set dynamicRegenRateMultiplier using this formula: (xTimesLonger - 1)/ 20

HealthEffects: HealthEffects are status effects that are applied to player with a certain health, hunger, or both. The amplification can also scale based on the health/hunger using a curve. Example HealthEffect with all the options used: All of these fields are options (except effect)

{
  "effect": "slowness",
  "healthLowBound": 0,
  "healthHighBound": 15,
  "hungerLowBound": 0,
  "hungerHighBound": 10,
  "amplifier": 0,
  "amplifierCurve": "DISABLED",
  "amplifierCurveMultiplier": 1.0,
  "amplifierCurveSource": "HEALTH",
  
  "onSleep": false,
  "onSleepDuration": 0
}

This will apply slowness with no amplification (same as /effect give @p slowness DURATION 0) when a player has between 0-15 health and 0-10 hunger. With no change in amplification as health or hunger go down. And since we didn't set onSleep to true, this will apply all the time instead of only when the player sleeps.

Clone this wiki locally