1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 03:35:51 +00:00

Fixed XP duplication

This commit is contained in:
TheBusyBiscuit 2017-01-21 08:30:41 +01:00
parent 73210d0a99
commit 485319a2f9

View File

@ -158,8 +158,7 @@ public class XPCollector extends SlimefunItem {
if (n instanceof ExperienceOrb) {
if (ChargableBlock.getCharge(b) < getEnergyConsumption()) return;
if (!n.isValid()) return;
if (n.isValid()) {
int xp = getEXP(b) + ((ExperienceOrb) n).getExperience();
ChargableBlock.addCharge(b, -getEnergyConsumption());
@ -178,6 +177,7 @@ public class XPCollector extends SlimefunItem {
}
}
}
}
private int getEXP(Block b) {
Config cfg = BlockStorage.getBlockInfo(b);