mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-13 03:05:52 -07:00
Properly call EntityDeathEvent for mobs. Fixes BUKKIT-1519
This commit is contained in:
@@ -779,7 +779,18 @@ public abstract class EntityLiving extends Entity {
|
||||
|
||||
if (!this.isBaby()) {
|
||||
this.dropDeathLoot(this.lastDamageByPlayerTime > 0, i);
|
||||
// CraftBukkit - move rare item drop call to dropDeathLoot
|
||||
/* CraftBukkit start - move rare item drop call to dropDeathLoot
|
||||
if (this.lastDamageByPlayerTime > 0) {
|
||||
int j = this.random.nextInt(200) - i;
|
||||
|
||||
if (j < 5) {
|
||||
this.b(j <= 0 ? 1 : 0);
|
||||
}
|
||||
}
|
||||
// */
|
||||
} else {
|
||||
CraftEventFactory.callEntityDeathEvent(this);
|
||||
// CraftBukkit end
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user