Fixed the furnace XP bug

This commit is contained in:
nossr50 2019-05-04 04:08:56 -07:00
parent cdf6e607de
commit 588b6f3692
4 changed files with 8 additions and 3 deletions

View File

@ -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

View File

@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.gmail.nossr50.mcMMO</groupId>
<artifactId>mcMMO</artifactId>
<version>2.1.53</version>
<version>2.1.54</version>
<name>mcMMO</name>
<url>https://github.com/mcMMO-Dev/mcMMO</url>
<scm>

View File

@ -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);
}

View File

@ -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));
}
}