From 47fba89bd94d3626dc22343de2407367a0e32d40 Mon Sep 17 00:00:00 2001 From: direwolf20 <39863894+Direwolf20-MC@users.noreply.github.com> Date: Fri, 13 Sep 2024 12:38:14 -0400 Subject: [PATCH] Misc Fixes --- .../common/blockentities/ExperienceHolderBE.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/java/com/direwolf20/justdirethings/common/blockentities/ExperienceHolderBE.java b/src/main/java/com/direwolf20/justdirethings/common/blockentities/ExperienceHolderBE.java index 8f0ffac3..a6630427 100644 --- a/src/main/java/com/direwolf20/justdirethings/common/blockentities/ExperienceHolderBE.java +++ b/src/main/java/com/direwolf20/justdirethings/common/blockentities/ExperienceHolderBE.java @@ -79,16 +79,13 @@ public void storeExp(Player player, int levelChange) { int expRemoved = ExperienceUtils.removePoints(player, expInCurrentLevel); this.exp += expRemoved; levelChange--; // We've already removed part of a level - if (player.experienceProgress > 0.0f && player.experienceProgress < 0.01f) - player.experienceProgress = 0f; + player.experienceProgress = 0f; //Clear the player's partial exp, to handle super low floating point values } if (levelChange > 0) { // Now remove the specified number of full levels int expRemoved = ExperienceUtils.removeLevels(player, levelChange); this.exp += expRemoved; - if (player.experienceProgress > 0.0f && player.experienceProgress < 0.01f) - player.experienceProgress = 0f; } }