Keep Mininglevel Boost on Part Replacement

This commit is contained in:
Bernhard Bonigl committed 2014-07-29 23:30:08 +02:00
1 parent 3338c3ddca
commit 353a51bbbd
1 file changed
+4
@@ -132,6 +132,10 @@ public abstract class ReplacementLogic {
float percentage = LevelingLogic.getBoostXp(tags) / LevelingLogic.getRequiredBoostXp(toolStack);
int newXp = Math.round(LevelingLogic.getRequiredBoostXp(newTool) * percentage);
tags.setInteger(LevelingLogic.TAG_BOOST_EXP, newXp);
// already full xp?
if(LevelingLogic.isBoosted(tags))
tags.setInteger("HarvestLevel", tags.getInteger("HarvestLevel") + 1);
}
// stonebound. Shoddy is always present and never changed, we can simply update it.