Fixed the Body Builder upgrade

Yay for not setting the map correctly!
This commit is contained in:
WayofTime 2020-12-31 20:56:56 -05:00
parent b8396a7969
commit 0354045796

View file

@ -362,12 +362,14 @@ public class GenericHandler
}
int currentFood = player.getFoodStats().getFoodLevel();
if (foodMap.getOrDefault(player.getUniqueID(), 20) < currentFood)
if (foodMap.getOrDefault(player.getUniqueID(), 19) < currentFood)
{
LivingUtil.applyNewExperience(player, LivingArmorRegistrar.UPGRADE_KNOCKBACK_RESIST.get(), currentFood - foodMap.getOrDefault(player.getUniqueID(), 20));
foodMap.put(player.getUniqueID(), currentFood);
LivingUtil.applyNewExperience(player, LivingArmorRegistrar.UPGRADE_KNOCKBACK_RESIST.get(), currentFood - foodMap.getOrDefault(player.getUniqueID(), 19));
}
foodMap.put(player.getUniqueID(), currentFood);
// System.out.println("Distance travelled: " + distance);
if (player.isOnGround() && distance > 0 && distance < 50)
{