package net.minecraft.util;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
public class EntityDamageSourceIndirect extends EntityDamageSource
{
private Entity indirectEntity;
public EntityDamageSourceIndirect(String par1Str, Entity par2Entity, Entity par3Entity)
{
super(par1Str, par2Entity);
this.indirectEntity = par3Entity;
}
public Entity getSourceOfDamage()
{
return this.damageSourceEntity;
}
public Entity getEntity()
{
return this.indirectEntity;
}
/**
* Returns the message to be displayed on player death.
*/
public String getDeathMessage(EntityPlayer par1EntityPlayer)
{
return StatCollector.translateToLocalFormatted("death." + this.damageType, new Object[] {par1EntityPlayer.username, this.indirectEntity == null ? this.damageSourceEntity.getEntityName() : this.indirectEntity.getEntityName()});
}
}