public void applyEntityCollision(Entity entity) {
if (Game.isHost(worldObj)) {
if (entity.isDead)
return;
if (entity != this.riddenByEntity && (cartVelocityIsGreaterThan(0.2f) || getEntityData().getBoolean("HighSpeed")) && MiscTools.isKillabledEntity(entity)) {
EntityLivingBase living = (EntityLivingBase) entity;
if (RailcraftConfig.locomotiveDamageMobs())
living.attackEntityFrom(DamageSourceTrain.INSTANCE, getDamageToRoadKill(living));
if (living.getHealth() > 0) {
float yaw = (rotationYaw - 90) * (float) Math.PI / 180.0F;
living.addVelocity(-MathHelper.sin(yaw) * KNOCKBACK * 0.5F, 0.2D, MathHelper.cos(yaw) * KNOCKBACK * 0.5F);
}
return;
}
if (entity instanceof EntityLocomotive) {
LinkageManager lm = LinkageManager.instance();