mirror of
https://github.com/songoda/UltimateStacker.git
synced 2024-09-27 14:12:59 +02:00
Added some extra stuff to the XP update.
This commit is contained in:
parent
5a25fa384f
commit
0c62b24a71
@ -111,9 +111,14 @@ public class EntityStack extends ColdEntityStack {
|
||||
preStackedDrops.addAll(drops);
|
||||
}
|
||||
|
||||
Location killedLocation = killed.getLocation();
|
||||
if (droppedExp > 0)
|
||||
killedLocation.getWorld().spawn(killedLocation, ExperienceOrb.class).setExperience(droppedExp * getAmount());
|
||||
// In versions 1.14 and below experience is not dropping. Because of this we are doing this ourselves.
|
||||
if (ServerVersion.isServerVersionAtOrBelow(ServerVersion.V1_14)) {
|
||||
Location killedLocation = killed.getLocation();
|
||||
if (droppedExp > 0)
|
||||
killedLocation.getWorld().spawn(killedLocation, ExperienceOrb.class).setExperience(droppedExp * getAmount());
|
||||
} else {
|
||||
event.setDroppedExp(droppedExp * getAmount());
|
||||
}
|
||||
|
||||
DropUtils.processStackedDrop(killed, preStackedDrops, event);
|
||||
|
||||
@ -127,9 +132,6 @@ public class EntityStack extends ColdEntityStack {
|
||||
killed.remove();
|
||||
LivingEntity newEntity = takeOneAndSpawnEntity(killed.getLocation());
|
||||
|
||||
//if (!EntityUtils.isAware(killed))
|
||||
// EntityUtils.setUnaware(newEntity);
|
||||
|
||||
// In versions 1.14 and below experience is not dropping. Because of this we are doing this ourselves.
|
||||
if (ServerVersion.isServerVersionAtOrBelow(ServerVersion.V1_14)) {
|
||||
Location killedLocation = killed.getLocation();
|
||||
|
Loading…
Reference in New Issue
Block a user