potion effects and fire damage will now convert over to the next entity in stack.

This commit is contained in:
Brianna O'Keefe 2018-11-10 16:43:46 -05:00
parent 8c04fa8f46
commit 8b8e2c3018

View File

@ -52,15 +52,15 @@ public class DeathListeners implements Listener {
newEntity.setVelocity(killed.getVelocity());
if (killed instanceof Ageable && !((Ageable) killed).isAdult()) {
((Ageable) newEntity).setBaby();
}
if (killed instanceof Sheep) {
} else if (killed instanceof Sheep) {
((Sheep) newEntity).setColor(((Sheep) killed).getColor());
}
if (killed instanceof Villager) {
} else if (killed instanceof Villager) {
((Villager) newEntity).setProfession(((Villager) killed).getProfession());
}
newEntity.setFireTicks(killed.getFireTicks());
newEntity.addPotionEffects(killed.getActivePotionEffects());
return newEntity;
}
}