Letting arrow death work

makes it so that when mobs killed with a bow have a chance of dropping minium shards.
This commit is contained in:
aginsun 2013-03-16 12:50:54 +01:00
parent fe153ca8bb
commit 27962c6351

View file

@ -28,6 +28,13 @@ public class EntityLivingHandler {
if (event.source.getDamageType().equals("player")) {
ItemDropHelper.dropMiniumShard((EntityPlayer) event.source.getSourceOfDamage(), event.entityLiving);
}
if (event.source.getSourceOfDamage() instanceof EntityArrow){
if (((EntityArrow) event.source.getSourceOfDamage()).shootingEntity != null){
if (((EntityArrow) event.source.getSourceOfDamage()).shootingEntity instanceof EntityPlayer){
ItemDropHelper.dropMiniumShard((EntityPlayer) event.source.getSourceOfDamage(), event.entityLiving);
}
}
}
}