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:
parent
73210d0a99
commit
485319a2f9
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user