mirror of
https://github.com/songoda/UltimateStacker.git
synced 2025-02-28 17:21:02 +01:00
Drops are now overridden even if nothing is to be dropped.
This commit is contained in:
parent
a200c824f6
commit
e43e805fe6
@ -17,7 +17,6 @@ import org.bukkit.util.Vector;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
public class EntityStack extends ColdEntityStack {
|
||||
@ -83,7 +82,6 @@ public class EntityStack extends ColdEntityStack {
|
||||
plugin.getEntityStackManager().removeStack(event.getEntity());
|
||||
plugin.getDataManager().deleteHost(this);
|
||||
|
||||
|
||||
Location killedLocation = killed.getLocation();
|
||||
List<Drop> preStackedDrops = new ArrayList<>();
|
||||
for (int i = 1; i < getAmount(); i++) {
|
||||
@ -98,14 +96,14 @@ public class EntityStack extends ColdEntityStack {
|
||||
drops = plugin.getLootablesManager().getDrops(killed);
|
||||
preStackedDrops.addAll(drops);
|
||||
}
|
||||
if (!preStackedDrops.isEmpty())
|
||||
DropUtils.processStackedDrop(killed, preStackedDrops, event);
|
||||
|
||||
DropUtils.processStackedDrop(killed, preStackedDrops, event);
|
||||
|
||||
if (droppedExp > 0)
|
||||
killedLocation.getWorld().spawn(killedLocation, ExperienceOrb.class).setExperience(droppedExp * getAmount());
|
||||
|
||||
if (killed.getKiller() == null) return;
|
||||
UltimateStacker.getInstance().addExp(killed.getKiller(), this);
|
||||
plugin.addExp(killed.getKiller(), this);
|
||||
}
|
||||
|
||||
private void handleSingleStackDeath(LivingEntity killed, List<Drop> drops, EntityDeathEvent event) {
|
||||
|
Loading…
Reference in New Issue
Block a user