mirror of
https://github.com/songoda/UltimateStacker.git
synced 2024-11-27 12:35:17 +01:00
Don't spawn empty exp orbs.
This commit is contained in:
parent
728008c678
commit
3a4221bdf7
@ -126,7 +126,8 @@ public class EntityStack {
|
|||||||
if (!preStackedDrops.isEmpty())
|
if (!preStackedDrops.isEmpty())
|
||||||
DropUtils.processStackedDrop(killed, preStackedDrops);
|
DropUtils.processStackedDrop(killed, preStackedDrops);
|
||||||
|
|
||||||
killedLocation.getWorld().spawn(killedLocation, ExperienceOrb.class).setExperience(droppedExp * amount);
|
if (droppedExp > 0)
|
||||||
|
killedLocation.getWorld().spawn(killedLocation, ExperienceOrb.class).setExperience(droppedExp * amount);
|
||||||
|
|
||||||
if (killed.getKiller() == null) return;
|
if (killed.getKiller() == null) return;
|
||||||
UltimateStacker.getInstance().addExp(killed.getKiller(), this);
|
UltimateStacker.getInstance().addExp(killed.getKiller(), this);
|
||||||
@ -200,13 +201,13 @@ public class EntityStack {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void addHealth(double health) {
|
public void addHealth(double health) {
|
||||||
synchronized(healthLock) {
|
synchronized (healthLock) {
|
||||||
this.health.addLast(health);
|
this.health.addLast(health);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void mergeHealth(EntityStack stack) {
|
public void mergeHealth(EntityStack stack) {
|
||||||
synchronized(healthLock) {
|
synchronized (healthLock) {
|
||||||
this.health.addAll(stack.health);
|
this.health.addAll(stack.health);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user