From 4e33163be06ebe8aa0f3cb29b2595553f9ad45d2 Mon Sep 17 00:00:00 2001 From: riking Date: Thu, 16 May 2013 20:28:32 -0700 Subject: [PATCH] Change rounding strategy to ceiling for mob healthbars --- .../java/com/gmail/nossr50/util/MobHealthbarUtils.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/util/MobHealthbarUtils.java b/src/main/java/com/gmail/nossr50/util/MobHealthbarUtils.java index da2225981..6a3110d28 100644 --- a/src/main/java/com/gmail/nossr50/util/MobHealthbarUtils.java +++ b/src/main/java/com/gmail/nossr50/util/MobHealthbarUtils.java @@ -35,9 +35,9 @@ public final class MobHealthbarUtils { /** * Handle the creation of mob healthbars. * - * @param profile The - * @param target - * @param damage + * @param player the attacking player + * @param target the targetted entity + * @param damage damage done by the attack triggering this */ public static void handleMobHealthbars(Player player, LivingEntity target, int damage) { if (!Permissions.mobHealthDisplay(player)) { @@ -132,7 +132,7 @@ public final class MobHealthbarUtils { return null; } - int coloredDisplay = (int) (fullDisplay * (healthPercentage / 100.0D)); + int coloredDisplay = (int) Math.ceil(fullDisplay * (healthPercentage / 100.0D)); int grayDisplay = fullDisplay - coloredDisplay; String healthbar = color + "";