Skip to content

Commit

Permalink
Passive healing rebalancing. Healing now happens at much lower hunger…
Browse files Browse the repository at this point in the history
… + thirst (as long as you aren't starving / dehydrated. Added a 3x bonus healing rate if you are at full-ish hunger + thirst.
  • Loading branch information
alcatrazEscapee committed Sep 2, 2019
1 parent ac4a0f4 commit 80a8471
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,18 @@ public void onUpdate(EntityPlayer player)
originalStats.onUpdate(player);

// Apply custom TFC regeneration
if (player.shouldHeal() && getFoodLevel() >= 16.0f && getThirst() > 60f)
if (player.shouldHeal() && getFoodLevel() >= 4.0f && getThirst() > 20f)
{
healTimer++;
float multiplier = 1;
if (getFoodLevel() > 16.0f && getThirst() > 80f)
{
multiplier = 3;
}

if (healTimer > 10)
{
player.heal(PASSIVE_HEAL_AMOUNT * (float) ConfigTFC.GENERAL.playerNaturalRegenerationModifier);
player.heal(multiplier * PASSIVE_HEAL_AMOUNT * (float) ConfigTFC.GENERAL.playerNaturalRegenerationModifier);
healTimer = 0;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void onEntityCollision(World worldIn, BlockPos pos, IBlockState state, En
EntityLivingBase entityLiving = (EntityLivingBase) entityIn;
if (Constants.RNG.nextInt(10) == 0 && entityLiving.getHealth() < entityLiving.getMaxHealth())
{
entityLiving.heal(FoodStatsTFC.PASSIVE_HEAL_AMOUNT * 3.5f);
entityLiving.heal(FoodStatsTFC.PASSIVE_HEAL_AMOUNT * 7f);
}
}
}
Expand Down

0 comments on commit 80a8471

Please sign in to comment.