2011-09-21 00:50:35 +01:00
|
|
|
package net.minecraft.server;
|
|
|
|
|
|
|
|
public class EntityDamageSourceIndirect extends EntityDamageSource {
|
|
|
|
|
2012-01-14 21:03:48 +01:00
|
|
|
private Entity owner;
|
2011-09-21 00:50:35 +01:00
|
|
|
|
|
|
|
public EntityDamageSourceIndirect(String s, Entity entity, Entity entity1) {
|
|
|
|
super(s, entity);
|
2012-01-14 21:03:48 +01:00
|
|
|
this.owner = entity1;
|
2012-01-12 23:10:13 +01:00
|
|
|
}
|
|
|
|
|
2012-07-29 02:33:13 -05:00
|
|
|
public Entity f() {
|
2012-10-24 22:53:23 -05:00
|
|
|
return this.r;
|
2011-09-21 00:50:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public Entity getEntity() {
|
2012-01-14 21:03:48 +01:00
|
|
|
return this.owner;
|
2011-09-21 00:50:35 +01:00
|
|
|
}
|
|
|
|
|
2012-01-14 21:03:48 +01:00
|
|
|
public String getLocalizedDeathMessage(EntityHuman entityhuman) {
|
2012-11-06 06:05:28 -06:00
|
|
|
return LocaleI18n.get("death." + this.translationIndex, new Object[] { entityhuman.name, this.owner == null ? this.r.getLocalizedName() : this.owner.getLocalizedName()});
|
2011-12-27 10:56:46 -08:00
|
|
|
}
|
|
|
|
|
2012-11-06 06:05:28 -06:00
|
|
|
// CraftBukkit start
|
2011-12-27 10:56:46 -08:00
|
|
|
public Entity getProximateDamageSource() {
|
|
|
|
return super.getEntity();
|
2011-09-21 00:50:35 +01:00
|
|
|
}
|
2012-11-06 06:05:28 -06:00
|
|
|
// CraftBukkit end
|
2011-12-27 10:56:46 -08:00
|
|
|
}
|