From 588b6f3692f9a7f1119cfc6683f6a08b7e1f13e6 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Sat, 4 May 2019 04:08:56 -0700 Subject: [PATCH] Fixed the furnace XP bug --- Changelog.txt | 4 ++++ pom.xml | 2 +- .../java/com/gmail/nossr50/listeners/InventoryListener.java | 3 ++- .../com/gmail/nossr50/skills/smelting/SmeltingManager.java | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index 7381773fd..6575bb900 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,3 +1,7 @@ +Version 2.1.54 + Fixed a bug where the Skill 'Understanding the Art' was preventing vanilla experience orbs from furnaces + Fixed 'Understanding the Art' not correctly boosting vanilla XP from furnaces + Version 2.1.53 Fixed a critical bug where players earned too much XP diff --git a/pom.xml b/pom.xml index 4dff07d21..e540c9396 100755 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.gmail.nossr50.mcMMO mcMMO - 2.1.53 + 2.1.54 mcMMO https://github.com/mcMMO-Dev/mcMMO diff --git a/src/main/java/com/gmail/nossr50/listeners/InventoryListener.java b/src/main/java/com/gmail/nossr50/listeners/InventoryListener.java index 5ba6c2d39..064f799c3 100644 --- a/src/main/java/com/gmail/nossr50/listeners/InventoryListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/InventoryListener.java @@ -190,7 +190,8 @@ public class InventoryListener implements Listener { return; } - int exp = UserManager.getPlayer(player).getSmeltingManager().vanillaXPBoost(event.getExpToDrop()); + int xpToDrop = event.getExpToDrop(); + int exp = UserManager.getPlayer(player).getSmeltingManager().vanillaXPBoost(xpToDrop); event.setExpToDrop(exp); } diff --git a/src/main/java/com/gmail/nossr50/skills/smelting/SmeltingManager.java b/src/main/java/com/gmail/nossr50/skills/smelting/SmeltingManager.java index 46e19e7e5..e36df9787 100644 --- a/src/main/java/com/gmail/nossr50/skills/smelting/SmeltingManager.java +++ b/src/main/java/com/gmail/nossr50/skills/smelting/SmeltingManager.java @@ -131,6 +131,6 @@ public class SmeltingManager extends SkillManager { * @return the vanilla XP multiplier */ public int getVanillaXpMultiplier() { - return RankUtils.getRank(getPlayer(), SubSkillType.SMELTING_UNDERSTANDING_THE_ART); + return Math.max(1, RankUtils.getRank(getPlayer(), SubSkillType.SMELTING_UNDERSTANDING_THE_ART)); } } \ No newline at end of file